text: /** vim: et:ts=4:sw=4:sts=4
   * @license RequireJS 2.1.14 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 v1.10.2
   * http://jquery.com/
   *
   * Includes Sizzle.js
   * http://sizzlejs.com/
   *
   * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
   * Released under the MIT license
   * http://jquery.org/license
   *
   * Date: 2013-07-03T13:48Z
   */
  
  /*!
   * Sizzle CSS Selector Engine v1.10.2
   * http://sizzlejs.com/
   *
   * Copyright 2013 jQuery Foundation, Inc. and other contributors
   * Released under the MIT license
   * http://jquery.org/license
   *
   * Date: 2013-07-03
   */
  
  // (c) Steven Levithan <stevenlevithan.com>
  
  /**
   * @author Kyle Florence <kyle[dot]florence[at]gmail[dot]com>
   * @website https://github.com/kflorence/jquery-deserialize/
   * @version 1.2.1
   *
   * Dual licensed under the MIT and GPLv2 licenses.
   */
  
  /*!
   * Homepage: http://github.com/blixt/js-hash
   * Copyright (c) 2009-2011 Andreas Blixt <andreas@blixt.org>
   * Contributors: Aaron Ogle <aogle@avencia.com>,
   * Matti Virkkunen <mvirkkunen@gmail.com>,
   * Simon Chester <simonches@gmail.com>
   * MIT License: http://www.opensource.org/licenses/mit-license.php
   *
   * Hash handler
   * Keeps track of the history of changes to the hash part in the address bar.
   */
  
  // license : MIT
  
  /*!
   * numeral.js
   * version : 1.4.9
   * author : Adam Draper
   * license : MIT
   * http://adamwdraper.github.com/Numeral-js/
   */
  
  /**
   * @license RequireJS text 2.0.9 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
   * Available via the MIT or new BSD license.
   * see: http://github.com/requirejs/text for details
   */
  
  /*!
   * Isotope PACKAGED v2.0.1
   * Filter & sort magical layouts
   * http://isotope.metafizzy.co
   */
  
  /*!
   * eventie v1.0.5
   * event binding helper
   *   eventie.bind( elem, 'click', myFn )
   *   eventie.unbind( elem, 'click', myFn )
   * MIT license
   */
  
  /*!
   * docReady
   * Cross browser DOMContentLoaded event emitter
   */
  
  /*!
   * EventEmitter v4.2.7 - git.io/ee
   * Oliver Caldwell
   * MIT license
   * @preserve
   */
  
  /*!
   * getStyleProperty v1.0.3
   * original by kangax
   * http://perfectionkills.com/feature-testing-css-properties/
   */
  
  /*!
   * Outlayer v1.2.0
   * the brains and guts of a layout library
   * MIT license
   */
  
  /*!
   * Masonry v3.1.5
   * Cascading grid layout library
   * http://masonry.desandro.com
   * MIT License
   * by David DeSandro
   */
  
  /*!
   * Masonry layout mode
   * sub-classes Masonry
   * http://masonry.desandro.com
   */
  
  /*!
   * Isotope v2.0.1
   * Filter & sort magical layouts
   * http://isotope.metafizzy.co
   */
  
  /**
   * @license RequireJS domReady 2.0.1 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
   * Available via the MIT or new BSD license.
   * see: http://github.com/requirejs/domReady for details
   */
  
  /*
   * Toastr
   * Copyright 2012-2014 John Papa and Hans Fjällemark.
   * All Rights Reserved.
   * Use, reproduction, distribution, and modification of this code is subject to the terms and
   * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
   *
   * Author: John Papa and Hans Fjällemark
   * ARIA Support: Greta Krafsig
   * Project: https://github.com/CodeSeven/toastr
   */
  
  /*
  Copyright 2012 Igor Vaynberg
  
  Version: 3.5.0 Timestamp: Mon Jun 16 19:29:44 EDT 2014
  
  This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
  General Public License version 2 (the "GPL License"). You may choose either license to govern your
  use of this software only upon the condition that you accept all of the terms of either the Apache
  License or the GPL License.
  
  You may obtain a copy of the Apache License and the GPL License at:
  
      http://www.apache.org/licenses/LICENSE-2.0
      http://www.gnu.org/licenses/gpl-2.0.html
  
  Unless required by applicable law or agreed to in writing, software distributed under the
  Apache License or the GPL License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
  the specific language governing permissions and limitations under the Apache License and the GPL License.
  */
  
  /*! http://mths.be/placeholder v2.0.7 by @mathias */
  
  /* 
   * radiosToSlider v0.1.8
   * jquery plugin to create a slider using a list of radio buttons
   * (c)2014 Rubén Torres - rubentdlh@gmail.com
   * Released under the MIT license
   */
  
  /*!
   * Bootstrap v3.1.1 (http://getbootstrap.com)
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   */
  
  /* ========================================================================
   * Bootstrap: transition.js v3.1.1
   * http://getbootstrap.com/javascript/#transitions
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /* ========================================================================
   * Bootstrap: alert.js v3.1.1
   * http://getbootstrap.com/javascript/#alerts
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /* ========================================================================
   * Bootstrap: button.js v3.1.1
   * http://getbootstrap.com/javascript/#buttons
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /* ========================================================================
   * Bootstrap: carousel.js v3.1.1
   * http://getbootstrap.com/javascript/#carousel
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /* ========================================================================
   * Bootstrap: collapse.js v3.1.1
   * http://getbootstrap.com/javascript/#collapse
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /* ========================================================================
   * Bootstrap: dropdown.js v3.1.1
   * http://getbootstrap.com/javascript/#dropdowns
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /* ========================================================================
   * Bootstrap: modal.js v3.1.1
   * http://getbootstrap.com/javascript/#modals
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /* ========================================================================
   * Bootstrap: tooltip.js v3.1.1
   * http://getbootstrap.com/javascript/#tooltip
   * Inspired by the original jQuery.tipsy by Jason Frame
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /* ========================================================================
   * Bootstrap: popover.js v3.1.1
   * http://getbootstrap.com/javascript/#popovers
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /* ========================================================================
   * Bootstrap: scrollspy.js v3.1.1
   * http://getbootstrap.com/javascript/#scrollspy
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /* ========================================================================
   * Bootstrap: tab.js v3.1.1
   * http://getbootstrap.com/javascript/#tabs
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /* ========================================================================
   * Bootstrap: affix.js v3.1.1
   * http://getbootstrap.com/javascript/#affix
   * ========================================================================
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * ======================================================================== */
  
  /*
   * Inline Form Validation Engine 2.6.2, jQuery plugin
   *
   * Copyright(c) 2010, Cedric Dugas
   * http://www.position-absolute.com
   *
   * 2.0 Rewrite by Olivier Refalo
   * http://www.crionics.com
   *
   * Form validation engine allowing custom regex rules to be added.
   * Licensed under the MIT License
   */
  
  /*!
   * FullCalendar v2.0.0
   * Docs & License: http://arshaw.com/fullcalendar/
   * (c) 2013 Adam Shaw
   */
  
  /*!
  
   handlebars v2.0.0
  
  Copyright (C) 2011-2014 by Yehuda Katz
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:
  
  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
  
  @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.14",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("requireLib",function(){}),function(e,t){function H(e){var t=e.length,n=w.type(e);return w.isWindow(e)?!1:e.nodeType===1&&t?!0:n==="array"||n!=="function"&&(t===0||typeof t=="number"&&t>0&&t-1 in e)}function j(e){var t=B[e]={};return w.each(e.match(S)||[],function(e,n){t[n]=!0}),t}function q(e,n,r,i){if(!w.acceptData(e))return;var s,o,u=w.expando,a=e.nodeType,f=a?w.cache:e,l=a?e[u]:e[u]&&u;if((!l||!f[l]||!i&&!f[l].data)&&r===t&&typeof n=="string")return;l||(a?l=e[u]=c.pop()||w.guid++:l=u),f[l]||(f[l]=a?{}:{toJSON:w.noop});if(typeof n=="object"||typeof n=="function")i?f[l]=w.extend(f[l],n):f[l].data=w.extend(f[l].data,n);return o=f[l],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[w.camelCase(n)]=r),typeof n=="string"?(s=o[n],s==null&&(s=o[w.camelCase(n)])):s=o,s}function R(e,t,n){if(!w.acceptData(e))return;var r,i,s=e.nodeType,o=s?w.cache:e,u=s?e[w.expando]:w.expando;if(!o[u])return;if(t){r=n?o[u]:o[u].data;if(r){w.isArray(t)?t=t.concat(w.map(t,w.camelCase)):t in r?t=[t]:(t=w.camelCase(t),t in r?t=[t]:t=t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!z(r):!w.isEmptyObject(r))return}}if(!n){delete o[u].data;if(!z(o[u]))return}s?w.cleanData([e],!0):w.support.deleteExpando||o!=o.window?delete o[u]:o[u]=null}function U(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(I,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:F.test(r)?w.parseJSON(r):r}catch(s){}w.data(e,n,r)}else r=t}return r}function z(e){var t;for(t in e){if(t==="data"&&w.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function it(){return!0}function st(){return!1}function ot(){try{return o.activeElement}catch(e){}}function ct(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ht(e,t,n){if(w.isFunction(t))return w.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return w.grep(e,function(e){return e===t!==n});if(typeof t=="string"){if(ut.test(t))return w.filter(t,e,n);t=w.filter(t,e)}return w.grep(e,function(e){return w.inArray(e,t)>=0!==n})}function pt(e){var t=dt.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Mt(e,t){return w.nodeName(e,"table")&&w.nodeName(t.nodeType===1?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function _t(e){return e.type=(w.find.attr(e,"type")!==null)+"/"+e.type,e}function Dt(e){var t=Ct.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Pt(e,t){var n,r=0;for(;(n=e[r])!=null;r++)w._data(n,"globalEval",!t||w._data(t[r],"globalEval"))}function Ht(e,t){if(t.nodeType!==1||!w.hasData(e))return;var n,r,i,s=w._data(e),o=w._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)w.event.add(t,n,u[n][r])}o.data&&(o.data=w.extend({},o.data))}function Bt(e,t){var n,r,i;if(t.nodeType!==1)return;n=t.nodeName.toLowerCase();if(!w.support.noCloneEvent&&t[w.expando]){i=w._data(t);for(r in i.events)w.removeEvent(t,r,i.handle);t.removeAttribute(w.expando)}if(n==="script"&&t.text!==e.text)_t(t).text=e.text,Dt(t);else if(n==="object")t.parentNode&&(t.outerHTML=e.outerHTML),w.support.html5Clone&&e.innerHTML&&!w.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML);else if(n==="input"&&xt.test(e.type))t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value);else if(n==="option")t.defaultSelected=t.selected=e.defaultSelected;else if(n==="input"||n==="textarea")t.defaultValue=e.defaultValue}function jt(e,n){var r,s,o=0,u=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!u)for(u=[],r=e.childNodes||e;(s=r[o])!=null;o++)!n||w.nodeName(s,n)?u.push(s):w.merge(u,jt(s,n));return n===t||n&&w.nodeName(e,n)?w.merge([e],u):u}function Ft(e){xt.test(e.type)&&(e.defaultChecked=e.checked)}function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--){t=en[i]+n;if(t in e)return t}return r}function nn(e,t){return e=t||e,w.css(e,"display")==="none"||!w.contains(e.ownerDocument,e)}function rn(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]=w._data(r,"olddisplay"),n=r.style.display,t?(!s[o]&&n==="none"&&(r.style.display=""),r.style.display===""&&nn(r)&&(s[o]=w._data(r,"olddisplay",an(r.nodeName)))):s[o]||(i=nn(r),(n&&n!=="none"||!i)&&w._data(r,"olddisplay",i?n:w.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 sn(e,t,n){var r=$t.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function on(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+=w.css(e,n+Zt[s],!0,i)),r?(n==="content"&&(o-=w.css(e,"padding"+Zt[s],!0,i)),n!=="margin"&&(o-=w.css(e,"border"+Zt[s]+"Width",!0,i))):(o+=w.css(e,"padding"+Zt[s],!0,i),n!=="padding"&&(o+=w.css(e,"border"+Zt[s]+"Width",!0,i)));return o}function un(e,t,n){var r=!0,i=t==="width"?e.offsetWidth:e.offsetHeight,s=qt(e),o=w.support.boxSizing&&w.css(e,"boxSizing",!1,s)==="border-box";if(i<=0||i==null){i=Rt(e,t,s);if(i<0||i==null)i=e.style[t];if(Jt.test(i))return i;r=o&&(w.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+on(e,t,n||(o?"border":"content"),r,s)+"px"}function an(e){var t=o,n=Qt[e];if(!n){n=fn(e,t);if(n==="none"||!n)It=(It||w("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(It[0].contentWindow||It[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=fn(e,t),It.detach();Qt[e]=n}return n}function fn(e,t){var n=w(t.createElement(e)).appendTo(t.body),r=w.css(n[0],"display");return n.remove(),r}function vn(e,t,n,r){var i;if(w.isArray(t))w.each(t,function(t,i){n||cn.test(e)?r(e,i):vn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&w.type(t)==="object")for(i in t)vn(e+"["+i+"]",t[i],n,r);else r(e,t)}function _n(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(S)||[];if(w.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 Dn(e,t,n,r){function o(u){var a;return i[u]=!0,w.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===An;return o(t.dataTypes[0])||!i["*"]&&o("*")}function Pn(e,n){var r,i,s=w.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((s[i]?e:r||(r={}))[i]=n[i]);return r&&w.extend(!0,e,r),e}function Hn(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes;while(f[0]==="*")f.shift(),s===t&&(s=e.mimeType||n.getResponseHeader("Content-Type"));if(s)for(u in a)if(a[u]&&a[u].test(s)){f.unshift(u);break}if(f[0]in r)o=f[0];else{for(u in r){if(!f[0]||e.converters[u+" "+f[0]]){o=u;break}i||(i=u)}o=o||i}if(o)return o!==f[0]&&f.unshift(o),r[o]}function Bn(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 zn(){try{return new e.XMLHttpRequest}catch(t){}}function Wn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function Yn(){return setTimeout(function(){Xn=t}),Xn=w.now()}function Zn(e,t,n){var r,i=(Gn[t]||[]).concat(Gn["*"]),s=0,o=i.length;for(;s<o;s++)if(r=i[s].call(n,t,e))return r}function er(e,t,n){var r,i,s=0,o=Qn.length,u=w.Deferred().always(function(){delete a.elem}),a=function(){if(i)return!1;var t=Xn||Yn(),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:w.extend({},t),opts:w.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Yn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.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;tr(l,f.opts.specialEasing);for(;s<o;s++){r=Qn[s].call(f,e,l,f.opts);if(r)return r}return w.map(l,Zn,f),w.isFunction(f.opts.start)&&f.opts.start.call(e,f),w.fx.timer(w.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 tr(e,t){var n,r,i,s,o;for(n in e){r=w.camelCase(n),i=t[r],s=e[n],w.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=w.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 nr(e,t,n){var r,i,s,o,u,a,f=this,l={},c=e.style,h=e.nodeType&&nn(e),p=w._data(e,"fxshow");n.queue||(u=w._queueHooks(e,"fx"),u.unqueued==null&&(u.unqueued=0,a=u.empty.fire,u.empty.fire=function(){u.unqueued||a()}),u.unqueued++,f.always(function(){f.always(function(){u.unqueued--,w.queue(e,"fx").length||u.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[c.overflow,c.overflowX,c.overflowY],w.css(e,"display")==="inline"&&w.css(e,"float")==="none"&&(!w.support.inlineBlockNeedsLayout||an(e.nodeName)==="inline"?c.display="inline-block":c.zoom=1)),n.overflow&&(c.overflow="hidden",w.support.shrinkWrapBlocks||f.always(function(){c.overflow=n.overflow[0],c.overflowX=n.overflow[1],c.overflowY=n.overflow[2]}));for(r in t){i=t[r];if($n.exec(i)){delete t[r],s=s||i==="toggle";if(i===(h?"hide":"show"))continue;l[r]=p&&p[r]||w.style(e,r)}}if(!w.isEmptyObject(l)){p?"hidden"in p&&(h=p.hidden):p=w._data(e,"fxshow",{}),s&&(p.hidden=!h),h?w(e).show():f.done(function(){w(e).hide()}),f.done(function(){var t;w._removeData(e,"fxshow");for(t in l)w.style(e,t,l[t])});for(r in l)o=Zn(h?p[r]:0,r,f),r in p||(p[r]=o.start,h&&(o.end=o.start,o.start=r==="width"||r==="height"?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}function ir(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function sr(e){return w.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=typeof t,s=e.location,o=e.document,u=o.documentElement,a=e.jQuery,f=e.$,l={},c=[],h="1.10.2",p=c.concat,d=c.push,v=c.slice,m=c.indexOf,g=l.toString,y=l.hasOwnProperty,b=h.trim,w=function(e,t){return new w.fn.init(e,t,r)},E=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,S=/\S+/g,x=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,N=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,C=/^[\],:{}\s]*$/,k=/(?:^|:|,)(?:\s*\[)+/g,L=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,O=/^-ms-/,M=/-([\da-z])/gi,_=function(e,t){return t.toUpperCase()},D=function(e){if(o.addEventListener||e.type==="load"||o.readyState==="complete")P(),w.ready()},P=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",D,!1),e.removeEventListener("load",D,!1)):(o.detachEvent("onreadystatechange",D),e.detachEvent("onload",D))};w.fn=w.prototype={jquery:h,constructor:w,init:function(e,n,r){var i,s;if(!e)return this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?i=[null,e,null]:i=T.exec(e);if(i&&(i[1]||!n)){if(i[1]){n=n instanceof w?n[0]:n,w.merge(this,w.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0));if(N.test(i[1])&&w.isPlainObject(n))for(i in n)w.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}s=o.getElementById(i[2]);if(s&&s.parentNode){if(s.id!==i[2])return r.find(e);this.length=1,this[0]=s}return this.context=o,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return e.nodeType?(this.context=this[0]=e,this.length=1,this):w.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),w.makeArray(e,this))},selector:"",length:0,toArray:function(){return v.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return w.each(this,e,t)},ready:function(e){return w.ready.promise().done(e),this},slice:function(){return this.pushStack(v.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]]:[])},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},w.fn.init.prototype=w.fn,w.extend=w.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!w.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((s=arguments[a])!=null)for(i in s){e=u[i],r=s[i];if(u===r)continue;l&&r&&(w.isPlainObject(r)||(n=w.isArray(r)))?(n?(n=!1,o=e&&w.isArray(e)?e:[]):o=e&&w.isPlainObject(e)?e:{},u[i]=w.extend(l,o,r)):r!==t&&(u[i]=r)}return u},w.extend({expando:"jQuery"+(h+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===w&&(e.$=f),t&&e.jQuery===w&&(e.jQuery=a),w},isReady:!1,readyWait:1,holdReady:function(e){e?w.readyWait++:w.ready(!0)},ready:function(e){if(e===!0?--w.readyWait:w.isReady)return;if(!o.body)return setTimeout(w.ready);w.isReady=!0;if(e!==!0&&--w.readyWait>0)return;n.resolveWith(o,[w]),w.fn.trigger&&w(o).trigger("ready").off("ready")},isFunction:function(e){return w.type(e)==="function"},isArray:Array.isArray||function(e){return w.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):typeof e=="object"||typeof e=="function"?l[g.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||w.type(e)!=="object"||e.nodeType||w.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(w.support.ownLast)for(n in e)return y.call(e,n);for(n in e);return n===t||y.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t,t=!1),t=t||o;var r=N.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=w.buildFragment([e],t,i),i&&w(i).remove(),w.merge([],r.childNodes))},parseJSON:function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(t===null)return t;if(typeof t=="string"){t=w.trim(t);if(t&&C.test(t.replace(L,"@").replace(A,"]").replace(k,"")))return(new Function("return "+t))()}w.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&w.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&w.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(O,"ms-").replace(M,_)},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=H(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:b&&!b.call("﻿ ")?function(e){return e==null?"":b.call(e)}:function(e){return e==null?"":(e+"").replace(x,"")},makeArray:function(e,t){var n=t||[];return e!=null&&(H(Object(e))?w.merge(n,typeof e=="string"?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,t,n){var r,i=0,s=e.length,o=H(e),u=[];if(o)for(;i<s;i++)r=t(e[i],i,n),r!=null&&(u[u.length]=r);else for(i in e)r=t(e[i],i,n),r!=null&&(u[u.length]=r);return p.apply([],u)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(s=e[n],n=e,e=s),w.isFunction(e)?(r=v.call(arguments,2),i=function(){return e.apply(n||this,r.concat(v.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i):t},access:function(e,n,r,i,s,o,u){var a=0,f=e.length,l=r==null;if(w.type(r)==="object"){s=!0;for(a in r)w.access(e,n,a,r[a],!0,o,u)}else if(i!==t){s=!0,w.isFunction(i)||(u=!0),l&&(u?(n.call(e,i),n=null):(l=n,n=function(e,t,n){return l.call(w(e),n)}));if(n)for(;a<f;a++)n(e[a],r,u?i:i.call(e[a],a,n(e[a],r)))}return s?e:l?n.call(e):f?n(e[0],r):o},now:function(){return(new Date).getTime()},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}}),w.ready.promise=function(t){if(!n){n=w.Deferred();if(o.readyState==="complete")setTimeout(w.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",D,!1),e.addEventListener("load",D,!1);else{o.attachEvent("onreadystatechange",D),e.attachEvent("onload",D);var r=!1;try{r=e.frameElement==null&&o.documentElement}catch(i){}r&&r.doScroll&&function s(){if(!w.isReady){try{r.doScroll("left")}catch(e){return setTimeout(s,50)}P(),w.ready()}}()}}return n.promise(t)},w.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()}),r=w(o),function(e,t){function ot(e,t,n,i){var s,o,u,a,f,l,p,m,g,w;(t?t.ownerDocument||t:E)!==h&&c(t),t=t||h,n=n||[];if(!e||typeof e!="string")return n;if((a=t.nodeType)!==1&&a!==9)return[];if(d&&!i){if(s=Z.exec(e))if(u=s[1]){if(a===9){o=t.getElementById(u);if(!o||!o.parentNode)return n;if(o.id===u)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(u))&&y(t,o)&&o.id===u)return n.push(o),n}else{if(s[2])return H.apply(n,t.getElementsByTagName(e)),n;if((u=s[3])&&r.getElementsByClassName&&t.getElementsByClassName)return H.apply(n,t.getElementsByClassName(u)),n}if(r.qsa&&(!v||!v.test(e))){m=p=b,g=t,w=a===9&&e;if(a===1&&t.nodeName.toLowerCase()!=="object"){l=mt(e),(p=t.getAttribute("id"))?m=p.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",f=l.length;while(f--)l[f]=m+gt(l[f]);g=$.test(e)&&t.parentNode||t,w=l.join(",")}if(w)try{return H.apply(n,g.querySelectorAll(w)),n}catch(S){}finally{p||t.removeAttribute("id")}}}return Nt(e.replace(W,"$1"),t,n,i)}function ut(){function t(n,r){return e.push(n+=" ")>s.cacheLength&&delete t[e.shift()],t[n]=r}var e=[];return t}function at(e){return e[b]=!0,e}function ft(e){var t=h.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function lt(e,t){var n=e.split("|"),r=e.length;while(r--)s.attrHandle[n[r]]=t}function ct(e,t){var n=t&&e,r=n&&e.nodeType===1&&t.nodeType===1&&(~t.sourceIndex||O)-(~e.sourceIndex||O);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ht(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function pt(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function dt(e){return at(function(t){return t=+t,at(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 vt(){}function mt(e,t){var n,r,i,o,u,a,f,l=N[e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=s.preFilter;while(u){if(!n||(r=X.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(i=[]);n=!1;if(r=V.exec(u))n=r.shift(),i.push({value:n,type:r[0].replace(W," ")}),u=u.slice(n.length);for(o in s.filter)(r=G[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(n=r.shift(),i.push({value:n,type:o,matches:r}),u=u.slice(n.length));if(!n)break}return t?u.length:u?ot.error(e):N(e,a).slice(0)}function gt(e){var t=0,n=e.length,r="";for(;t<n;t++)r+=e[t].value;return r}function yt(e,t,n){var r=t.dir,s=n&&r==="parentNode",o=x++;return t.first?function(t,n,i){while(t=t[r])if(t.nodeType===1||s)return e(t,n,i)}:function(t,n,u){var a,f,l,c=S+" "+o;if(u){while(t=t[r])if(t.nodeType===1||s)if(e(t,n,u))return!0}else while(t=t[r])if(t.nodeType===1||s){l=t[b]||(t[b]={});if((f=l[r])&&f[0]===c){if((a=f[1])===!0||a===i)return a===!0}else{f=l[r]=[c],f[1]=e(t,n,u)||i;if(f[1]===!0)return!0}}}}function bt(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 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[b]&&(r=Et(r)),i&&!i[b]&&(i=Et(i,s)),at(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||Tt(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?j.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):H.apply(o,g)})}function St(e){var t,n,r,i=e.length,o=s.relative[e[0].type],u=o||s.relative[" "],a=o?1:0,l=yt(function(e){return e===t},u,!0),c=yt(function(e){return j.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<i;a++)if(n=s.relative[e[a].type])h=[yt(bt(h),n)];else{n=s.filter[e[a].type].apply(null,e[a].matches);if(n[b]){r=++a;for(;r<i;r++)if(s.relative[e[r].type])break;return Et(a>1&&bt(h),a>1&&gt(e.slice(0,a-1).concat({value:e[a-2].type===" "?"*":""})).replace(W,"$1"),n,a<r&&St(e.slice(a,r)),r<i&&St(e=e.slice(r)),r<i&&gt(e))}h.push(n)}return bt(h)}function xt(e,t){var n=0,r=t.length>0,o=e.length>0,u=function(u,a,l,c,p){var d,v,m,g=[],y=0,b="0",w=u&&[],E=p!=null,x=f,T=u||o&&s.find.TAG("*",p&&a.parentNode||a),N=S+=x==null?1:Math.random()||.1;E&&(f=a!==h&&a,i=n);for(;(d=T[b])!=null;b++){if(o&&d){v=0;while(m=e[v++])if(m(d,a,l)){c.push(d);break}E&&(S=N,i=++n)}r&&((d=!m&&d)&&y--,u&&w.push(d))}y+=b;if(r&&b!==y){v=0;while(m=t[v++])m(w,g,a,l);if(u){if(y>0)while(b--)!w[b]&&!g[b]&&(g[b]=D.call(c));g=wt(g)}H.apply(c,g),E&&!u&&g.length>0&&y+t.length>1&&ot.uniqueSort(c)}return E&&(S=N,f=x),w};return r?at(u):u}function Tt(e,t,n){var r=0,i=t.length;for(;r<i;r++)ot(e,t[r],n);return n}function Nt(e,t,n,i){var o,u,f,l,c,h=mt(e);if(!i&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&r.getById&&t.nodeType===9&&d&&s.relative[u[1].type]){t=(s.find.ID(f.matches[0].replace(rt,it),t)||[])[0];if(!t)return n;e=e.slice(u.shift().value.length)}o=G.needsContext.test(e)?0:u.length;while(o--){f=u[o];if(s.relative[l=f.type])break;if(c=s.find[l])if(i=c(f.matches[0].replace(rt,it),$.test(u[0].type)&&t.parentNode||t)){u.splice(o,1),e=i.length&&gt(u);if(!e)return H.apply(n,i),n;break}}}return a(e,h)(i,t,!d,n,$.test(e)),n}var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b="sizzle"+ -(new Date),E=e.document,S=0,x=0,T=ut(),N=ut(),C=ut(),k=!1,L=function(e,t){return e===t?(k=!0,0):0},A=typeof t,O=1<<31,M={}.hasOwnProperty,_=[],D=_.pop,P=_.push,H=_.push,B=_.slice,j=_.indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},F="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",q="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",R=q.replace("w","w#"),U="\\["+I+"*("+q+")"+I+"*(?:([*^$|!~]?=)"+I+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+R+")|)|)"+I+"*\\]",z=":("+q+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+U.replace(3,8)+")*)|.*)\\)|)",W=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),X=new RegExp("^"+I+"*,"+I+"*"),V=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),$=new RegExp(I+"*[+~]"),J=new RegExp("="+I+"*([^\\]'\"]*)"+I+"*\\]","g"),K=new RegExp(z),Q=new RegExp("^"+R+"$"),G={ID:new RegExp("^#("+q+")"),CLASS:new RegExp("^\\.("+q+")"),TAG:new RegExp("^("+q.replace("w","w*")+")"),ATTR:new RegExp("^"+U),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),it=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{H.apply(_=B.call(E.childNodes),E.childNodes),_[E.childNodes.length].nodeType}catch(st){H={apply:_.length?function(e,t){P.apply(e,B.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}u=ot.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},r=ot.support={},c=ot.setDocument=function(e){var t=e?e.ownerDocument||e:E,n=t.defaultView;if(t===h||t.nodeType!==9||!t.documentElement)return h;h=t,p=t.documentElement,d=!u(t),n&&n.attachEvent&&n!==n.top&&n.attachEvent("onbeforeunload",function(){c()}),r.attributes=ft(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ft(function(e){return e.appendChild(t.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ft(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",e.getElementsByClassName("i").length===2}),r.getById=ft(function(e){return p.appendChild(e).id=b,!t.getElementsByName||!t.getElementsByName(b).length}),r.getById?(s.find.ID=function(e,t){if(typeof t.getElementById!==A&&d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},s.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete s.find.ID,s.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),s.find.TAG=r.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==A)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},s.find.CLASS=r.getElementsByClassName&&function(e,t){if(typeof t.getElementsByClassName!==A&&d)return t.getElementsByClassName(e)},m=[],v=[];if(r.qsa=Y.test(t.querySelectorAll))ft(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+F+")"),e.querySelectorAll(":checked").length||v.push(":checked")}),ft(function(e){var n=t.createElement("input");n.setAttribute("type","hidden"),e.appendChild(n).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")});return(r.matchesSelector=Y.test(g=p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ft(function(e){r.disconnectedMatch=g.call(e,"div"),g.call(e,"[s!='']:x"),m.push("!=",z)}),v=v.length&&new RegExp(v.join("|")),m=m.length&&new RegExp(m.join("|")),y=Y.test(p.contains)||p.compareDocumentPosition?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},L=p.compareDocumentPosition?function(e,n){if(e===n)return k=!0,0;var i=n.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(n);if(i)return i&1||!r.sortDetached&&n.compareDocumentPosition(e)===i?e===t||y(E,e)?-1:n===t||y(E,n)?1:l?j.call(l,e)-j.call(l,n):0:i&4?-1:1;return e.compareDocumentPosition?-1:1}:function(e,n){var r,i=0,s=e.parentNode,o=n.parentNode,u=[e],a=[n];if(e===n)return k=!0,0;if(!s||!o)return e===t?-1:n===t?1:s?-1:o?1:l?j.call(l,e)-j.call(l,n):0;if(s===o)return ct(e,n);r=e;while(r=r.parentNode)u.unshift(r);r=n;while(r=r.parentNode)a.unshift(r);while(u[i]===a[i])i++;return i?ct(u[i],a[i]):u[i]===E?-1:a[i]===E?1:0},t},ot.matches=function(e,t){return ot(e,null,null,t)},ot.matchesSelector=function(e,t){(e.ownerDocument||e)!==h&&c(e),t=t.replace(J,"='$1']");if(r.matchesSelector&&d&&(!m||!m.test(t))&&(!v||!v.test(t)))try{var n=g.call(e,t);if(n||r.disconnectedMatch||e.document&&e.document.nodeType!==11)return n}catch(i){}return ot(t,h,null,[e]).length>0},ot.contains=function(e,t){return(e.ownerDocument||e)!==h&&c(e),y(e,t)},ot.attr=function(e,n){(e.ownerDocument||e)!==h&&c(e);var i=s.attrHandle[n.toLowerCase()],o=i&&M.call(s.attrHandle,n.toLowerCase())?i(e,n,!d):t;return o===t?r.attributes||!d?e.getAttribute(n):(o=e.getAttributeNode(n))&&o.specified?o.value:null:o},ot.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ot.uniqueSort=function(e){var t,n=[],i=0,s=0;k=!r.detectDuplicates,l=!r.sortStable&&e.slice(0),e.sort(L);if(k){while(t=e[s++])t===e[s]&&(i=n.push(s));while(i--)e.splice(n[i],1)}return e},o=ot.getText=function(e){var t,n="",r=0,i=e.nodeType;if(!i)for(;t=e[r];r++)n+=o(t);else if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(i===3||i===4)return e.nodeValue;return n},s=ot.selectors={cacheLength:50,createPseudo:at,match:G,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(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),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]||ot.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]&&ot.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return G.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&K.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).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("(^|"+I+")"+e+"("+I+"|$)"))&&T(e,function(e){return t.test(typeof e.className=="string"&&e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ot.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[b]||(m[b]={}),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[b]||(t[b]={}))[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[b]||(c[b]={}))[e]=[S,h]);if(c===t)break}return h-=i,h===r||h%r===0&&h/r>=0}}},PSEUDO:function(e,t){var n,r=s.pseudos[e]||s.setFilters[e.toLowerCase()]||ot.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],s.setFilters.hasOwnProperty(e.toLowerCase())?at(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=j.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:at(function(e){var t=[],n=[],r=a(e.replace(W,"$1"));return r[b]?at(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:at(function(e){return function(t){return ot(e,t).length>0}}),contains:at(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:at(function(e){return Q.test(e||"")||ot.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=d?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===p},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.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.nodeName>"@"||e.nodeType===3||e.nodeType===4)return!1;return!0},parent:function(e){return!s.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.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()===e.type)},first:dt(function(){return[0]}),last:dt(function(e,t){return[t-1]}),eq:dt(function(e,t,n){return[n<0?n+t:n]}),even:dt(function(e,t){var n=0;for(;n<t;n+=2)e.push(n);return e}),odd:dt(function(e,t){var n=1;for(;n<t;n+=2)e.push(n);return e}),lt:dt(function(e,t,n){var r=n<0?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:dt(function(e,t,n){var r=n<0?n+t:n;for(;++r<t;)e.push(r);return e})}},s.pseudos.nth=s.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})s.pseudos[n]=ht(n);for(n in{submit:!0,reset:!0})s.pseudos[n]=pt(n);vt.prototype=s.filters=s.pseudos,s.setFilters=new vt,a=ot.compile=function(e,t){var n,r=[],i=[],s=C[e+" "];if(!s){t||(t=mt(e)),n=t.length;while(n--)s=St(t[n]),s[b]?r.push(s):i.push(s);s=C(e,xt(i,r))}return s},r.sortStable=b.split("").sort(L).join("")===b,r.detectDuplicates=k,c(),r.sortDetached=ft(function(e){return e.compareDocumentPosition(h.createElement("div"))&1}),ft(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild.getAttribute("href")==="#"})||lt("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,t.toLowerCase()==="type"?1:2)}),(!r.attributes||!ft(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),e.firstChild.getAttribute("value")===""}))&&lt("value",function(e,t,n){if(!n&&e.nodeName.toLowerCase()==="input")return e.defaultValue}),ft(function(e){return e.getAttribute("disabled")==null})||lt(F,function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&r.specified?r.value:e[t]===!0?t.toLowerCase():null}),w.find=ot,w.expr=ot.selectors,w.expr[":"]=w.expr.pseudos,w.unique=ot.uniqueSort,w.text=ot.getText,w.isXMLDoc=ot.isXML,w.contains=ot.contains}(e);var B={};w.Callbacks=function(e){e=typeof e=="string"?B[e]||j(e):w.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){r=e.memory&&t,i=!0,o=u||0,u=0,s=a.length,n=!0;for(;a&&o<s;o++)if(a[o].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,a&&(f?f.length&&l(f.shift()):r?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function i(t){w.each(t,function(t,n){var r=w.type(n);r==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&r!=="string"&&i(n)})})(arguments),n?s=a.length:r&&(u=t,l(r))}return this},remove:function(){return a&&w.each(arguments,function(e,t){var r;while((r=w.inArray(t,a,r))>-1)a.splice(r,1),n&&(r<=s&&s--,r<=o&&o--)}),this},has:function(e){return e?w.inArray(e,a)>-1:!!a&&!!a.length},empty:function(){return a=[],s=0,this},disable:function(){return a=f=r=t,this},disabled:function(){return!a},lock:function(){return f=t,r||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return a&&(!i||f)&&(t=t||[],t=[e,t.slice?t.slice():t],n?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},w.extend({Deferred:function(e){var t=[["resolve","done",w.Callbacks("once memory"),"resolved"],["reject","fail",w.Callbacks("once memory"),"rejected"],["notify","progress",w.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return w.Deferred(function(n){w.each(t,function(t,s){var o=s[0],u=w.isFunction(e[t])&&e[t];i[s[1]](function(){var e=u&&u.apply(this,arguments);e&&w.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+"With"](this===r?n.promise():this,u?[e]:arguments)})}),e=null}).promise()},promise:function(e){return e!=null?w.extend(e,r):r}},i={};return r.pipe=r.then,w.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=v.call(arguments),r=n.length,i=r!==1||e&&w.isFunction(e.promise)?r:0,s=i===1?e:w.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?v.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]&&w.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()}}),w.support=function(t){var n,r,s,u,a,f,l,c,h,p=o.createElement("div");p.setAttribute("className","t"),p.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*")||[],r=p.getElementsByTagName("a")[0];if(!r||!r.style||!n.length)return t;u=o.createElement("select"),f=u.appendChild(o.createElement("option")),s=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute=p.className!=="t",t.leadingWhitespace=p.firstChild.nodeType===3,t.tbody=!p.getElementsByTagName("tbody").length,t.htmlSerialize=!!p.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized=r.getAttribute("href")==="/a",t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!s.value,t.optSelected=f.selected,t.enctype=!!o.createElement("form").enctype,t.html5Clone=o.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,s.checked=!0,t.noCloneChecked=s.cloneNode(!0).checked,u.disabled=!0,t.optDisabled=!f.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}s=o.createElement("input"),s.setAttribute("value",""),t.input=s.getAttribute("value")==="",s.value="t",s.setAttribute("type","radio"),t.radioValue=s.value==="t",s.setAttribute("checked","t"),s.setAttribute("name","t"),a=o.createDocumentFragment(),a.appendChild(s),t.appendChecked=s.checked,t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,p.attachEvent&&(p.attachEvent("onclick",function(){t.noCloneEvent=!1}),p.cloneNode(!0).click());for(h in{submit:!0,change:!0,focusin:!0})p.setAttribute(l="on"+h,"t"),t[h+"Bubbles"]=l in e||p.attributes[l].expando===!1;p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle=p.style.backgroundClip==="content-box";for(h in w(t))break;return t.ownLast=h!=="0",w(function(){var n,r,s,u="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",a=o.getElementsByTagName("body")[0];if(!a)return;n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(p),p.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=p.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,p.innerHTML="",p.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",w.swap(a,a.style.zoom!=null?{zoom:1}:{},function(){t.boxSizing=p.offsetWidth===4}),e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(p,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(p,null)||{width:"4px"}).width==="4px",r=p.appendChild(o.createElement("div")),r.style.cssText=p.style.cssText=u,r.style.marginRight=r.style.width="0",p.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof p.style.zoom!==i&&(p.innerHTML="",p.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.innerHTML="<div></div>",p.firstChild.style.width="5px",t.shrinkWrapBlocks=p.offsetWidth!==3,t.inlineBlockNeedsLayout&&(a.style.zoom=1)),a.removeChild(n),n=p=s=r=null}),n=u=a=f=r=s=null,t}({});var F=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;w.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?w.cache[e[w.expando]]:e[w.expando],!!e&&!z(e)},data:function(e,t,n){return q(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return q(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&e.nodeType!==1&&e.nodeType!==9)return!1;var t=e.nodeName&&w.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),w.fn.extend({data:function(e,n){var r,i,s=null,o=0,u=this[0];if(e===t){if(this.length){s=w.data(u);if(u.nodeType===1&&!w._data(u,"parsedAttrs")){r=u.attributes;for(;o<r.length;o++)i=r[o].name,i.indexOf("data-")===0&&(i=w.camelCase(i.slice(5)),U(u,i,s[i]));w._data(u,"parsedAttrs",!0)}}return s}return typeof e=="object"?this.each(function(){w.data(this,e)}):arguments.length>1?this.each(function(){w.data(this,e,n)}):u?U(u,e,w.data(u,e)):null},removeData:function(e){return this.each(function(){w.removeData(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=w._data(e,t),n&&(!r||w.isArray(n)?r=w._data(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),s=w._queueHooks(e,t),o=function(){w.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 w._data(e,n)||w._data(e,n,{empty:w.Callbacks("once memory").add(function(){w._removeData(e,t+"queue"),w._removeData(e,n)})})}}),w.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?w.queue(this[0],e):n===t?this:this.each(function(){var t=w.queue(this,e,n);w._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},delay:function(e,t){return e=w.fx?w.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=w.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=w._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var W,X,V=/[\t\r\n\f]/g,$=/\r/g,J=/^(?:input|select|textarea|button|object)$/i,K=/^(?:a|area)$/i,Q=/^(?:checked|selected)$/i,G=w.support.getSetAttribute,Y=w.support.input;w.fn.extend({attr:function(e,t){return w.access(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})},prop:function(e,t){return w.access(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return e=w.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=typeof e=="string"&&e;if(w.isFunction(e))return this.each(function(t){w(this).addClass(e.call(this,t,this.className))});if(a){t=(e||"").match(S)||[];for(;o<u;o++){n=this[o],r=n.nodeType===1&&(n.className?(" "+n.className+" ").replace(V," "):" ");if(r){s=0;while(i=t[s++])r.indexOf(" "+i+" ")<0&&(r+=i+" ");n.className=w.trim(r)}}}return this},removeClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=arguments.length===0||typeof e=="string"&&e;if(w.isFunction(e))return this.each(function(t){w(this).removeClass(e.call(this,t,this.className))});if(a){t=(e||"").match(S)||[];for(;o<u;o++){n=this[o],r=n.nodeType===1&&(n.className?(" "+n.className+" ").replace(V," "):"");if(r){s=0;while(i=t[s++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?w.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e;return typeof t=="boolean"&&n==="string"?t?this.addClass(e):this.removeClass(e):w.isFunction(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var t,r=0,s=w(this),o=e.match(S)||[];while(t=o[r++])s.hasClass(t)?s.removeClass(t):s.addClass(t)}else if(n===i||n==="boolean")this.className&&w._data(this,"__className__",this.className),this.className=this.className||e===!1?"":w._data(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(V," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return r=w.valHooks[s.type]||w.valHooks[s.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(s,"value"))!==t?n:(n=s.value,typeof n=="string"?n.replace($,""):n==null?"":n);return}return i=w.isFunction(e),this.each(function(n){var s;if(this.nodeType!==1)return;i?s=e.call(this,n,w(this).val()):s=e,s==null?s="":typeof s=="number"?s+="":w.isArray(s)&&(s=w.map(s,function(e){return e==null?"":e+""})),r=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()];if(!r||!("set"in r)||r.set(this,s,"value")===t)this.value=s})}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return t!=null?t:e.text}},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)&&(w.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!w.nodeName(n.parentNode,"optgroup"))){t=w(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n,r,i=e.options,s=w.makeArray(t),o=i.length;while(o--){r=i[o];if(r.selected=w.inArray(w(r).val(),s)>=0)n=!0}return n||(e.selectedIndex=-1),s}}},attr:function(e,n,r){var s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;if(typeof e.getAttribute===i)return w.prop(e,n,r);if(u!==1||!w.isXMLDoc(e))n=n.toLowerCase(),s=w.attrHooks[n]||(w.expr.match.bool.test(n)?X:W);if(r===t)return s&&"get"in s&&(o=s.get(e,n))!==null?o:(o=w.find.attr(e,n),o==null?t:o);if(r!==null)return s&&"set"in s&&(o=s.set(e,r,n))!==t?o:(e.setAttribute(n,r+""),r);w.removeAttr(e,n)},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(S);if(s&&e.nodeType===1)while(n=s[i++])r=w.propFix[n]||n,w.expr.match.bool.test(n)?Y&&G||!Q.test(n)?e[r]=!1:e[w.camelCase("default-"+n)]=e[r]=!1:w.attr(e,n,""),e.removeAttribute(G?n:r)},attrHooks:{type:{set:function(e,t){if(!w.support.radioValue&&t==="radio"&&w.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!w.isXMLDoc(e),o&&(n=w.propFix[n]||n,s=w.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):J.test(e.nodeName)||K.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?w.removeAttr(e,n):Y&&G||!Q.test(n)?e.setAttribute(!G&&w.propFix[n]||n,n):e[w.camelCase("default-"+n)]=e[n]=!0,n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,n){var r=w.expr.attrHandle[n]||w.find.attr;w.expr.attrHandle[n]=Y&&G||!Q.test(n)?function(e,n,i){var s=w.expr.attrHandle[n],o=i?t:(w.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return w.expr.attrHandle[n]=s,o}:function(e,n,r){return r?t:e[w.camelCase("default-"+n)]?n.toLowerCase():null}});if(!Y||!G)w.attrHooks.value={set:function(e,t,n){if(!w.nodeName(e,"input"))return W&&W.set(e,t,n);e.defaultValue=t}};G||(W={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="",r==="value"||n===e.getAttribute(r)?n:t}},w.expr.attrHandle.id=w.expr.attrHandle.name=w.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.value!==""?i.value:null},w.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:W.set},w.attrHooks.contenteditable={set:function(e,t,n){W.set(e,t===""?!1:t,n)}},w.each(["width","height"],function(e,t){w.attrHooks[t]={set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}}})),w.support.hrefNormalized||w.each(["href","src"],function(e,t){w.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),w.support.style||(w.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),w.support.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this}),w.support.enctype||(w.propFix.enctype="encoding"),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(w.isArray(t))return e.checked=w.inArray(w(e).val(),t)>=0}},w.support.checkOn||(w.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;w.event={global:{},add:function(e,n,r,s,o){var u,a,f,l,c,h,p,d,v,m,g,y=w._data(e);if(!y)return;r.handler&&(l=r,r=l.handler,o=l.selector),r.guid||(r.guid=w.guid++),(a=y.events)||(a=y.events={}),(h=y.handle)||(h=y.handle=function(e){return typeof w===i||!!e&&w.event.triggered===e.type?t:w.event.dispatch.apply(h.elem,arguments)},h.elem=e),n=(n||"").match(S)||[""],f=n.length;while(f--){u=rt.exec(n[f])||[],v=g=u[1],m=(u[2]||"").split(".").sort();if(!v)continue;c=w.event.special[v]||{},v=(o?c.delegateType:c.bindType)||v,c=w.event.special[v]||{},p=w.extend({type:v,origType:g,data:s,handler:r,guid:r.guid,selector:o,needsContext:o&&w.expr.match.needsContext.test(o),namespace:m.join(".")},l);if(!(d=a[v])){d=a[v]=[],d.delegateCount=0;if(!c.setup||c.setup.call(e,s,m,h)===!1)e.addEventListener?e.addEventListener(v,h,!1):e.attachEvent&&e.attachEvent("on"+v,h)}c.add&&(c.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),o?d.splice(d.delegateCount++,0,p):d.push(p),w.event.global[v]=!0}e=null},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=w.hasData(e)&&w._data(e);if(!m||!(l=m.events))return;t=(t||"").match(S)||[""],f=t.length;while(f--){u=rt.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort();if(!p){for(p in l)w.event.remove(e,p+t[f],n,r,!0);continue}c=w.event.special[p]||{},p=(r?c.delegateType:c.bindType)||p,h=l[p]||[],u=u[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=s=h.length;while(s--)o=h[s],(i||v===o.origType)&&(!n||n.guid===o.guid)&&(!u||u.test(o.namespace))&&(!r||r===o.selector||r==="**"&&o.selector)&&(h.splice(s,1),o.selector&&h.delegateCount--,c.remove&&c.remove.call(e,o));a&&!h.length&&((!c.teardown||c.teardown.call(e,d,m.handle)===!1)&&w.removeEvent(e,p,m.handle),delete l[p])}w.isEmptyObject(l)&&(delete m.handle,w._removeData(e,"events"))},trigger:function(n,r,i,s){var u,a,f,l,c,h,p,d=[i||o],v=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];f=h=i=i||o;if(i.nodeType===3||i.nodeType===8)return;if(nt.test(v+w.event.triggered))return;v.indexOf(".")>=0&&(m=v.split("."),v=m.shift(),m.sort()),a=v.indexOf(":")<0&&"on"+v,n=n[w.expando]?n:new w.Event(v,typeof n=="object"&&n),n.isTrigger=s?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=r==null?[n]:w.makeArray(r,[n]),c=w.event.special[v]||{};if(!s&&c.trigger&&c.trigger.apply(i,r)===!1)return;if(!s&&!c.noBubble&&!w.isWindow(i)){l=c.delegateType||v,nt.test(l+v)||(f=f.parentNode);for(;f;f=f.parentNode)d.push(f),h=f;h===(i.ownerDocument||o)&&d.push(h.defaultView||h.parentWindow||e)}p=0;while((f=d[p++])&&!n.isPropagationStopped())n.type=p>1?l:c.bindType||v,u=(w._data(f,"events")||{})[n.type]&&w._data(f,"handle"),u&&u.apply(f,r),u=a&&f[a],u&&w.acceptData(f)&&u.apply&&u.apply(f,r)===!1&&n.preventDefault();n.type=v;if(!s&&!n.isDefaultPrevented()&&(!c._default||c._default.apply(d.pop(),r)===!1)&&w.acceptData(i)&&a&&i[v]&&!w.isWindow(i)){h=i[a],h&&(i[a]=null),w.event.triggered=v;try{i[v]()}catch(g){}w.event.triggered=t,h&&(i[a]=h)}return n.result},dispatch:function(e){e=w.event.fix(e);var n,r,i,s,o,u=[],a=v.call(arguments),f=(w._data(this,"events")||{})[e.type]||[],l=w.event.special[e.type]||{};a[0]=e,e.delegateTarget=this;if(l.preDispatch&&l.preDispatch.call(this,e)===!1)return;u=w.event.handlers.call(this,e,f),n=0;while((s=u[n++])&&!e.isPropagationStopped()){e.currentTarget=s.elem,o=0;while((i=s.handlers[o++])&&!e.isImmediatePropagationStopped())if(!e.namespace_re||e.namespace_re.test(i.namespace))e.handleObj=i,e.data=i.data,r=((w.event.special[i.origType]||{}).handle||i.handler).apply(s.elem,a),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation())}return l.postDispatch&&l.postDispatch.call(this,e),e.result},handlers:function(e,n){var r,i,s,o,u=[],a=n.delegateCount,f=e.target;if(a&&f.nodeType&&(!e.button||e.type!=="click"))for(;f!=this;f=f.parentNode||this)if(f.nodeType===1&&(f.disabled!==!0||e.type!=="click")){s=[];for(o=0;o<a;o++)i=n[o],r=i.selector+" ",s[r]===t&&(s[r]=i.needsContext?w(r,this).index(f)>=0:w.find(r,this,null,[f]).length),s[r]&&s.push(i);s.length&&u.push({elem:f,handlers:s})}return a<n.length&&u.push({elem:this,handlers:n.slice(a)}),u},fix:function(e){if(e[w.expando])return e;var t,n,r,i=e.type,s=e,u=this.fixHooks[i];u||(this.fixHooks[i]=u=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=u.props?this.props.concat(u.props):this.props,e=new w.Event(s),t=r.length;while(t--)n=r[t],e[n]=s[n];return e.target||(e.target=s.srcElement||o),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,u.filter?u.filter(e,s):e},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 fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,s,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(i=e.target.ownerDocument||o,s=i.documentElement,r=i.body,e.pageX=n.clientX+(s&&s.scrollLeft||r&&r.scrollLeft||0)-(s&&s.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||r&&r.scrollTop||0)-(s&&s.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ot()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===ot()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(w.nodeName(this,"input")&&this.type==="checkbox"&&this.click)return this.click(),!1},_default:function(e){return w.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=w.extend(new w.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?w.event.trigger(i,null,t):w.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},w.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:st):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||w.now(),this[w.expando]=!0},w.Event.prototype={isDefaultPrevented:st,isPropagationStopped:st,isImmediatePropagationStopped:st,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},w.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;if(!i||i!==r&&!w.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),w.support.submitBubbles||(w.event.special.submit={setup:function(){if(w.nodeName(this,"form"))return!1;w.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=w.nodeName(n,"input")||w.nodeName(n,"button")?n.form:t;r&&!w._data(r,"submitBubbles")&&(w.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),w._data(r,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&w.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(w.nodeName(this,"form"))return!1;w.event.remove(this,"._submit")}}),w.support.changeBubbles||(w.event.special.change={setup:function(){if(Z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")w.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),w.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),w.event.simulate("change",this,e,!0)});return!1}w.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!w._data(t,"changeBubbles")&&(w.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&w.event.simulate("change",this.parentNode,e,!0)}),w._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return w.event.remove(this,"._change"),!Z.test(this.nodeName)}}),w.support.focusinBubbles||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){w.event.simulate(t,e.target,w.event.fix(e),!0)};w.event.special[t]={setup:function(){n++===0&&o.addEventListener(e,r,!0)},teardown:function(){--n===0&&o.removeEventListener(e,r,!0)}}}),w.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(o in e)this.on(o,n,r,e[o],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=st;else if(!i)return this;return s===1&&(u=i,i=function(e){return w().off(e),u.apply(this,arguments)},i.guid=u.guid||(u.guid=w.guid++)),this.each(function(){w.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,w(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=st),this.each(function(){w.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}});var ut=/^.[^:#\[\.,]*$/,at=/^(?:parents|prev(?:Until|All))/,ft=w.expr.match.needsContext,lt={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if(typeof e!="string")return this.pushStack(w(e).filter(function(){for(t=0;t<i;t++)if(w.contains(r[t],this))return!0}));for(t=0;t<i;t++)w.find(e,r[t],n);return n=this.pushStack(i>1?w.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=w(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(w.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ht(this,e||[],!0))},filter:function(e){return this.pushStack(ht(this,e||[],!1))},is:function(e){return!!ht(this,typeof e=="string"&&ft.test(e)?w(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,s=[],o=ft.test(e)||typeof e!="string"?w(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&&w.find.matchesSelector(n,e))){n=s.push(n);break}return this.pushStack(s.length>1?w.unique(s):s)},index:function(e){return e?typeof e=="string"?w.inArray(this[0],w(e)):w.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?w(e,t):w.makeArray(e&&e.nodeType?[e]:e),r=w.merge(this.get(),n);return this.pushStack(w.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),w.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return w.dir(e,"parentNode")},parentsUntil:function(e,t,n){return w.dir(e,"parentNode",n)},next:function(e){return ct(e,"nextSibling")},prev:function(e){return ct(e,"previousSibling")},nextAll:function(e){return w.dir(e,"nextSibling")},prevAll:function(e){return w.dir(e,"previousSibling")},nextUntil:function(e,t,n){return w.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return w.dir(e,"previousSibling",n)},siblings:function(e){return w.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return w.sibling(e.firstChild)},contents:function(e){return w.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:w.merge([],e.childNodes)}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return e.slice(-5)!=="Until"&&(r=n),r&&typeof r=="string"&&(i=w.filter(r,i)),this.length>1&&(lt[e]||(i=w.unique(i)),at.test(e)&&(i=i.reverse())),this.pushStack(i)}}),w.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),t.length===1&&r.nodeType===1?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return e.nodeType===1}))},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!w(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var dt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",vt=/ jQuery\d+="(?:null|\d+)"/g,mt=new RegExp("<(?:"+dt+")[\\s/>]","i"),gt=/^\s+/,yt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,wt=/<tbody/i,Et=/<|&#?\w+;/,St=/<(?:script|style|link)/i,xt=/^(?:checkbox|radio)$/i,Tt=/checked\s*(?:[^=]|=\s*.checked.)/i,Nt=/^$|\/(?:java|ecma)script/i,Ct=/^true\/(.*)/,kt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Lt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:w.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},At=pt(o),Ot=At.appendChild(o.createElement("div"));Lt.optgroup=Lt.option,Lt.tbody=Lt.tfoot=Lt.colgroup=Lt.caption=Lt.thead,Lt.th=Lt.td,w.fn.extend({text:function(e){return w.access(this,function(e){return e===t?w.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(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=Mt(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=Mt(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?w.filter(e,this):this,i=0;for(;(n=r[i])!=null;i++)!t&&n.nodeType===1&&w.cleanData(jt(n)),n.parentNode&&(t&&w.contains(n.ownerDocument,n)&&Pt(jt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&w.cleanData(jt(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&w.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return w.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(vt,""):t;if(typeof e=="string"&&!St.test(e)&&(w.support.htmlSerialize||!mt.test(e))&&(w.support.leadingWhitespace||!gt.test(e))&&!Lt[(bt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(yt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(w.cleanData(jt(n,!1)),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=w.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),w(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=p.apply([],e);var r,i,s,o,u,a,f=0,l=this.length,c=this,h=l-1,d=e[0],v=w.isFunction(d);if(v||!(l<=1||typeof d!="string"||w.support.checkClone||!Tt.test(d)))return this.each(function(r){var i=c.eq(r);v&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(l){a=w.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=a.firstChild,a.childNodes.length===1&&(a=r);if(r){o=w.map(jt(a,"script"),_t),s=o.length;for(;f<l;f++)i=a,f!==h&&(i=w.clone(i,!0,!0),s&&w.merge(o,jt(i,"script"))),t.call(this[f],i,f);if(s){u=o[o.length-1].ownerDocument,w.map(o,Dt);for(f=0;f<s;f++)i=o[f],Nt.test(i.type||"")&&!w._data(i,"globalEval")&&w.contains(u,i)&&(i.src?w._evalUrl(i.src):w.globalEval((i.text||i.textContent||i.innerHTML||"").replace(kt,"")))}a=r=null}}return this}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){var n,r=0,i=[],s=w(e),o=s.length-1;for(;r<=o;r++)n=r===o?this:this.clone(!0),w(s[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}}),w.extend({clone:function(e,t,n){var r,i,s,o,u,a=w.contains(e.ownerDocument,e);w.support.html5Clone||w.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(Ot.innerHTML=e.outerHTML,Ot.removeChild(s=Ot.firstChild));if((!w.support.noCloneEvent||!w.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!w.isXMLDoc(e)){r=jt(s),u=jt(e);for(o=0;(i=u[o])!=null;++o)r[o]&&Bt(i,r[o])}if(t)if(n){u=u||jt(e),r=r||jt(s);for(o=0;(i=u[o])!=null;o++)Ht(i,r[o])}else Ht(e,s);return r=jt(s,"script"),r.length>0&&Pt(r,!a&&jt(e,"script")),r=u=i=null,s},buildFragment:function(e,t,n,r){var i,s,o,u,a,f,l,c=e.length,h=pt(t),p=[],d=0;for(;d<c;d++){s=e[d];if(s||s===0)if(w.type(s)==="object")w.merge(p,s.nodeType?[s]:s);else if(!Et.test(s))p.push(t.createTextNode(s));else{u=u||h.appendChild(t.createElement("div")),a=(bt.exec(s)||["",""])[1].toLowerCase(),l=Lt[a]||Lt._default,u.innerHTML=l[1]+s.replace(yt,"<$1></$2>")+l[2],i=l[0];while(i--)u=u.lastChild;!w.support.leadingWhitespace&&gt.test(s)&&p.push(t.createTextNode(gt.exec(s)[0]));if(!w.support.tbody){s=a==="table"&&!wt.test(s)?u.firstChild:l[1]==="<table>"&&!wt.test(s)?u:0,i=s&&s.childNodes.length;while(i--)w.nodeName(f=s.childNodes[i],"tbody")&&!f.childNodes.length&&s.removeChild(f)}w.merge(p,u.childNodes),u.textContent="";while(u.firstChild)u.removeChild(u.firstChild);u=h.lastChild}}u&&h.removeChild(u),w.support.appendChecked||w.grep(jt(p,"input"),Ft),d=0;while(s=p[d++]){if(r&&w.inArray(s,r)!==-1)continue;o=w.contains(s.ownerDocument,s),u=jt(h.appendChild(s),"script"),o&&Pt(u);if(n){i=0;while(s=u[i++])Nt.test(s.type||"")&&n.push(s)}}return u=null,h},cleanData:function(e,t){var n,r,s,o,u=0,a=w.expando,f=w.cache,l=w.support.deleteExpando,h=w.event.special;for(;(n=e[u])!=null;u++)if(t||w.acceptData(n)){s=n[a],o=s&&f[s];if(o){if(o.events)for(r in o.events)h[r]?w.event.remove(n,r):w.removeEvent(n,r,o.handle);f[s]&&(delete f[s],l?delete n[a]:typeof n.removeAttribute!==i?n.removeAttribute(a):n[a]=null,c.push(s))}}},_evalUrl:function(e){return w.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),w.fn.extend({wrapAll:function(e){if(w.isFunction(e))return this.each(function(t){w(this).wrapAll(e.call(this,t))});if(this[0]){var t=w(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return w.isFunction(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=w.isFunction(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){w.nodeName(this,"body")||w(this).replaceWith(this.childNodes)}).end()}});var It,qt,Rt,Ut=/alpha\([^)]*\)/i,zt=/opacity\s*=\s*([^)]*)/,Wt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Vt=/^margin/,$t=new RegExp("^("+E+")(.*)$","i"),Jt=new RegExp("^("+E+")(?!px)[a-z%]+$","i"),Kt=new RegExp("^([+-])=("+E+")","i"),Qt={BODY:"block"},Gt={position:"absolute",visibility:"hidden",display:"block"},Yt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];w.fn.extend({css:function(e,n){return w.access(this,function(e,n,r){var i,s,o={},u=0;if(w.isArray(n)){s=qt(e),i=n.length;for(;u<i;u++)o[n[u]]=w.css(e,n[u],!1,s);return o}return r!==t?w.style(e,n,r):w.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return typeof e=="boolean"?e?this.show():this.hide():this.each(function(){nn(this)?w(this).show():w(this).hide()})}}),w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Rt(e,"opacity");return n===""?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":w.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=w.camelCase(n),f=e.style;n=w.cssProps[a]||(w.cssProps[a]=tn(f,a)),u=w.cssHooks[n]||w.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=Kt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(w.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!w.cssNumber[a]&&(r+="px"),!w.support.clearCloneStyle&&r===""&&n.indexOf("background")===0&&(f[n]="inherit");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=w.camelCase(n);return n=w.cssProps[a]||(w.cssProps[a]=tn(e.style,a)),u=w.cssHooks[n]||w.cssHooks[a],u&&"get"in u&&(o=u.get(e,!0,r)),o===t&&(o=Rt(e,n,i)),o==="normal"&&n in Yt&&(o=Yt[n]),r===""||r?(s=parseFloat(o),r===!0||w.isNumeric(s)?s||0:o):o}}),e.getComputedStyle?(qt=function(t){return e.getComputedStyle(t,null)},Rt=function(e,n,r){var i,s,o,u=r||qt(e),a=u?u.getPropertyValue(n)||u[n]:t,f=e.style;return u&&(a===""&&!w.contains(e.ownerDocument,e)&&(a=w.style(e,n)),Jt.test(a)&&Vt.test(n)&&(i=f.width,s=f.minWidth,o=f.maxWidth,f.minWidth=f.maxWidth=f.width=a,a=u.width,f.width=i,f.minWidth=s,f.maxWidth=o)),a}):o.documentElement.currentStyle&&(qt=function(e){return e.currentStyle},Rt=function(e,n,r){var i,s,o,u=r||qt(e),a=u?u[n]:t,f=e.style;return a==null&&f&&f[n]&&(a=f[n]),Jt.test(a)&&!Wt.test(n)&&(i=f.left,s=e.runtimeStyle,o=s&&s.left,o&&(s.left=e.currentStyle.left),f.left=n==="fontSize"?"1em":a,a=f.pixelLeft+"px",f.left=i,o&&(s.left=o)),a===""?"auto":a}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&Xt.test(w.css(e,"display"))?w.swap(e,Gt,function(){return un(e,t,r)}):un(e,t,r)},set:function(e,n,r){var i=r&&qt(e);return sn(e,n,r?on(e,t,r,w.support.boxSizing&&w.css(e,"boxSizing",!1,i)==="border-box",i):0)}}}),w.support.opacity||(w.cssHooks.opacity={get:function(e,t){return zt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=w.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if((t>=1||t==="")&&w.trim(s.replace(Ut,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(t===""||r&&!r.filter)return}n.filter=Ut.test(s)?s.replace(Ut,i):s+" "+i}}),w(function(){w.support.reliableMarginRight||(w.cssHooks.marginRight={get:function(e,t){if(t)return w.swap(e,{display:"inline-block"},Rt,[e,"marginRight"])}}),!w.support.pixelPosition&&w.fn.position&&w.each(["top","left"],function(e,t){w.cssHooks[t]={get:function(e,n){if(n)return n=Rt(e,t),Jt.test(n)?w(e).position()[t]+"px":n}}})}),w.expr&&w.expr.filters&&(w.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!w.support.reliableHiddenOffsets&&(e.style&&e.style.display||w.css(e,"display"))==="none"},w.expr.filters.visible=function(e){return!w.expr.filters.hidden(e)}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){var r=0,i={},s=typeof n=="string"?n.split(" "):[n];for(;r<4;r++)i[e+Zt[r]+t]=s[r]||s[r-2]||s[0];return i}},Vt.test(e)||(w.cssHooks[e+t].set=sn)});var ln=/%20/g,cn=/\[\]$/,hn=/\r?\n/g,pn=/^(?:submit|button|image|reset|file)$/i,dn=/^(?:input|select|textarea|keygen)/i;w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&dn.test(this.nodeName)&&!pn.test(e)&&(this.checked||!xt.test(e))}).map(function(e,t){var n=w(this).val();return n==null?null:w.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(hn,"\r\n")}}):{name:t.name,value:n.replace(hn,"\r\n")}}).get()}}),w.param=function(e,n){var r,i=[],s=function(e,t){t=w.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=w.ajaxSettings&&w.ajaxSettings.traditional);if(w.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){s(this.name,this.value)});else for(r in e)vn(r,e[r],n,s);return i.join("&").replace(ln,"+")},w.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){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.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 mn,gn,yn=w.now(),bn=/\?/,wn=/#.*$/,En=/([?&])_=[^&]*/,Sn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,xn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Tn=/^(?:GET|HEAD)$/,Nn=/^\/\//,Cn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,kn=w.fn.load,Ln={},An={},On="*/".concat("*");try{gn=s.href}catch(Mn){gn=o.createElement("a"),gn.href="",gn=gn.href}mn=Cn.exec(gn.toLowerCase())||[],w.fn.load=function(e,n,r){if(typeof e!="string"&&kn)return kn.apply(this,arguments);var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),w.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(o="POST"),u.length>0&&w.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){s=arguments,u.html(i?w("<div>").append(w.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){u.each(r,s||[e.responseText,t,e])}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:gn,type:"GET",isLocal:xn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":On,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":w.parseJSON,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Pn(Pn(e,w.ajaxSettings),t):Pn(w.ajaxSettings,e)},ajaxPrefilter:_n(Ln),ajaxTransport:_n(An),ajax:function(e,n){function N(e,n,r,i){var l,g,y,E,S,T=n;if(b===2)return;b=2,u&&clearTimeout(u),f=t,o=i||"",x.readyState=e>0?4:0,l=e>=200&&e<300||e===304,r&&(E=Hn(c,x,r)),E=Bn(c,E,x,l);if(l)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(w.lastModified[s]=S),S=x.getResponseHeader("etag"),S&&(w.etag[s]=S)),e===204||c.type==="HEAD"?T="nocontent":e===304?T="notmodified":(T=E.state,g=E.data,y=E.error,l=!y);else{y=T;if(e||!T)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[g,T,x]):d.rejectWith(h,[x,T,y]),x.statusCode(m),m=t,a&&p.trigger(l?"ajaxSuccess":"ajaxError",[x,c,l?g:y]),v.fireWith(h,[x,T]),a&&(p.trigger("ajaxComplete",[x,c]),--w.active||w.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=w.ajaxSetup({},n),h=c.context||c,p=c.context&&(h.nodeType||h.jquery)?w(h):w.event,d=w.Deferred(),v=w.Callbacks("once memory"),m=c.statusCode||{},g={},y={},b=0,E="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(b===2){if(!l){l={};while(t=Sn.exec(o))l[t[1].toLowerCase()]=t[2]}t=l[e.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return b===2?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,g[e]=t),this},overrideMimeType:function(e){return b||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)m[t]=[m[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||E;return f&&f.abort(t),N(0,t),this}};d.promise(x).complete=v.add,x.success=x.done,x.error=x.fail,c.url=((e||c.url||gn)+"").replace(wn,"").replace(Nn,mn[1]+"//"),c.type=n.method||n.type||c.method||c.type,c.dataTypes=w.trim(c.dataType||"*").toLowerCase().match(S)||[""],c.crossDomain==null&&(r=Cn.exec(c.url.toLowerCase()),c.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||(r[1]==="http:"?"80":"443"))===(mn[3]||(mn[1]==="http:"?"80":"443")))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=w.param(c.data,c.traditional)),Dn(Ln,c,n,x);if(b===2)return x;a=c.global,a&&w.active++===0&&w.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Tn.test(c.type),s=c.url,c.hasContent||(c.data&&(s=c.url+=(bn.test(s)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=En.test(s)?s.replace(En,"$1_="+yn++):s+(bn.test(s)?"&":"?")+"_="+yn++)),c.ifModified&&(w.lastModified[s]&&x.setRequestHeader("If-Modified-Since",w.lastModified[s]),w.etag[s]&&x.setRequestHeader("If-None-Match",w.etag[s])),(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+On+"; q=0.01":""):c.accepts["*"]);for(i in c.headers)x.setRequestHeader(i,c.headers[i]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&b!==2){E="abort";for(i in{success:1,error:1,complete:1})x[i](c[i]);f=Dn(An,c,n,x);if(!f)N(-1,"No Transport");else{x.readyState=1,a&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{b=1,f.send(g,N)}catch(T){if(!(b<2))throw T;N(-1,T)}}return x}return x.abort()},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,n){return w.get(e,t,n,"script")}}),w.each(["get","post"],function(e,n){w[n]=function(e,r,i,s){return w.isFunction(r)&&(s=s||i,i=r,r=t),w.ajax({url:e,type:n,dataType:s,data:r,success:i})}}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),w.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||w("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){if(t||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var jn=[],Fn=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=jn.pop()||w.expando+"_"+yn++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.jsonp!==!1&&(Fn.test(n.url)?"url":typeof n.data=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Fn.test(n.data)&&"data");if(a||n.dataTypes[0]==="jsonp")return s=n.jsonpCallback=w.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,a?n[a]=n[a].replace(Fn,"$1"+s):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||w.error(s+" was not called"),u[0]},n.dataTypes[0]="json",o=e[s],e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,jn.push(s)),u&&w.isFunction(o)&&o(u[0]),u=o=t}),"script"});var In,qn,Rn=0,Un=e.ActiveXObject&&function(){var e;for(e in In)In[e](t,!0)};w.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&zn()||Wn()}:zn,qn=w.ajaxSettings.xhr(),w.support.cors=!!qn&&"withCredentials"in qn,qn=w.support.ajax=!!qn,qn&&w.ajaxTransport(function(n){if(!n.crossDomain||w.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=w.noop,Un&&delete In[o]);if(i)a.readyState!==4&&a.abort();else{c={},u=a.status,f=a.getAllResponseHeaders(),typeof a.responseText=="string"&&(c.text=a.responseText);try{l=a.statusText}catch(h){l=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(p){i||s(-1,p)}c&&s(u,l,c,f)},n.async?a.readyState===4?setTimeout(r):(o=++Rn,Un&&(In||(In={},w(e).unload(Un)),In[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Vn,$n=/^(?:toggle|show|hide)$/,Jn=new RegExp("^(?:([+-])=|)("+E+")([a-z%]*)$","i"),Kn=/queueHooks$/,Qn=[nr],Gn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Jn.exec(t),s=i&&i[3]||(w.cssNumber[e]?"":"px"),o=(w.cssNumber[e]||s!=="px"&&+r)&&Jn.exec(w.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,w.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}]};w.Animation=w.extend(er,{tweener:function(e,t){w.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Gn[n]=Gn[n]||[],Gn[n].unshift(t)},prefilter:function(e,t){t?Qn.unshift(e):Qn.push(e)}}),w.Tween=rr,rr.prototype={constructor:rr,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||(w.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.options.duration?this.pos=t=w.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):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=w.css(e.elem,e.prop,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):e.elem.style&&(e.elem.style[w.cssProps[e.prop]]!=null||w.cssHooks[e.prop])?w.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return e==null||typeof e=="boolean"?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),s=w.speed(t,n,r),o=function(){var t=er(this,w.extend({},e),s);(i||w._data(this,"finish"))&&t.stop(!0)};return o.finish=o,i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=w.timers,o=w._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Kn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&w.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=w._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],s=w.timers,o=r?r.length:0;n.finish=!0,w.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})}}),w.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.speed=function(e,t,n){var r=e&&typeof e=="object"?w.extend({},e):{complete:n||!n&&t||w.isFunction(e)&&e,duration:e,easing:n&&t||t&&!w.isFunction(t)&&t};r.duration=w.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in w.fx.speeds?w.fx.speeds[r.duration]:w.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){w.isFunction(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},w.timers=[],w.fx=rr.prototype.init,w.fx.tick=function(){var e,n=w.timers,r=0;Xn=w.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||w.fx.stop(),Xn=t},w.fx.timer=function(e){e()&&w.timers.push(e)&&w.fx.start()},w.fx.interval=13,w.fx.start=function(){Vn||(Vn=setInterval(w.fx.tick,w.fx.interval))},w.fx.stop=function(){clearInterval(Vn),Vn=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fx.step={},w.expr&&w.expr.filters&&(w.expr.filters.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length}),w.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){w.offset.setOffset(this,e,t)});var n,r,s={top:0,left:0},o=this[0],u=o&&o.ownerDocument;if(!u)return;return n=u.documentElement,w.contains(n,o)?(typeof o.getBoundingClientRect!==i&&(s=o.getBoundingClientRect()),r=sr(u),{top:s.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:s.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):s},w.offset={setOffset:function(e,t,n){var r=w.css(e,"position");r==="static"&&(e.style.position="relative");var i=w(e),s=i.offset(),o=w.css(e,"top"),u=w.css(e,"left"),a=(r==="absolute"||r==="fixed")&&w.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),w.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},w.fn.extend({position:function(){if(!this[0])return;var e,t,n={top:0,left:0},r=this[0];return w.css(r,"position")==="fixed"?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),w.nodeName(e[0],"html")||(n=e.offset()),n.top+=w.css(e[0],"borderTopWidth",!0),n.left+=w.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-w.css(r,"marginTop",!0),left:t.left-n.left-w.css(r,"marginLeft",!0)}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||u;while(e&&!w.nodeName(e,"html")&&w.css(e,"position")==="static")e=e.offsetParent;return e||u})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);w.fn[e]=function(i){return w.access(this,function(e,i,s){var o=sr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?w(o).scrollLeft():s,r?s:w(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),w.each({Height:"height",Width:"width"},function(e,n){w.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){w.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return w.access(this,function(n,r,i){var s;return w.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?w.css(n,r,u):w.style(n,r,i,u)},n,o?i:t,o,null)}})}),w.fn.size=function(){return this.length},w.fn.andSelf=w.fn.addBack,typeof module=="object"&&module&&typeof module.exports=="object"?module.exports=w:(e.jQuery=e.$=w,typeof define=="function"&&define.amd&&define("jquery",[],function(){return w}))}(window),define("jock/utils/string",["require","jquery"],function(e){var t=e("jquery"),n=String.prototype.trim,r=String.prototype.trimRight,i=String.prototype.trimLeft,s=function(e){return e*1||0},o=function(e){return e==null?"\\s":e.source?e.source:"["+u.escapeRegExp(e)+"]"},u={escapeRegExp:function(e){return e==null?"":String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},capitalize:function(e){return e=e==null?"":String(e),e.charAt(0).toUpperCase()+e.slice(1)},isCapitalized:function(e){e=e==null?"":String(e);if(e.length===0)return!1;var t=e.charAt(0);return t.toUpperCase()===t},isEmpty:function(e){return e==null?!0:0===e.length},isNotEmpty:function(e){return!u.isEmpty(e)},isBlank:function(e){return e==null?!0:0===t.trim(e).length},isNotBlank:function(e){return!u.isBlank(e)},startsWith:function(e,t){return t===""?!0:e==null||t==null?!1:(e=String(e),t=String(t),e.length>=t.length&&e.slice(0,t.length)===t)},endsWith:function(e,t){return t===""?!0:e==null||t==null?!1:(e=String(e),t=String(t),e.length>=t.length&&e.slice(e.length-t.length)===t)},toNumber:function(e,t){return e?(e=u.trim(e),e.match(/^-?\d+(?:\.\d+)?$/)?s(s(e).toFixed(~~t)):NaN):0},trim:function(e,t){return e==null?"":!t&&n?n.call(e):(t=o(t),String(e).replace(new RegExp("^"+t+"+|"+t+"+$","g"),""))},ltrim:function(e,t){return e==null?"":!t&&i?i.call(e):(t=o(t),String(e).replace(new RegExp("^"+t+"+"),""))},rtrim:function(e,t){return e==null?"":!t&&r?r.call(e):(t=o(t),String(e).replace(new RegExp(t+"+$"),""))},truncate:function(e,t,n){return e==null?"":(e=String(e),n=n||"...",t=~~t,e.length>t?e.slice(0,t)+n:e)},prune:function(e,t,n){if(e==null)return"";e=String(e),t=~~t,n=n!=null?String(n):"...";if(e.length<=t)return e;var r=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},i=e.slice(0,t+1).replace(/.(?=\W*\w*$)/g,r);return i.slice(i.length-2).match(/\w\w/)?i=i.replace(/\s*\S+$/,""):i=u.rtrim(i.slice(0,i.length-1)),(i+n).length>e.length?e:e.slice(0,i.length)+n}};return t.jock=t.jock||{},t.jock.string=u,u}),define("jock/globals",["require","jquery"],function(e){function n(){var e="",t={};return t.hashPrefix=function(t){if(arguments.length!==1)return e;typeof t=="string"&&(e=t)},t}var t=e("jquery"),n=n();return n}),define("jock/utils/params",["require","jquery","jock/utils/string","jock/globals"],function(e){var t=e("jquery"),n=e("jock/utils/string"),r=e("jock/globals"),i=function(){function s(e,r,i){if(n.isBlank(r))return;t.isArray(e[r])?e[r].push(i):e[r]!==undefined?e[r]=[e[r],i]:e[r]=i}var e=function(e){function o(e){for(var r in e){var i=e[r];if(t.isArray(i))for(var o=0;o<i.length;o++)s(n,r,i[o]);else s(n,r,i)}}function u(){for(var e=0;e<arguments.length;e+=2){var r=arguments[e],i=null;arguments.length>e+1&&(i=arguments[e+1]);if(t.isArray(i))for(var e=0;e<i.length;e++)s(n,r,i[e]);else s(n,r,i)}}var n;n=i(e);var r={};return r.get=function(e){if(e)return n[e];var r=t.extend({},n);return r},r.add=function(e){arguments.length===1?typeof e=="string"?s(n,e,null):o(e):arguments.length>1&&u.apply(this,arguments)},r.set=function(e){if(arguments.length===1)if(typeof e=="string")n[e]=null;else for(var t in e){var r=e[t];n[t]=r}else if(arguments.length>1)for(var i=0;i<arguments.length;i+=2){var t=arguments[i],r=null;arguments.length>i+1&&(r=arguments[i+1]),n[t]=r}},r.remove=function(e){if(arguments.length===1){e=typeof e=="string"?[e]:e;for(var t=0;t<e.length;t++)delete n[e[t]]}else if(arguments.length>1)for(var t=0;t<arguments.length;t++)delete n[arguments[t]]},r.clear=function(){n={}},r.toString=function(){var e=!0,r=t.param(n,e);return r},r.toHash=function(){return"#"+r.toString()},r},i=function(e){var n=e.params,i=r.hashPrefix()||"!",o={};return n==null?o:(n.charAt(0)==="#"&&(n=n.substr(1)),n.charAt(0)===i&&(n=n.substr(1)),t.each(n.replace(/\+/g," ").split("&"),function(e,t){var n=t.split("="),r=decodeURIComponent(n[0]),i="";n.length===2&&(i=decodeURIComponent(n[1])),s(o,r,i)}),o)};return e},s=i();return s}),define("jock/utils/url",["require","jquery","./string","./params"],function(e){function i(e,t){var e=new s(e,t);return e}function s(e,t){typeof e=="boolean"?(t=e,e=window.location.href):e=e||window.location.href,this.uri=u(e,t),this.params=null,this.hashParams=null,this.hasAuthorityPrefixUserPref=null}function o(e){return n.isNotEmpty(e)}function u(e,t){var n=u.options;typeof t=="undefined"&&(t=!0);var r=n.parser[t?"strict":"loose"].exec(e),i={},s=14;while(s--)i[n.key[s]]=r[s]||"";return i}var t=e("jquery"),n=e("./string"),r=e("./params");return s.prototype.protocol=function(e){return typeof e=="undefined"?this.uri.protocol:(this.uri.protocol=e,this)},s.prototype.userInfo=function(e){return typeof e=="undefined"?this.uri.userInfo:(this.uri.userInfo=e,this)},s.prototype.user=function(e){return typeof e=="undefined"?this.uri.user:(this.uri.user=e,this)},s.prototype.password=function(e){return typeof e=="undefined"?this.uri.password:(this.uri.password=e,this)},s.prototype.host=function(e){return typeof e=="undefined"?this.uri.host:(this.uri.host=e,this)},s.prototype.port=function(e){return typeof e=="undefined"?this.uri.port:(this.uri.port=e,this)},s.prototype.path=function(e){return typeof e=="undefined"?this.uri.path:(this.uri.path=e,this)},s.prototype.path=function(e){return typeof e=="undefined"?this.uri.path:(this.uri.path=e,this)},s.prototype.query=function(e){return typeof e=="undefined"?this.uri.query:(this.uri.query=e,this.params=null,this)},s.prototype.anchor=function(e){return this.hash(e)},s.prototype.hash=function(e){return typeof e=="undefined"?this.uri.anchor:(this.uri.anchor=e,this.hashParams=null,this)},s.prototype.param=function(e){return typeof e=="undefined"||typeof e=="string"?this.getParam(e):(this.setParam(e),this)},s.prototype.setParam=function(e){return this.ensureParamsInitialized(),this.params.set.apply(this,arguments),this},s.prototype.getParam=function(e){this.ensureParamsInitialized();if(typeof e=="undefined")return this.params.get();var n=this.params.get(e);return t.isArray(n)?n.length===0?null:n[0]:n},s.prototype.getParams=function(e){return this.ensureParamsInitialized(),typeof e=="undefined"?this.params.get():this.params.get(e)},s.prototype.addParam=function(e){return this.ensureParamsInitialized(),this.params.add.apply(this,arguments),this},s.prototype.removeParam=function(e){return this.ensureParamsInitialized(),this.params.remove.apply(this,arguments),this},s.prototype.ensureParamsInitialized=function(){if(this.params==null){var e=this.uri.query;this.params=r({params:e})}},s.prototype.hashParam=function(e){return typeof e=="undefined"||typeof e=="string"?this.getHashParam(e):(this.setHashParam(e),this)},s.prototype.setHashParam=function(e){return this.ensureHashParamsInitialized(),this.hashParams.set.apply(this,arguments),this},s.prototype.getHashParam=function(e){this.ensureHashParamsInitialized();if(typeof e=="undefined")return this.hashParams.get();var n=this.hashParams.get(e);return t.isArray(n)?n.length===0?null:n[0]:n},s.prototype.getHashParams=function(e){return this.ensureHashParamsInitialized(),typeof e=="undefined"?this.hashParams.get():this.hashParams.get(e)},s.prototype.addHashParam=function(e){return this.ensureHashParamsInitialized(),this.hashParams.add.apply(this,arguments),this},s.prototype.removeHashParam=function(e){return this.ensureHashParamsInitialized(),this.hashParams.remove.apply(this,arguments),this},s.prototype.ensureHashParamsInitialized=function(){if(this.hashParams==null){var e=this.uri.anchor;this.hashParams=r({params:e})}},s.prototype.toString=function(){var e="",t=this.protocol(),r=this.hasAuthorityPrefix(),i=this.userInfo(),s=this.host(),u=this.port(),a=this.path(),f=this.query();this.params!=null&&(f=this.params.toString());var l=this.hash();return this.hashParams!=null&&(l=this.hashParams.toString()),o(t)?(e+=t,n.endsWith(t,":")||(e+=":"),e+="//"):r&&o(s)&&(e+="//"),o(i)&&o(s)&&(e+=i,n.endsWith(i,"@")||(e+="@")),o(s)&&(e+=s,o(u)&&(e+=":"+u)),o(a)?e+=a:o(s)&&(o(f)||o(l))&&(e+="/"),o(f)&&(n.startsWith(f,"?")||(e+="?"),e+=f),o(l)&&(n.startsWith(l,"#")||(e+="#"),e+=l),e},s.prototype.hasAuthorityPrefix=function(e){return typeof e=="undefined"?this.hasAuthorityPrefixUserPref===null?this.uri.source.indexOf("//")!==-1:this.hasAuthorityPrefixUserPref:(this.hasAuthorityPrefixUserPref=e,this)},u.options={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],query:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},t.jock=t.jock||{},t.jock.url=i,t.jock.url}),define("jock/utils/utils",["require","jquery"],function(e){function n(){t.jock=t.jock||{},this.toJson=function(e,t){var n=this.toObject(e,t),r=JSON.stringify(n);return r},this.fromJson=function(e,t,n){var r=JSON.parse(t);return this.fromObject(e,r,n),t},this.toObject=function(e,n){n=n||{};var r=e,i;typeof e=="string"&&(r=t(e)),n.includeDisabled===!0&&(i=r.find(":input:disabled").removeAttr("disabled"));var s={},o=r.serializeArray();return t.each(o,function(){s[this.name]?(s[this.name].push||(s[this.name]=[s[this.name]]),s[this.name].push(this.value||"")):s[this.name]=this.value||""}),n.includeDisabled===!0&&i.attr("disabled","disabled"),s},this.fromObject=function(e,n,r){r=r||{};var i=e,s;r.includeDisabled===!0&&(s=i.find(":input:disabled").removeAttr("disabled")),typeof e=="string"&&(i=t(e)),i.deserialize(n),r.includeDisabled===!0&&s.attr("disabled","disabled")},this.exist=function(e){return typeof e=="undefined"||e===null?!1:!0},this.isEmpty=function(e){return this.exist(e)?0===e.length:!0},this.isBlank=function(e){return this.exist(e)?0===t.trim(e).length:!0},this.getFunctionName=function(e){if(typeof e=="string")return e;if(e.name)return e.name;var t=/function (.{1,})\(/,n=t.exec(e.constructor.toString());return n&&n.length>1?n[1]:""},this.objectSize=function(e){if(Object.keys)return Object.keys(e).length;var t=0,n;for(n in e)e.hasOwnProperty(n)&&t++}}var t=e("jquery"),r=new n;return t.jock.toObject=r.toObject,t.jock.fromObject=r.fromObject,t.jock.toJson=r.toJson,t.jock.fromJson=r.fromJson,t.fn.toObject?console.warn("There is already a jQuery plugin called 'toObject'. Jock won't override this plugin, instead use $.jock.toObject"):t.fn.toObject=function(e){return r.toObject(this,e)},t.fn.fromObject?console.warn("There is already a jQuery plugin called 'fromObject'. Jock won't override this plugin, instead use $.jock.fromObject"):t.fn.fromObject=function(e,t){return r.fromObject(this,e,t),this},t.fn.toJson?console.warn("There is already a jQuery plugin called 'toJson'. Jock won't override this plugin, instead use $.jock.toJson"):t.fn.toJson=function(e){return r.toJson(this,e)},t.fn.fromJson?console.warn("There is already a jQuery plugin called 'fromJson'. Jock won't override this plugin, instead use $.jock.fromJson"):t.fn.fromJson=function(e,t){return r.fromJson(this,e,t),this},r}),function(e){typeof define=="function"&&define.amd?define("jock/utils/error-utils",["jquery"],e):e(jQuery)}(function(e){return e.jock=e.jock||{},e.jock.showError=function(t,n){function o(){e(".overlay").show(),e("#errorDialog").show(),a(e("#errorDialog")),f(e("#errorDialog"))}function u(){e(".overlay").hide(),e("#errorDialog").hide(),e(".overlay").off("click"),e(document).off("keydown"),e("#kv-overlay").remove(),e("#errorDialog").remove()}function a(t){var n=e(window).height(),r=e(window).width();n=n/150*100,r=r/120*100,t.css("height",Math.max(0,n)+"px"),t.css("width",Math.max(0,r)+"px")}function f(t){t.css("position","absolute");var n=t.outerHeight(),r=t.outerWidth(),i=e(window).height(),s=e(window).width(),o=(i-n)/2,u=(s-r)/2;o+=e(document).scrollTop(),u+=e(document).scrollLeft(),t.css("top",Math.max(0,o)+"px"),t.css("left",Math.max(0,u)+"px")}function l(){e("#kv-overlay").css({width:"100%",height:"100%",position:"fixed",display:"none",top:"0px",left:"0px",opacity:"0.8","background-color":"#eee"}),e("#errorHolder").css({width:"100%",height:"100%"}),e("#errorDialog").css({display:"none",opacity:"1",position:"absolute",height:"90%",width:"90%",padding:"35px",margin:"0 auto","z-index":"99","background-color":"#fff",top:"20px",left:"20px","border-radius":"10px",border:"1px solid #ccc","border-color":"#9ecaed","box-shadow":"0 0 5px 5px #ddd"}),e("#dialogFrame").css({border:"1px solid #ccc","border-radius":"10px",height:"100%",width:"100%"}),e(".close").css({position:"absolute"}),e(".bl-close").css({bottom:"5px",left:"10px"}),e(".br-close").css({bottom:"5px",right:"10px"})}n=n||"body";var r='<div id="kv-overlay" class="overlay"></div><div id="errorDialog"><div id="errorHolder"></div><div class="close bl-close"><a href="#">Close</a></div><div class="close br-close"><a href="#">Close</a></div></div>';if(e(n).length==0)return;e(r).appendTo(n);var i=e('<iframe id="dialogFrame"/>').appendTo("#errorHolder"),s=e(i).contents()[0];s.open(),s.write("<!doctype html><html><head></head><body></body></html>"),s.close(),e("#dialogFrame").contents().find("body").empty().html(t),typeof prettyPrint!="undefined"&&prettyPrint(null,e("#dialogFrame")[0].contentDocument.body),l(),o(),e(".close a").on("click",function(e){u()}),e(document).on("keydown",function(e){e.keyCode===27&&(e.preventDefault(),u())}),e(".overlay").on("click",function(e){e.preventDefault(),u()})},e.jock.extractStacktrace=function(e,t){var n="pok.js";t=t===undefined?0:t;var r,i,s;if(e.stacktrace)return e.stacktrace.split("\n")[t+3];if(e.stack){r=e.stack.split("\n"),/^error$/i.test(r[0])&&r.shift();if(n){i=[];for(s=t;s<r.length;s++){if(r[s].indexOf(n)!==-1)break;i.push(r[s])}if(i.length)return i.join("\n")}return r[t]}if(e.sourceURL){if(/qunit.js$/.test(e.sourceURL))return;return e.sourceURL+":"+e.line}},e.jock.sourceFromStacktrace=function(t){try{throw new Error}catch(n){return e.jock.extractStacktrace(n,t)}},e.jock.extractFileName=function(){var t=(e.jock.sourceFromStacktrace(0)||"").replace(/(:\d+)+\)?/,"").replace(/.+\//,"");return t},e.jock}),define("jquery.deparam",["require","jquery"],function(e){function n(e,n){var r={},i={"true":!0,"false":!1,"null":null};return t.each(e.replace(/\+/g," ").split("&"),function(e,s){var o=s.split("="),u=decodeURIComponent(o[0]),a,f=r,l=0,c=u.split("]["),h=c.length-1;/\[/.test(c[0])&&/\]$/.test(c[h])?(c[h]=c[h].replace(/\]$/,""),c=c.shift().split("[").concat(c),h=c.length-1):h=0;if(o.length===2){a=decodeURIComponent(o[1]),n&&(a=a&&!isNaN(a)?+a:a==="undefined"?undefined:i[a]!==undefined?i[a]:a);if(h)for(;l<=h;l++)u=c[l]===""?f.length:c[l],f=f[u]=l<h?f[u]||(c[l+1]&&isNaN(c[l+1])?{}:[]):a;else t.isArray(r[u])?r[u].push(a):r[u]!==undefined?r[u]=[r[u],a]:r[u]=a}else u&&(r[u]=n?undefined:"")}),r}var t=e("jquery");t.parseUrl=function(e,t){var r=e,i=e.indexOf("?");i>=0&&(r=r.substr(i+1)),i=r.indexOf("#"),i>=0&&(r=r.substr(i+1)),r=n(r,t),i=e.indexOf("#");var s=null;i>=0&&(s=e.substring(i+1),i=s.indexOf("?"),i>=0&&(s=s.substring(0,i)),i=s.indexOf("&"),i>=0&&(s=s.substring(0,i)));var o={};return o.params=r,o.hash=s,o}}),define("jquery.deserialize",["require","jquery"],function(e){function u(e){return e.map(function(){return this.elements?t.makeArray(this.elements):this}).filter(":input:not(:disabled)").get()}function a(e){var n,r={};return t.each(e,function(e,i){n=r[i.name],r[i.name]=n===undefined?i:t.isArray(n)?n.concat(i):[n,i]}),r}var t=e("jquery"),n=Array.prototype.push,r=/^(?:radio|checkbox)$/i,i=/\+/g,s=/^(?:option|select-one|select-multiple)$/i,o=/^(?:button|color|date|datetime|datetime-local|email|hidden|month|number|password|range|reset|search|submit|tel|text|textarea|time|url|week)$/i;t.fn.deserialize=function(e,f){var l,c,h=u(this),p=[];if(!e||!h.length)return this;if(t.isArray(e))p=e;else if(t.isPlainObject(e)){var d,v;for(d in e)t.isArray(v=e[d])?n.apply(p,t.map(v,function(e){return{name:d,value:e}})):n.call(p,{name:d,value:v})}else if(typeof e=="string"){var m;e=e.split("&");for(l=0,c=e.length;l<c;l++)m=e[l].split("="),n.call(p,{name:decodeURIComponent(m[0]),value:decodeURIComponent(m[1].replace(i,"%20"))})}if(!(c=p.length))return this;var g,y,b,w,E,S,x,v,T=t.noop,N=t.noop,C={};f=f||{},h=a(h),t.isFunction(f)?N=f:(T=t.isFunction(f.change)?f.change:T,N=t.isFunction(f.complete)?f.complete:N);for(l=0;l<c;l++){g=p[l],E=g.name,v=g.value;if(!(y=h[E]))continue;x=(w=y.length)?y[0]:y,x=(x.type||x.nodeName).toLowerCase(),S=null,o.test(x)?(w&&(b=C[E],y=y[C[E]=b==undefined?0:++b]),T.call(y,y.value=v)):r.test(x)?S="checked":s.test(x)&&(S="selected");if(S){w||(y=[y],w=1);for(b=0;b<w;b++)g=y[b],g.value==v&&T.call(g,(g[S]=!0)&&v)}}return N.call(this),this}}),define("jock/jock",["require","jquery","jock/utils/string","jock/utils/url","jock/utils/utils","jock/utils/error-utils","jquery.deparam","jquery.deserialize"],function(e){var t=e("jquery");t.ajaxSetup({traditional:!0}),e("jock/utils/string"),e("jock/utils/url"),e("jock/utils/utils"),e("jock/utils/error-utils"),e("jquery.deparam"),e("jquery.deserialize")}),define("jock/history/hash",["require","jquery","../utils/params","jock/globals"],function(e){var t=e("jquery"),n=e("../utils/params"),r=e("jock/globals"),i=window.history.length,s=function(e){function a(e){i(e)}function f(){var t=e.location.href.indexOf("#");return t==-1?"":e.location.href.substr(t+1)}function l(t){if(t==s)return!1;t=r.hashPrefix()+t;if(t==s)return!1;if(o)d(t);else{var n={newHash:t,oldHash:s,initial:!1,external:!1};e.location.hash=s=t,a(n)}return t}function c(){var e=f();if(e!=s){var t={newHash:e,oldHash:s,initial:!1,external:!0};s=e,a(t)}}function h(){var e="onhashchange",t=e in document.body;return t||(document.body.setAttribute(e,"return;"),t=typeof document.body[e]=="function"),t&&(document.documentMode===undefined||document.documentMode>7)}function p(){var e=document.createElement();e.innerHTML='<iframe src="javascript:void(0)" tabindex="-1" style="display: none;"></iframe>';var t=e.childNodes[0];return document.body.appendChild(t),t}function d(e){try{var t=o.contentWindow.document;t.open(),t.write("<html><body>"+e+"</body></html>"),t.close(),s=e}catch(n){setTimeout(function(){d(e)},10)}}function v(){try{o=p()}catch(t){setTimeout(v,10);return}d(s);var n=s;setInterval(function(){var t,r;try{t=o.contentWindow.document.body.innerText;if(t!=n){var i={newHash:t,oldHash:n,initial:!0,external:!1};n=t,e.location.hash=s=t,a(i)}else r=f(),r!=s&&d(r)}catch(u){}},50)}var t=document.documentMode,n=e.history,i,s,o,u=function(e){return u.ensureInitialized(),typeof e=="undefined"||typeof e=="function"?f():l(e)};return u.ensureInitialized=function(){if(i==null)throw new Error("hash not initialized! Call hash.init first!")},u.init=function(r){if(i)return;if(!r)throw new Error("hash.init requires callback!");i=r,s=f();var o={newHash:s,oldHash:s,initial:!0,external:!1};a(o),h()?e.addEventListener?e.addEventListener("hashchange",c,!1):e.attachEvent&&e.attachEvent("onhashchange",c):e.ActiveXObject?(!t||t<8)&&v():(n.navigationMode&&(n.navigationMode="compatible"),setInterval(c,50))},u.update=function(){u.ensureInitialized();var e=f(),t={newHash:e,oldHash:s,initial:!1,external:!1};s=e,a(t)},u.trigger=function(){u.ensureInitialized();var e=f(),t={newHash:e,oldHash:s,initial:!1,external:!1};a(t)},u},o=s(window);return o}),define("jock/history/history",["require","jquery","./hash","../utils/params"],function(e){var t=e("jquery"),n=e("./hash"),r=e("../utils/params"),i=null;t.jock=t.jock||{},t.jock.history=t.jock.history||{};var s=function(){function l(n){if(e.disable()){if(e.disableOnce()){e.disableOnce(!1);return}return}i=r({params:n.newHash});if(e.skipEventOnce()){e.skipEventOnce(!1);return}f&&(n.hash=i,n.prevHash=r({params:n.oldHash}),t(e).trigger("onHashChange",[n]),f(n))}function c(){if(i==null){var t=e.hash();i=r({params:t})}}var e={},s=!1,o=!1,u=!1,a=null,f;return e.hash=function(t){if(typeof t=="undefined")return n();if(e.disable())return;return n(t)},e.skipEventOnce=function(e){return typeof e=="undefined"?s:(s=e,e)},e.disableOnce=function(e){return typeof e=="undefined"?o:(o=e,a==null&&(a=u),e===!0?u=!0:(u=a,a=null),e)},e.disable=function(e){return typeof e=="undefined"?u:(u=e,a=e,e)},e.update=function(t){t=t||{},t.skipEvent===!0&&e.skipEventOnce(!0);if(e.disable()){if(e.disableOnce()){e.disableOnce(!1);return}return}if(i){var r=i.toString();n(r),i=null}},e.trigger=function(){if(e.disable())return;n.trigger()},e.params=function(t){if(typeof t=="undefined"||typeof t=="string")return c(),i.get.apply(this,arguments);if(e.disable())return;return c(),i.set.apply(this,arguments)},e.params.get=function(e){return c(),typeof e=="undefined"?i.get():i.get(e)},e.params.add=function(t){if(e.disable())return;c(),typeof t!="undefined"&&i.add.apply(this,arguments)},e.params.set=function(t){if(e.disable())return;c(),typeof t!="undefined"&&i.set.apply(this,arguments)},e.params.remove=function(t){if(e.disable())return;c(),typeof t!="undefined"&&i.remove.apply(this,arguments)},e.params.clear=function(){if(e.disable())return;c(),i.clear()},e.clear=function(){e.params.clear()},e.init=function(e){f=e,n.init(l)},e};return t.jock.history=s(),t.jock.history}),null,!function(e){function t(e,t){return function(n){return a(e.call(this,n),t)}}function n(e,t){return function(n){return this.lang().ordinal(e.call(this,n),t)}}function r(){}function i(e){o(this,e)}function s(e){var t=e.years||e.year||e.y||0,n=e.months||e.month||e.M||0,r=e.weeks||e.week||e.w||0,i=e.days||e.day||e.d||0,s=e.hours||e.hour||e.h||0,o=e.minutes||e.minute||e.m||0,u=e.seconds||e.second||e.s||0,a=e.milliseconds||e.millisecond||e.ms||0;this._input=e,this._milliseconds=a+1e3*u+6e4*o+36e5*s,this._days=i+7*r,this._months=n+12*t,this._data={},this._bubble()}function o(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function u(e){return 0>e?Math.ceil(e):Math.floor(e)}function a(e,t){for(var n=e+"";n.length<t;)n="0"+n;return n}function f(e,t,n,r){var i,s,o=t._milliseconds,u=t._days,a=t._months;o&&e._d.setTime(+e._d+o*n),(u||a)&&(i=e.minute(),s=e.hour()),u&&e.date(e.date()+u*n),a&&e.month(e.month()+a*n),o&&!r&&D.updateOffset(e),(u||a)&&(e.minute(i),e.hour(s))}function l(e){return"[object Array]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(n=0;r>n;n++)~~e[n]!==~~t[n]&&s++;return s+i}function h(e){return e?it[e]||e.toLowerCase().replace(/(.)s$/,"$1"):e}function p(e,t){return t.abbr=e,j[e]||(j[e]=new r),j[e].set(t),j[e]}function d(e){if(!e)return D.fn._lang;if(!j[e]&&F)try{require("./lang/"+e)}catch(t){return D.fn._lang}return j[e]}function v(e){return e.match(/\[.*\]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function m(e){var t,n,r=e.match(R);for(t=0,n=r.length;n>t;t++)r[t]=at[r[t]]?at[r[t]]:v(r[t]);return function(i){var s="";for(t=0;n>t;t++)s+=r[t]instanceof Function?r[t].call(i,e):r[t];return s}}function g(e,t){function n(t){return e.lang().longDateFormat(t)||t}for(var r=5;r--&&U.test(t);)t=t.replace(U,n);return st[t]||(st[t]=m(t)),st[t](e)}function y(e,t){switch(e){case"DDDD":return X;case"YYYY":return V;case"YYYYY":return $;case"S":case"SS":case"SSS":case"DDD":return W;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return J;case"a":case"A":return d(t._l)._meridiemParse;case"X":return G;case"Z":case"ZZ":return K;case"T":return Q;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return z;default:return new RegExp(e.replace("\\",""))}}function b(e){var t=(K.exec(e)||[])[0],n=(t+"").match(tt)||["-",0,0],r=+(60*n[1])+~~n[2];return"+"===n[0]?-r:r}function w(e,t,n){var r,i=n._a;switch(e){case"M":case"MM":i[1]=null==t?0:~~t-1;break;case"MMM":case"MMMM":r=d(n._l).monthsParse(t),null!=r?i[1]=r:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":null!=t&&(i[2]=~~t);break;case"YY":i[0]=~~t+(~~t>68?1900:2e3);break;case"YYYY":case"YYYYY":i[0]=~~t;break;case"a":case"A":n._isPm=d(n._l).isPM(t);break;case"H":case"HH":case"h":case"hh":i[3]=~~t;break;case"m":case"mm":i[4]=~~t;break;case"s":case"ss":i[5]=~~t;break;case"S":case"SS":case"SSS":i[6]=~~(1e3*("0."+t));break;case"X":n._d=new Date(1e3*parseFloat(t));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=b(t)}null==t&&(n._isValid=!1)}function E(e){var t,n,r=[];if(!e._d){for(t=0;7>t;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];r[3]+=~~((e._tzm||0)/60),r[4]+=~~((e._tzm||0)%60),n=new Date(0),e._useUTC?(n.setUTCFullYear(r[0],r[1],r[2]),n.setUTCHours(r[3],r[4],r[5],r[6])):(n.setFullYear(r[0],r[1],r[2]),n.setHours(r[3],r[4],r[5],r[6])),e._d=n}}function S(e){var t,n,r=e._f.match(R),i=e._i;for(e._a=[],t=0;t<r.length;t++)n=(y(r[t],e).exec(i)||[])[0],n&&(i=i.slice(i.indexOf(n)+n.length)),at[r[t]]&&w(r[t],n,e);i&&(e._il=i),e._isPm&&e._a[3]<12&&(e._a[3]+=12),e._isPm===!1&&12===e._a[3]&&(e._a[3]=0),E(e)}function x(e){var t,n,r,s,u,a=99;for(s=0;s<e._f.length;s++)t=o({},e),t._f=e._f[s],S(t),n=new i(t),u=c(t._a,n.toArray()),n._il&&(u+=n._il.length),a>u&&(a=u,r=n);o(e,r)}function T(e){var t,n=e._i,r=Y.exec(n);if(r){for(e._f="YYYY-MM-DD"+(r[2]||" "),t=0;4>t;t++)if(et[t][1].exec(n)){e._f+=et[t][0];break}K.exec(n)&&(e._f+=" Z"),S(e)}else e._d=new Date(n)}function N(t){var n=t._i,r=I.exec(n);n===e?t._d=new Date:r?t._d=new Date(+r[1]):"string"==typeof n?T(t):l(n)?(t._a=n.slice(0),E(t)):t._d=n instanceof Date?new Date(+n):new Date(n)}function C(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function k(e,t,n){var r=B(Math.abs(e)/1e3),i=B(r/60),s=B(i/60),o=B(s/24),u=B(o/365),a=45>r&&["s",r]||1===i&&["m"]||45>i&&["mm",i]||1===s&&["h"]||22>s&&["hh",s]||1===o&&["d"]||25>=o&&["dd",o]||45>=o&&["M"]||345>o&&["MM",B(o/30)]||1===u&&["y"]||["yy",u];return a[2]=t,a[3]=e>0,a[4]=n,C.apply({},a)}function L(e,t,n){var r,i=n-t,s=n-e.day();return s>i&&(s-=7),i-7>s&&(s+=7),r=D(e).add("d",s),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function A(e){var t=e._i,n=e._f;return null===t||""===t?null:("string"==typeof t&&(e._i=t=d().preparse(t)),D.isMoment(t)?(e=o({},t),e._d=new Date(+t._d)):n?l(n)?x(e):S(e):N(e),new i(e))}function O(e,t){D.fn[e]=D.fn[e+"s"]=function(e){var n=this._isUTC?"UTC":"";return null!=e?(this._d["set"+n+t](e),D.updateOffset(this),this):this._d["get"+n+t]()}}function M(e){D.duration.fn[e]=function(){return this._data[e]}}function _(e,t){D.duration.fn["as"+e]=function(){return+this/t}}for(var D,P,H="2.1.0",B=Math.round,j={},F="undefined"!=typeof module&&module.exports,I=/^\/?Date\((\-?\d+)/i,q=/(\-)?(\d*)?\.?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,R=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,z=/\d\d?/,W=/\d{1,3}/,X=/\d{3}/,V=/\d{1,4}/,$=/[+\-]?\d{1,6}/,J=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,K=/Z|[\+\-]\d\d:?\d\d/i,Q=/T/i,G=/[\+\-]?\d+(\.\d{1,3})?/,Y=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,Z="YYYY-MM-DDTHH:mm:ssZ",et=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],tt=/([\+\-]|\d\d)/gi,nt="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),rt={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},it={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",w:"week",M:"month",y:"year"},st={},ot="DDD w W M D d".split(" "),ut="M D H h m s w W".split(" "),at={M:function(){return this.month()+1},MMM:function(e){return this.lang().monthsShort(this,e)},MMMM:function(e){return this.lang().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.lang().weekdaysMin(this,e)},ddd:function(e){return this.lang().weekdaysShort(this,e)},dddd:function(e){return this.lang().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return a(this.year()%100,2)},YYYY:function(){return a(this.year(),4)},YYYYY:function(){return a(this.year(),5)},gg:function(){return a(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return a(this.weekYear(),5)},GG:function(){return a(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return a(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return a(~~(this.milliseconds()/10),2)},SSS:function(){return a(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return 0>e&&(e=-e,t="-"),t+a(~~(e/60),2)+":"+a(~~e%60,2)},ZZ:function(){var e=-this.zone(),t="+";return 0>e&&(e=-e,t="-"),t+a(~~(10*e/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}};ot.length;)P=ot.pop(),at[P+"o"]=n(at[P],P);for(;ut.length;)P=ut.pop(),at[P+P]=t(at[P],2);for(at.DDDD=t(at.DDD,3),r.prototype={set:function(e){var t,n;for(n in e)t=e[n],"function"==typeof t?this[n]=t:this["_"+n]=t},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e){var t,n,r;for(this._monthsParse||(this._monthsParse=[]),t=0;12>t;t++)if(this._monthsParse[t]||(n=D([2e3,t]),r="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[t]=new RegExp(r.replace(".",""),"i")),this._monthsParse[t].test(e))return t},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},weekdaysParse:function(e){var t,n,r;for(this._weekdaysParse||(this._weekdaysParse=[]),t=0;7>t;t++)if(this._weekdaysParse[t]||(n=D([2e3,1]).day(t),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[t]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[t].test(e))return t},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},isPM:function(e){return"p"===(e+"").toLowerCase()[0]},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(e,t){var n=this._calendar[e];return"function"==typeof n?n.apply(t):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var i=this._relativeTime[n];return"function"==typeof i?i(e,t,n,r):i.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return"function"==typeof n?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",preparse:function(e){return e},postformat:function(e){return e},week:function(e){return L(e,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6}},D=function(e,t,n){return A({_i:e,_f:t,_l:n,_isUTC:!1})},D.utc=function(e,t,n){return A({_useUTC:!0,_isUTC:!0,_l:n,_i:e,_f:t})},D.unix=function(e){return D(1e3*e)},D.duration=function(e,t){var n,r,i=D.isDuration(e),o="number"==typeof e,u=i?e._input:o?{}:e,a=q.exec(e);return o?t?u[t]=e:u.milliseconds=e:a&&(n="-"===a[1]?-1:1,u={y:0,d:~~a[2]*n,h:~~a[3]*n,m:~~a[4]*n,s:~~a[5]*n,ms:~~a[6]*n}),r=new s(u),i&&e.hasOwnProperty("_lang")&&(r._lang=e._lang),r},D.version=H,D.defaultFormat=Z,D.updateOffset=function(){},D.lang=function(e,t){return e?(t?p(e,t):j[e]||d(e),D.duration.fn._lang=D.fn._lang=d(e),void 0):D.fn._lang._abbr},D.langData=function(e){return e&&e._lang&&e._lang._abbr&&(e=e._lang._abbr),d(e)},D.isMoment=function(e){return e instanceof i},D.isDuration=function(e){return e instanceof s},D.fn=i.prototype={clone:function(){return D(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return g(D(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return null==this._isValid&&(this._isValid=this._a?!c(this._a,(this._isUTC?D.utc(this._a):D(this._a)).toArray()):!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(e){var t=g(this,e||D.defaultFormat);return this.lang().postformat(t)},add:function(e,t){var n;return n="string"==typeof e?D.duration(+t,e):D.duration(e,t),f(this,n,1),this},subtract:function(e,t){var n;return n="string"==typeof e?D.duration(+t,e):D.duration(e,t),f(this,n,-1),this},diff:function(e,t,n){var r,i,s=this._isUTC?D(e).zone(this._offset||0):D(e).local(),o=6e4*(this.zone()-s.zone());return t=h(t),"year"===t||"month"===t?(r=432e5*(this.daysInMonth()+s.daysInMonth()),i=12*(this.year()-s.year())+(this.month()-s.month()),i+=(this-D(this).startOf("month")-(s-D(s).startOf("month")))/r,i-=6e4*(this.zone()-D(this).startOf("month").zone()-(s.zone()-D(s).startOf("month").zone()))/r,"year"===t&&(i/=12)):(r=this-s,i="second"===t?r/1e3:"minute"===t?r/6e4:"hour"===t?r/36e5:"day"===t?(r-o)/864e5:"week"===t?(r-o)/6048e5:r),n?i:u(i)},from:function(e,t){return D.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!t)},fromNow:function(e){return this.from(D(),e)},calendar:function(){var e=this.diff(D().startOf("day"),"days",!0),t=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse";return this.format(this.lang().calendar(t,this))},isLeapYear:function(){var e=this.year();return 0===e%4&&0!==e%100||0===e%400},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?"string"==typeof e&&(e=this.lang().weekdaysParse(e),"number"!=typeof e)?this:this.add({d:e-t}):t},month:function(e){var t,n=this._isUTC?"UTC":"";return null!=e?"string"==typeof e&&(e=this.lang().monthsParse(e),"number"!=typeof e)?this:(t=this.date(),this.date(1),this._d["set"+n+"Month"](e),this.date(Math.min(t,this.daysInMonth())),D.updateOffset(this),this):this._d["get"+n+"Month"]()},startOf:function(e){switch(e=h(e)){case"year":this.month(0);case"month":this.date(1);case"week":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),this},endOf:function(e){return this.startOf(e).add(e,1).subtract("ms",1)},isAfter:function(e,t){return t="undefined"!=typeof t?t:"millisecond",+this.clone().startOf(t)>+D(e).startOf(t)},isBefore:function(e,t){return t="undefined"!=typeof t?t:"millisecond",+this.clone().startOf(t)<+D(e).startOf(t)},isSame:function(e,t){return t="undefined"!=typeof t?t:"millisecond",+this.clone().startOf(t)===+D(e).startOf(t)},min:function(e){return e=D.apply(null,arguments),this>e?this:e},max:function(e){return e=D.apply(null,arguments),e>this?this:e},zone:function(e){var t=this._offset||0;return null==e?this._isUTC?t:this._d.getTimezoneOffset():("string"==typeof e&&(e=b(e)),Math.abs(e)<16&&(e=60*e),this._offset=e,this._isUTC=!0,t!==e&&f(this,D.duration(t-e,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},daysInMonth:function(){return D.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(e){var t=B((D(this).startOf("day")-D(this).startOf("year"))/864e5)+1;return null==e?t:this.add("d",e-t)},weekYear:function(e){var t=L(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==e?t:this.add("y",e-t)},isoWeekYear:function(e){var t=L(this,1,4).year;return null==e?t:this.add("y",e-t)},week:function(e){var t=this.lang().week(this);return null==e?t:this.add("d",7*(e-t))},isoWeek:function(e){var t=L(this,1,4).week;return null==e?t:this.add("d",7*(e-t))},weekday:function(e){var t=(this._d.getDay()+7-this.lang()._week.dow)%7;return null==e?t:this.add("d",e-t)},isoWeekday:function(e){return null==e?this.day()||7:this.day(this.day()%7?e:e-7)},lang:function(t){return t===e?this._lang:(this._lang=d(t),this)}},P=0;P<nt.length;P++)O(nt[P].toLowerCase().replace(/s$/,""),nt[P]);O("year","FullYear"),D.fn.days=D.fn.day,D.fn.months=D.fn.month,D.fn.weeks=D.fn.week,D.fn.isoWeeks=D.fn.isoWeek,D.fn.toJSON=D.fn.toISOString,D.duration.fn=s.prototype={_bubble:function(){var e,t,n,r,i=this._milliseconds,s=this._days,o=this._months,a=this._data;a.milliseconds=i%1e3,e=u(i/1e3),a.seconds=e%60,t=u(e/60),a.minutes=t%60,n=u(t/60),a.hours=n%24,s+=u(n/24),a.days=s%30,o+=u(s/30),a.months=o%12,r=u(o/12),a.years=r},weeks:function(){return u(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+2592e6*(this._months%12)+31536e6*~~(this._months/12)},humanize:function(e){var t=+this,n=k(t,!e,this.lang());return e&&(n=this.lang().pastFuture(t,n)),this.lang().postformat(n)},add:function(e,t){var n=D.duration(e,t);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(e,t){var n=D.duration(e,t);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(e){return e=h(e),this[e.toLowerCase()+"s"]()},as:function(e){return e=h(e),this["as"+e.charAt(0).toUpperCase()+e.slice(1)+"s"]()},lang:D.fn.lang};for(P in rt)rt.hasOwnProperty(P)&&(_(P,rt[P]),M(P.toLowerCase()));_("Weeks",6048e5),D.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},D.lang("en",{ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),F&&(module.exports=D),"undefined"==typeof ender&&(this.moment=D),"function"==typeof define&&define.amd&&define("moment",[],function(){return D})}.call(this),function(){function o(e){this._n=e}function u(e,t,n){var r=Math.pow(10,t),i;i=(Math.round(e*r)/r).toFixed(t);if(n){var s=new RegExp("0{1,"+n+"}$");i=i.replace(s,"")}return i}function a(e,t){var n;return t.indexOf("$")>-1?n=l(e,t):t.indexOf("%")>-1?n=c(e,t):t.indexOf(":")>-1?n=h(e,t):n=d(e,t),n}function f(e,t){if(t.indexOf(":")>-1)e._n=p(t);else if(t===i)e._n=0;else{var s=t;n[r].delimiters.decimal!=="."&&(t=t.replace(/\./g,"").replace(n[r].delimiters.decimal,"."));var o=new RegExp("[^a-zA-Z]"+n[r].abbreviations.thousand+"(?:\\)|(\\"+n[r].currency.symbol+")?(?:\\))?)?$"),u=new RegExp("[^a-zA-Z]"+n[r].abbreviations.million+"(?:\\)|(\\"+n[r].currency.symbol+")?(?:\\))?)?$"),a=new RegExp("[^a-zA-Z]"+n[r].abbreviations.billion+"(?:\\)|(\\"+n[r].currency.symbol+")?(?:\\))?)?$"),f=new RegExp("[^a-zA-Z]"+n[r].abbreviations.trillion+"(?:\\)|(\\"+n[r].currency.symbol+")?(?:\\))?)?$"),l=["KB","MB","GB","TB","PB","EB","ZB","YB"],c=!1;for(var h=0;h<=l.length;h++){c=t.indexOf(l[h])>-1?Math.pow(1024,h+1):!1;if(c)break}e._n=(c?c:1)*(s.match(o)?Math.pow(10,3):1)*(s.match(u)?Math.pow(10,6):1)*(s.match(a)?Math.pow(10,9):1)*(s.match(f)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*Number(t.replace(/[^0-9\.]+/g,"")),e._n=c?Math.ceil(e._n):e._n}return e._n}function l(e,t){var i=t.indexOf("$")<=1?!0:!1,s="";t.indexOf(" $")>-1?(s=" ",t=t.replace(" $","")):t.indexOf("$ ")>-1?(s=" ",t=t.replace("$ ","")):t=t.replace("$","");var o=a(e,t);return i?o.indexOf("(")>-1||o.indexOf("-")>-1?(o=o.split(""),o.splice(1,0,n[r].currency.symbol+s),o=o.join("")):o=n[r].currency.symbol+s+o:o.indexOf(")")>-1?(o=o.split(""),o.splice(-1,0,s+n[r].currency.symbol),o=o.join("")):o=o+s+n[r].currency.symbol,o}function c(e,t){var n="";t.indexOf(" %")>-1?(n=" ",t=t.replace(" %","")):t=t.replace("%",""),e._n=e._n*100;var r=a(e,t);return r.indexOf(")")>-1?(r=r.split(""),r.splice(-1,0,n+"%"),r=r.join("")):r=r+n+"%",r}function h(e,t){var n=Math.floor(e._n/60/60),r=Math.floor((e._n-n*60*60)/60),i=Math.round(e._n-n*60*60-r*60);return n+":"+(r<10?"0"+r:r)+":"+(i<10?"0"+i:i)}function p(e){var t=e.split(":"),n=0;return t.length===3?(n+=Number(t[0])*60*60,n+=Number(t[1])*60,n+=Number(t[2])):t.length===2&&(n+=Number(t[0])*60,n+=Number(t[1])),Number(n)}function d(e,t){var s=!1,o=!1,a="",f="",l="",c=Math.abs(e._n);if(e._n===0&&i!==null)return i;t.indexOf("(")>-1&&(s=!0,t=t.slice(1,-1)),t.indexOf("a")>-1&&(t.indexOf(" a")>-1?(a=" ",t=t.replace(" a","")):t=t.replace("a",""),c>=Math.pow(10,12)?(a+=n[r].abbreviations.trillion,e._n=e._n/Math.pow(10,12)):c<Math.pow(10,12)&&c>=Math.pow(10,9)?(a+=n[r].abbreviations.billion,e._n=e._n/Math.pow(10,9)):c<Math.pow(10,9)&&c>=Math.pow(10,6)?(a+=n[r].abbreviations.million,e._n=e._n/Math.pow(10,6)):c<Math.pow(10,6)&&c>=Math.pow(10,3)&&(a+=n[r].abbreviations.thousand,e._n=e._n/Math.pow(10,3)));if(t.indexOf("b")>-1){t.indexOf(" b")>-1?(f=" ",t=t.replace(" b","")):t=t.replace("b","");var h=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],p,d;for(var v=0;v<=h.length;v++){p=Math.pow(1024,v),d=Math.pow(1024,v+1);if(e._n>=p&&e._n<d){f+=h[v],p>0&&(e._n=e._n/p);break}}}t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(l=" ",t=t.replace(" o","")):t=t.replace("o",""),l+=n[r].ordinal(e._n)),t.indexOf("[.]")>-1&&(o=!0,t=t.replace("[.]","."));var m=e._n.toString().split(".")[0],g=t.split(".")[1],y=t.indexOf(","),b="",w=!1;return g?(g.indexOf("[")>-1?(g=g.replace("]",""),g=g.split("["),b=u(e._n,g[0].length+g[1].length,g[1].length)):b=u(e._n,g.length),m=b.split(".")[0],b.split(".")[1].length?b=n[r].delimiters.decimal+b.split(".")[1]:b="",o&&Number(b.slice(1))===0&&(b="")):m=u(e._n,null),m.indexOf("-")>-1&&(m=m.slice(1),w=!0),y>-1&&(m=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+n[r].delimiters.thousands)),t.indexOf(".")===0&&(m=""),(s&&w?"(":"")+(!s&&w?"-":"")+m+b+(l?l:"")+(a?a:"")+(f?f:"")+(s&&w?")":"")}function v(e,t){n[e]=t}var e,t="1.4.9",n={},r="en",i=null,s=typeof module!="undefined"&&module.exports;e=function(t){return e.isNumeral(t)?t=t.value():t==0||typeof t=="undefined"?t=0:Number(t)||(t=e.fn.unformat(t)),new o(Number(t))},e.version=t,e.isNumeral=function(e){return e instanceof o},e.language=function(t,i){if(!t)return r;if(t&&!i){if(!n[t])throw new Error("Unknown language : "+t);r=t}return(i||!n[t])&&v(t,i),e},e.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th"},currency:{symbol:"$"}}),e.zeroFormat=function(e){typeof e=="string"?i=e:i=null},e.fn=o.prototype={clone:function(){return e(this)},format:function(t){return a(this,t?t:e.defaultFormat)},unformat:function(t){return f(this,t?t:e.defaultFormat)},value:function(){return this._n},valueOf:function(){return this._n},set:function(e){return this._n=Number(e),this},add:function(e){return this._n=this._n+Number(e),this},subtract:function(e){return this._n=this._n-Number(e),this},multiply:function(e){return this._n=this._n*Number(e),this},divide:function(e){return this._n=this._n/Number(e),this},difference:function(e){var t=this._n-Number(e);return t<0&&(t=-t),t}},s&&(module.exports=e),typeof ender=="undefined"&&(this.numeral=e),typeof define=="function"&&define.amd&&define("numeral",[],function(){return e})}.call(this),define("jock/template/template-engine",["require","jquery","../utils/utils","handlebars","moment","numeral"],function(e){function o(){function u(e,t){t.on(e.on,function(t){e.on==="click",e.action.call(this,t,e.objectRef,e.options)})}var e=!1,n=0,o={};this.hasActions=function(){return n>0},this.reset=function(){o={},n=0},this.render=function(e,n,r,i){var s=t.extend(i,{});r=r||{},s.data==null?s.data=r:t.extend(s.data,r);var o=e(n,s);return o},this.bind=function(e){if(!this.hasActions())return;e=e||"body",t("[data-jock-action]",e).addBack("[data-jock-action]").each(function(e,r){var i=this.attributes["data-jock-action"].value,s=o[i];delete o[i],n--;var a=t(this);for(var e=0;e<s.length;e++){var f=s[e];if(f.action==null)continue;u(f,a)}a.removeAttr("data-jock-action")})},this.registerHelpers=function(){function l(e){if(e in r.helpers)throw new Error('Helper, "'+e+'" is already registered as a Handlebars helper!')}if(e)return;e=!0,l("action"),r.registerHelper("action",function(e){if(e==null||e.hash==null)return;var i=[],s=this;t.each(e.hash,function(n,r){if(t.isFunction(r)){var o={on:n,action:r,options:e,objectRef:s};i.push(o)}}),o[n]=i,n++;var u=n-1;return new r.SafeString('data-jock-action="'+u+'"')}),l("formatDate"),r.registerHelper("formatDate",function(e,t){var n=t.hash.format||"MMM Do, YYYY",r=i(e);return r.format(n)}),l("formatNumber"),r.registerHelper("formatNumber",function(e,t){var n=t.hash.format||"#",r=s(e).format(n);return r});var u=function(){this.expressions=[]};u.prototype.add=function(e,t){this.expressions[e]=t},u.prototype.call=function(e,t,n){if(!this.expressions.hasOwnProperty(e))throw new Error('Unknown operator "'+e+'"');return this.expressions[e](t,n)};var a=new u;a.add("==",function(e,t){return e==t}),a.add("not",function(e,t){return e!=t}),a.add(">",function(e,t){return e>t}),a.add("<",function(e,t){return e<t}),a.add(">=",function(e,t){return e>=t}),a.add("<=",function(e,t){return e<=t}),a.add("===",function(e,t){return e===t}),a.add("!==",function(e,t){return e!==t}),a.add("in",function(e,t){return isArray(t)||(t=t.split(",")),t.indexOf(e)!==-1});var f=function(){var e=arguments,t=e[0],n=e[1],r=e[2],i=e[3];return e.length==2?(i=e[1],t?i.fn(this):i.inverse(this)):e.length==3?(r=e[1],i=e[2],t==r?i.fn(this):i.inverse(this)):a.call(n,t,r)?i.fn(this):i.inverse(this)};l("is"),r.registerHelper("is",f)}}var t=e("jquery"),n=e("../utils/utils"),r=e("handlebars"),i=e("moment"),s=e("numeral"),u=new o;return u.registerHelpers(),u}),define("jock/utils/ajax-tracker",["require","jquery","jock/utils/utils"],function(e){function r(e){function f(i,a,f,l){f.then(function(n,r,i){console.log("local promise then:",arguments),t(e).trigger("ajax.success",[n,r,i,l])},function(n,r,i){console.log("local promise error:",arguments),t(e).trigger("ajax.error",[n,r,i,l])}),f.always(function(n,s,o){console.log("local promise always:",arguments),t(e).trigger("ajax.complete",[n,s,o,l]);var u=r.remove(i,f);console.log("Removed?",u)}),a.then(function(){u==null||u==a?(t(e).trigger("ajax.stop",[arguments,l]),u=null,l={}):console.log("globalPromise ignore then")},function(n){if(u!=null&&u!=a){console.log("globalPromise ignore error");return}t(e).trigger("ajax.stop",[n,l]),u=null,l={},console.log("globalPromise ERROR",a),console.log(arguments)}),a.always(function(){if(u!=null&&u!=a){console.log("globalPromise ignore always");return}console.log("globalPromise ALWAYS",arguments),console.log("Promises size1:",n.objectSize(o)),console.log("Promises size2:",s)})}if(e==null)throw new Error("ajaxTracker requires a viewManager instance!");var r={},i=0,s=0,o={},u=null,a={};return r.add=function(n,r,l){var c=o[n];c==null&&(c=[],o[n]=c);var h={jqXHR:r,args:l};return c.push(h),u==null?(u=t.when(r),l!=null&&(a=l),t(e).trigger("ajax.start",[l])):(u=t.when(u,r),l!=null&&(a=t.extend(a,l))),u._id=i++,f(n,u,r,a),console.log("DONE registering",u._id),s++,u},r.remove=function(e,t){var n=o[e];if(n==null)return!1;var r=-1;for(var i=0;i<n.length;i++){var u=n[i];if(u.jqXHR===t){r=i;break}}return r>=0?(n.splice(r,1),n.length===0&&delete o[e],s--,!0):!1},r.clear=function(e){arguments.length===0?o={}:delete o[e]},r.abort=function(e){var n=o[e];if(n==null)return;var r=n.slice();t.each(r,function(e,t){t.jqXHR.abort()}),u=null,a={}},r}var t=e("jquery"),n=e("jock/utils/utils");return r}),define("jock/view/view-manager",["require","jquery","jock/history/history","jock/utils/params","jock/globals","../utils/utils","jock/history/hash","../template/template-engine","jock/utils/ajax-tracker"],function(e){function a(){function m(e,t){var r=t.target,i=n.getCurrentView(r);g(r);var o={view:e,options:t};return s[r]=o,i}function g(e){t.each(s,function(n,r){if(e===n)y(r),delete s[n];else{var i=t(n).closest(e).length>0;i&&(y(r),delete s[n])}})}function y(e){if(e==null)return;if(e.options.overwritten)return;e.view&&e.view.onDestroy&&e.view.onDestroy(e.options)}function b(e){var n=t.inArray(e,v);n!==-1&&v.splice(n,1)}function w(e){var n=t.inArray(e,v);if(n!==-1)return;if(v.length>=1){v.push(e);return}v.push(e);if(window.onerror===E)return;var r=window.onerror;E.prevError=r,window.onerror=E}function E(e,t,n,r,i){for(var s=0;s<v.length;s++){var o=v[s],u={message:e,url:t,line:n,col:r,error:i,target:o};S(u)}var a=E.prevError;a&&a(e,t,n)}function S(e){n.clear(e.target);var r=t(e.target);return r.finish(),r.clearQueue().stop(!0,!0),setTimeout(function(){r.css({opacity:"1",display:"block"})},10),!1}var n=this,i=u(this),s={},a={defaultView:null,target:"#container",animate:!0,animateHandler:null,attachHandler:null,onHashChange:t.noop,globalOnAttached:t.noop,bindTemplate:!0,updateHistory:!0},f=null,l=!0,c=!1,h={},p={},d={},v=[];this.setRoutes=function(e){if(e==null)return;h=e,p={};for(var t in h)p[h[t]]=t},this.getRoutes=function(){return h},this.getRoutesByPath=function(){return p},this.getCurrentRoute=function(){var e=t.jock.history.params().page;return e},this.getCurrentRoutePath=function(){var e=n.getCurrentRoute();return e!=null?n.getRoutes()[e]:null},this.init=function(e){if(c&&!e)return;c=!0,a.animateHandler=n.attachViewWithAnim,a.attachHandler=n.attachView,a=t.extend({},a,e),this.setRoutes(a.routes),r.hashPrefix(e.hashPrefix),t.jock.history.init(function(e){var r=e.prevHash.get().page;if(l){l=!1;var i=t.jock.history.params(),s=i.page,o=h[s]||s;if(o){var u=n.hasMovedToNewView(r);if(!e.initial&&!u){var f=n.getCurrentViews();t.each(f,function(n,r){t(r.options.hash).trigger("onHashChange",e)}),l=!0;return}var c=t.jock.history.params.get();delete c.page,n.showView({view:o,params:c,hashChange:!0,externalHashChange:e.external}).then(function(e){a.onHashChange(e),l=!0})}else l=!0}});var i=t.jock.history.params().page;i?t.jock.history.update():a.defaultView&&(e.view=a.defaultView,this.showView(e).then(function(e){a.onHashChange(e);var r={view:e};t(n).trigger("onHashChange",[r])}))},this.showView=function(e){var r=e.view;if(!r)throw new Error("options.view must be specified");this.ensureInitialized();var i=n.createDeferreds();return setTimeout(function(){var s=e.target||a.target,u={params:{},args:{},bindTemplate:a.bindTemplate,animate:a.animate,updateHistory:a.updateHistory,overwritten:!1,externalHashChange:!1},f=t.extend({},u,e);f.target=s,f._options=e,w(s),typeof d[s]=="undefined"&&(d[s]=[]),o.hasActions();var l={viewSettings:f,deferredHolder:i};d[s].push(l);if(d[s].length>1){t.fx.off=!0,t(s).stop(!0,!0);var c=d[s];if(typeof c!="undefined")for(var h=0;h<c.length-1;h++){var p=d[s][h],v=p.viewSettings;v.overwritten===!1&&(v.overwritten=!0,console.warn("OVERRITTEN"),v.deferredHolder.overwriteDeferred.resolve({view:v.view,container:v.container}),v.container&&v.container.cancel())}}n.resolveViewAndShow(r,i,f)}),i.promises},this.createDeferreds=function(){var e=t.Deferred(),n=t.Deferred(),r=t.Deferred(),i=t.Deferred(),s=t.Deferred(),o=e.promise();o.attached=n.promise(),o.visible=r.promise(),o.cancel=i.promise(),o.overwrite=s.promise();var u={reject:function(){e.reject(),n.reject(),r.reject(),i.reject(),s.reject(),t(this).trigger("global.attached.fail"),t(this).trigger("global.visible.fail"),t(this).trigger("global.cancel.fail"),t(this).trigger("global.overwrite.fail")}};return u.mainDeferred=e,u.attachedDeferred=n,u.visibleDeferred=r,u.cancelDeferred=i,u.overwriteDeferred=s,u.promises=o,u},this.resolveViewAndShow=function(t,r,i){typeof t=="string"?(t=h[t]||t,e([t],function(e){n.commonShowView(e,r,i)})):this.commonShowView(t,r,i)},this.overwrite=function(e,t,n){if(n.overwrittenCompleted===!0)return;n.overwrittenCompleted=!0,console.warn("request overwritten -> rejecting deferreds, clearing target"),console.warn("resetting template engine"),i.abort(n.target),i.clear(n.target),o.reset();var r=n.target;this.clear(r),console.warn("overwritten done -> exiting")},this.commonShowView=function(e,r,i){var s=i.target===a.target,o={oldView:i.previousView,newView:e,isMainView:s,viewSettings:i};t(this).trigger("global.showView",[o]);if(i.overwritten===!0)return this.overwrite(e,r,i);e instanceof Function?(i.view=new e,i.view.id==null&&(i.view.id=e.id)):i.view=e,i.deferredHolder=r,n.showViewInstance(i)},this.hasMovedToNewView=function(e){var n=t.jock.history.params().page;return n===e?!1:(typeof n=="undefined"&&(n="/"),!0)},this.showViewInstance=function(e){if(e.overwritten===!0)return this.overwrite(u,e.deferredHolder,e);e.hash={id:Math.random()};var r=e.target,s=r===a.target,u=e.view,c=e.args,h=e.deferredHolder;l=!1;var d=u.id,v=p[d]||d;if(s){var g=this.hasMovedToNewView(v);f=t.jock.history.hash(),g&&t.jock.history.clear(),t.jock.history.params.set({page:v})}var y=e.params;t.jock.history.params.set(y),e.updateHistory&&t.jock.history.update(),l=!0;var b=function(){var c=n,p={};return p.attached=h.promises.attached,p.visible=h.promises.visible,p.overwrite=h.promises.overwrite,p.attach=function(i,f){return setTimeout(function(){if(e.overwritten===!0)return console.warn("likely??"),n.overwrite(u,e.deferredHolder,e),h.promises.attached;var l=m(u,e);e.previousView=l;var p={animate:e.animate,bindTemplate:e.bindTemplate},d=t.extend({},p,f),v=function(){var i=r===a.target,s={oldView:e.previousView,newView:u,isMainView:i,viewSettings:e};t(n).trigger("global.attached",[s]),h.attachedDeferred.resolve({view:u,container:e.container});if(o.hasActions()&&d.bindTemplate===!1){console.info("When rendering the target '"+e.target+"' it was detected that templateEngine had unbounded Actions. "+"Remember to call templateEngine.bind(target) otherwise your actions rendered with Handlebars won't fire!");return}},g=function(){var r={oldView:e.previousView,newView:u,isMainView:s,viewSettings:e};t(n).trigger("global.visible",[r]),h.visibleDeferred.resolve({view:u,container:e.container})};e.onAttached=v,e.onVisible=g,e.viewAttached=c.viewAttached,e.viewVisible=c.viewVisible,e.bindTemplate=d.bindTemplate;var y=e.hashChange;d.animate&&!y?n.commonAttachViewWithAnim(i,e):n.commonAttachView(i,e)}),p.attached},p.cancel=function(){if(e.overwritten===!0)return n.overwrite(u,e.deferredHolder,e);l=!1,t.jock.history.hash(f),f=null,t.jock.history.update(),l=!0;var r=h.promises.cancel,i=h.cancelDeferred,s=e.target;c.clear(s);var o=n.getCurrentView(s);i.resolve({currentView:o,newView:u,container:e.container});var p=s===a.target,d={oldView:o,newView:u,isMainView:p,viewSettings:e};return t(n).trigger("global.cancel",[d]),r},p.tracker={},p.tracker.add=function(t,n){i.add(e.target,t,n)},p.tracker.remove=function(t){i.remove(e.target,t)},p}();if(!u.onInit)throw new Error("Views must have a public 'onInit' method!");if(e.overwritten===!0)return n.overwrite(u,e.deferredHolder,e);e.container=b;var w={};w.path=v;var E={args:c,params:y,hashChange:e.hashChange,hash:e.hash,view:w};if(e.overwritten===!0)return this.overwrite(u,e.deferredHolder,e);u.onInit(b,E)},this.showHTML=function(e){this.ensureInitialized();var r=n.createDeferreds();return setTimeout(function(){var i=e.target||a.target,s={animate:a.animate,bindTemplate:a.bindTemplate,overwritten:!1},u=t.extend({},s,e);u._options=e,u.target=i,w(i),u.deferredHolder=r,typeof d[i]=="undefined"&&(d[i]=[]),d[i].length!==0&&(console.warn("ViewSettings.animate",u.animate),u.animate=!1,console.warn("ViewSettings.animate",u.animate)),o.hasActions();var f=u.html;d[i].push(1);var l=function(){var e={oldHTML:null,newHTML:f};t(this).trigger("global.html.attached",[e]),r.attachedDeferred.resolve({html:f}),o.hasActions()},c=function(){var e={oldHTML:null,newHTML:f};t(this).trigger("global.html.visible",[e]),r.visibleDeferred.resolve({html:f})};u.onAttached=l,u.onVisible=c,u.viewAttached=n.viewAttached,u.viewVisible=n.viewVisible,u.animate?n.commonAttachViewWithAnim(f,u):n.commonAttachView(f,u)}),r.promises},this.commonAttachView=function(e,r){var i=r.target,s=t(i);if(s.length===0)throw new Error("The showView/showHTML target '"+i+"' does not exist in the DOM!");if(r.view!=null){var o=r.previousView,u=i===a.target,f={oldView:o,newView:r.view,isMainView:u,viewSettings:r};t(n).trigger("global.before.attach",[f]),t(n).trigger("global.before.remove",[f])}a.attachHandler(e,r)},this.attachView=function(e,n){var r=n.target,i=t(r),s=n.viewAttached,o=n.viewVisible;i.empty(),i.html(e),s(n),o(n)},this.viewAttached=function(e){if(a.globalOnAttached!=null){var t=e._options;a.globalOnAttached(t)}var n=e.onAttached;n&&n();var r=e.target;if(o.hasActions()){if(e.bindTemplate===!1)return;var i=-1;if(typeof performance!="undefined"){var s=performance.now();o.bind(r);var u=performance.now();i=u-s,i=i.toFixed(2);var f=20;i>f}else o.bind(r)}},this.viewVisible=function(e){var r=e.target,i=e.view,s=e.onVisible;s&&s();if(!e.deferredHolder)throw new Error("options.deferredHolder is required!");var o=e.deferredHolder.mainDeferred;o&&o.resolve({view:i,container:e.container}),n.clear(r),b(r),typeof d[r]=="undefined"&&(t.fx.off=!1)},this.commonAttachViewWithAnim=function(e,r){var i=r.target,s=t(i);if(s.length===0)throw new Error("The showView()/showHTML() target '"+i+"' does not exist in the DOM!");if(r.view!=null){var o=r.previousView,u=i===a.target,f={oldView:o,newView:r.view,isMainView:u,viewSettings:r};t(n).trigger("global.before.attach",[f]),t(n).trigger("global.before.remove",[f])}a.animateHandler(e,r)},this.attachViewWithAnim=function(e,n){var r=n.target,i=t(r),s=n.viewAttached,o=n.viewVisible;i.fadeOut("fast",function(){i.empty(),i.html(e),s(n),i.fadeIn({queue:!1,duration:"fast",complete:function(){o(n)}})})},this.updateHistory=function(){l=!1,t.jock.history.update(),l=!0},this.empty=function(e){e=e||a.target;var n=t(e);if(n.length===0)throw new Error("The empty() target '"+e+"' does not exist in the DOM!");g(e),this.clear(e),n.empty()},this.clear=function(e){e=e||a.target;var t=d[e];t&&(t.splice(0,1),t.length===0&&delete d[e])},this.hasCurrentViews=function(){var e=t.isEmptyObject(s);return!e},this.getCurrentViews=function(){return s},this.getCurrentView=function(e){e=e||a.target;var t=s[e];return t?t.view:null},this.ensureInitialized=function(){if(c)return;throw new Error("ViewManager has not been initialized. Call ViewManager.init() before showView/showHTML.This sometimes occur because RequireJS loading order is incorrect eg. the file initializing ViewManager is loaded *after* the file using ViewManager!")}}var t=e("jquery");e("jock/history/history");var n=e("jock/utils/params"),r=e("jock/globals"),i=e("../utils/utils"),s=e("jock/history/hash"),o=e("../template/template-engine"),u=e("jock/utils/ajax-tracker"),f=new a;return f}),define("text",["module"],function(e){var t,n,r,i,s,o=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],u=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,f=typeof location!="undefined"&&location.href,l=f&&location.protocol&&location.protocol.replace(/\:/,""),c=f&&location.hostname,h=f&&(location.port||undefined),p={},d=e.config&&e.config()||{};t={version:"2.0.9",strip:function(e){if(e){e=e.replace(u,"");var t=e.match(a);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:d.createXhr||function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(t=0;t<3;t+=1){n=o[t];try{e=new ActiveXObject(n)}catch(r){}if(e){o=[n];break}}return e},parseName:function(e){var t,n,r,i=!1,s=e.indexOf("."),o=e.indexOf("./")===0||e.indexOf("../")===0;return s!==-1&&(!o||s>1)?(t=e.substring(0,s),n=e.substring(s+1,e.length)):t=e,r=n||t,s=r.indexOf("!"),s!==-1&&(i=r.substring(s+1)==="strip",r=r.substring(0,s),n?n=r:t=r),{moduleName:t,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var s,o,u,a=t.xdRegExp.exec(e);return a?(s=a[2],o=a[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===n)&&(!o||o.toLowerCase()===r.toLowerCase())&&(!u&&!o||u===i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,d.isBuild&&(p[e]=r),i(r)},load:function(e,n,r,i){if(i.isBuild&&!i.inlineText){r();return}d.isBuild=i.isBuild;var s=t.parseName(e),o=s.moduleName+(s.ext?"."+s.ext:""),u=n.toUrl(o),a=d.useXhr||t.useXhr;!f||a(u,l,c,h)?t.get(u,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([o],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)})},write:function(e,n,r,i){if(p.hasOwnProperty(n)){var s=t.jsEscape(p[n]);r.asModule(e+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(e,n,r,i,s){var o=t.parseName(n),u=o.ext?"."+o.ext:"",a=o.moduleName+u,f=r.toUrl(o.moduleName+u)+".js";t.load(a,r,function(n){var r=function(e){return i(f,e)};r.asModule=function(e,t){return i.asModule(e,f,t)},t.write(e,a,r,s)},s)}};if(d.env==="node"||!d.env&&typeof process!="undefined"&&process.versions&&!!process.versions.node&&!process.versions["node-webkit"])n=require.nodeRequire("fs"),t.get=function(e,t,r){try{var i=n.readFileSync(e,"utf8");i.indexOf("﻿")===0&&(i=i.substring(1)),t(i)}catch(s){r(s)}};else if(d.env==="xhr"||!d.env&&t.createXhr())t.get=function(e,n,r,i){var s=t.createXhr(),o;s.open("GET",e,!0);if(i)for(o in i)i.hasOwnProperty(o)&&s.setRequestHeader(o.toLowerCase(),i[o]);d.onXhr&&d.onXhr(s,e),s.onreadystatechange=function(t){var i,o;s.readyState===4&&(i=s.status,i>399&&i<600?(o=new Error(e+" HTTP status: "+i),o.xhr=s,r(o)):n(s.responseText),d.onXhrComplete&&d.onXhrComplete(s,e))},s.send(null)};else if(d.env==="rhino"||!d.env&&typeof Packages!="undefined"&&typeof java!="undefined")t.get=function(e,t){var n,r,i="utf-8",s=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),u=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),i)),a="";try{n=new java.lang.StringBuffer,r=u.readLine(),r&&r.length()&&r.charAt(0)===65279&&(r=r.substring(1)),r!==null&&n.append(r);while((r=u.readLine())!==null)n.append(o),n.append(r);a=String(n.toString())}finally{u.close()}t(a)};else if(d.env==="xpconnect"||!d.env&&typeof Components!="undefined"&&Components.classes&&Components.interfaces)r=Components.classes,i=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),s="@mozilla.org/windows-registry-key;1"in r,t.get=function(e,t){var n,o,u,a={};s&&(e=e.replace(/\//g,"\\")),u=new FileUtils.File(e);try{n=r["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream),n.init(u,1,0,!1),o=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream),o.init(n,"utf-8",n.available(),i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),o.readString(n.available(),a),o.close(),n.close(),t(a.value)}catch(f){throw new Error((u&&u.path||"")+": "+f)}};return t}),define("hb",["text","handlebars"],function(e,t){function n(e){typeof env!="undefined"&&print(e)}function a(e,t){return e.indexOf(t,e.length-t.length)!==-1}var r={},i='define("{{pluginName}}!{{moduleName}}", ["handlebars"], function(handlebars) {return handlebars.template({{{fn}}})});',s,o=function(n,i,s,o){var u=n;e.get(i.toUrl(u),function(e){if(o.isBuild)r[u]=e,s();else{var n=t.compile(e);s(n)}})},u=function(e,n,o){if(n in r){s||(s=t.compile(i));var u=s({pluginName:e,moduleName:n,fn:t.precompile(r[n])});o(u)}};return{load:o,write:u}}),define("hb!app/views/home/Home.htm",["handlebars"],function(e){return e.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'<div class="container">\r\n\r\n    <h1>Welcome to Jock Examples</h1>\r\n\r\n\r\n    <div id="radios">\r\n        <input id="fast" name="options" type="radio" checked>\r\n        <label for="fast">Fast</label>\r\n\r\n        <input id="easy" name="options" type="radio">\r\n        <label for="easy">Easy</label>\r\n\r\n        <input id="modular" name="options" type="radio">\r\n        <label for="modular">Modular</label>\r\n\r\n        <input id="powerful" name="options" type="radio">\r\n        <label for="powerful">Powerful</label>\r\n\r\n        <input id="flexible" name="options" type="radio">\r\n        <label for="flexible">Flexible</label>\r\n        \r\n\r\n    </div>\r\n        <button id="down">Download pdf</button>\r\n\r\n    <div id="isotope">\r\n\r\n        <div class="searchBox set1-color1 easy" ng-click="clientEdit()">\r\n            <div class="searchBoxIcon"><i class="fa fa-user fa-5x"></i>\r\n            </div>\r\n            <div class="searchBoxLarge">New Client</div>\r\n            <span class="home-text headingSmaller">Create a new client and add their personal details</span>\r\n        </div>\r\n\r\n        <div class="searchBox set1-color4 modular" ng-click="searchClients()">\r\n            <div class="searchBoxIcon"><i class="fa fa-users fa-5x"></i>\r\n            </div>\r\n            <div class="searchBoxLarge">Existing Clients</div>\r\n            <span class="home-text headingSmaller">Manage your existing clients personal details.</span>\r\n        </div>\r\n\r\n\r\n        <div class="searchBox set1-color2 easy">\r\n            <div class="searchBoxIcon"><i class="fa fa-edit fa-5x"></i>\r\n            </div>\r\n            <div class="searchBoxLarge">New Quote</div>\r\n            <span class="home-text headingSmaller">Create a new Discovery quotation.</span>\r\n        </div>\r\n\r\n\r\n        <div class="searchBox set1-color3 modular" ng-click="searchQuotes()">\r\n            <div class="searchBoxIcon"><i class="fa fa-copy fa-5x"></i>\r\n            </div>\r\n            <div class="searchBoxLarge">Existing Quotes</div>\r\n            <span class="home-text headingSmaller">Manage your existing Discovery quotations.</span>\r\n        </div>\r\n\r\n        <div class="searchBox set1-color1 easy" ng-click="clientEdit()">\r\n            <div class="searchBoxIcon"><i class="fa fa-user fa-5x"></i>\r\n            </div>\r\n            <div class="searchBoxLarge">New Client</div>\r\n            <span class="home-text headingSmaller">Create a new client and add their personal details</span>\r\n        </div>\r\n\r\n        <div class="searchBox set1-color4 modular" ng-click="searchClients()">\r\n            <div class="searchBoxIcon"><i class="fa fa-users fa-5x"></i>\r\n            </div>\r\n            <div class="searchBoxLarge">Existing Clients</div>\r\n            <span class="home-text headingSmaller">Manage your existing clients personal details.</span>\r\n        </div>\r\n\r\n\r\n        <div class="searchBox set1-color2 easy">\r\n            <div class="searchBoxIcon"><i class="fa fa-edit fa-5x"></i>\r\n            </div>\r\n            <div class="searchBoxLarge">New Quote</div>\r\n            <span class="home-text headingSmaller">Create a new Discovery quotation.</span>\r\n        </div>\r\n\r\n\r\n        <div class="searchBox set1-color3 flexible" ng-click="searchQuotes()">\r\n            <div class="searchBoxIcon"><i class="fa fa-copy fa-5x"></i>\r\n            </div>\r\n            <div class="searchBoxLarge">Existing Quotes</div>\r\n            <span class="home-text headingSmaller">Manage your existing Discovery quotations.</span>\r\n        </div>\r\n\r\n        <div class="searchBox set1-color3 powerful" ng-click="searchQuotes()">\r\n            <div class="searchBoxIcon"><i class="fa fa-copy fa-5x"></i>\r\n            </div>\r\n            <div class="searchBoxLarge">Existing Quotes</div>\r\n            <span class="home-text headingSmaller">Manage your existing Discovery quotations.</span>\r\n        </div>\r\n\r\n    </div>\r\n\r\n    <!--\r\n    <div id="isotope2">\r\n        <div class="item one modular">One</div>\r\n        <div class="item two modular">Two</div>\r\n        <div class="item three">Three</div>\r\n        <div class="item four easy">Four</div>\r\n        <div class="item three easy">Four</div>\r\n        <div class="item four ">Four</div>\r\n        <div class="item four modular">Four</div>\r\n        <div class="item four">Four</div>\r\n        <div class="item four">Four</div>\r\n    </div>-->\r\n\r\n</div>'},useData:!0})}),define("hb!app/views/home/title.htm",["handlebars"],function(e){return e.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'<div class="title-wrapper">\r\n                <div class="title">\r\n                    <img id="logo" src="images/logo2.png"/>\r\n                    <h1>SP<span class="highlight">AMD</span></h1>\r\n                    <h2>Single Page <span class="off-color">application toolbox for</span> <span class="highlight">AMD</span></h2>\r\n                    <a class="download-link" href="https://github.com/sabob/jock/releases/download/0.0.1/jock-0.0.1.zip" id="main-download">\r\n                        <span class="download-icon icon-download-alt icon-2x"></span>\r\n                        <span class="download-content">Download Jock <span class="version">v0.0.1</span></span>\r\n\r\n                    </a>\r\n                    <h3 class="slogan">Sometimes the best framework is no framework at all!</h3>\r\n                    \r\n                </div>\r\n            </div>'},useData:!0})}),function(e){function n(){}function r(e){function r(t){if(t.prototype.option)return;t.prototype.option=function(t){if(!e.isPlainObject(t))return;this.options=e.extend(!0,this.options,t)}}function s(n,r){e.fn[n]=function(s){if(typeof s=="string"){var o=t.call(arguments,1);for(var u=0,a=this.length;u<a;u++){var f=this[u],l=e.data(f,n);if(!l){i("cannot call methods on "+n+" prior to initialization; "+"attempted to call '"+s+"'");continue}if(!e.isFunction(l[s])||s.charAt(0)==="_"){i("no such method '"+s+"' for "+n+" instance");continue}var c=l[s].apply(l,o);if(c!==undefined)return c}return this}return this.each(function(){var t=e.data(this,n);t?(t.option(s),t._init()):(t=new r(this,s),e.data(this,n,t))})}}if(!e)return;var i=typeof console=="undefined"?n:function(e){console.error(e)};return e.bridget=function(e,t){r(t),s(e,t)},e.bridget}var t=Array.prototype.slice;typeof define=="function"&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],r):r(e.jQuery)}(window),function(e){function r(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var t=document.documentElement,n=function(){};t.addEventListener?n=function(e,t,n){e.addEventListener(t,n,!1)}:t.attachEvent&&(n=function(e,t,n){e[t+n]=n.handleEvent?function(){var t=r(e);n.handleEvent.call(n,t)}:function(){var t=r(e);n.call(e,t)},e.attachEvent("on"+t,e[t+n])});var i=function(){};t.removeEventListener?i=function(e,t,n){e.removeEventListener(t,n,!1)}:t.detachEvent&&(i=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(r){e[t+n]=undefined}});var s={bind:n,unbind:i};typeof define=="function"&&define.amd?define("eventie/eventie",s):typeof exports=="object"?module.exports=s:e.eventie=s}(this),function(e){function r(e){if(typeof e!="function")return;r.isReady?e():n.push(e)}function i(e){var i=e.type==="readystatechange"&&t.readyState!=="complete";if(r.isReady||i)return;r.isReady=!0;for(var s=0,o=n.length;s<o;s++){var u=n[s];u()}}function s(n){return n.bind(t,"DOMContentLoaded",i),n.bind(t,"readystatechange",i),n.bind(e,"load",i),r}var t=e.document,n=[];r.isReady=!1,typeof define=="function"&&define.amd?(r.isReady=typeof requirejs=="function",define("doc-ready/doc-ready",["eventie/eventie"],s)):e.docReady=s(e.eventie)}(this),function(){function e(){}function i(e,t){var n=e.length;while(n--)if(e[n].listener===t)return n;return-1}function s(e){return function(){return this[e].apply(this,arguments)}}var t=e.prototype,n=this,r=n.EventEmitter;t.getListeners=function(t){var n=this._getEvents(),r,i;if(t instanceof RegExp){r={};for(i in n)n.hasOwnProperty(i)&&t.test(i)&&(r[i]=n[i])}else r=n[t]||(n[t]=[]);return r},t.flattenListeners=function(t){var n=[],r;for(r=0;r<t.length;r+=1)n.push(t[r].listener);return n},t.getListenersAsObject=function(t){var n=this.getListeners(t),r;return n instanceof Array&&(r={},r[t]=n),r||n},t.addListener=function(t,n){var r=this.getListenersAsObject(t),s=typeof n=="object",o;for(o in r)r.hasOwnProperty(o)&&i(r[o],n)===-1&&r[o].push(s?n:{listener:n,once:!1});return this},t.on=s("addListener"),t.addOnceListener=function(t,n){return this.addListener(t,{listener:n,once:!0})},t.once=s("addOnceListener"),t.defineEvent=function(t){return this.getListeners(t),this},t.defineEvents=function(t){for(var n=0;n<t.length;n+=1)this.defineEvent(t[n]);return this},t.removeListener=function(t,n){var r=this.getListenersAsObject(t),s,o;for(o in r)r.hasOwnProperty(o)&&(s=i(r[o],n),s!==-1&&r[o].splice(s,1));return this},t.off=s("removeListener"),t.addListeners=function(t,n){return this.manipulateListeners(!1,t,n)},t.removeListeners=function(t,n){return this.manipulateListeners(!0,t,n)},t.manipulateListeners=function(t,n,r){var i,s,o=t?this.removeListener:this.addListener,u=t?this.removeListeners:this.addListeners;if(typeof n!="object"||n instanceof RegExp){i=r.length;while(i--)o.call(this,n,r[i])}else for(i in n)n.hasOwnProperty(i)&&(s=n[i])&&(typeof s=="function"?o.call(this,i,s):u.call(this,i,s));return this},t.removeEvent=function(t){var n=typeof t,r=this._getEvents(),i;if(n==="string")delete r[t];else if(t instanceof RegExp)for(i in r)r.hasOwnProperty(i)&&t.test(i)&&delete r[i];else delete this._events;return this},t.removeAllListeners=s("removeEvent"),t.emitEvent=function(t,n){var r=this.getListenersAsObject(t),i,s,o,u;for(o in r)if(r.hasOwnProperty(o)){s=r[o].length;while(s--)i=r[o][s],i.once===!0&&this.removeListener(t,i.listener),u=i.listener.apply(this,n||[]),u===this._getOnceReturnValue()&&this.removeListener(t,i.listener)}return this},t.trigger=s("emitEvent"),t.emit=function(t){var n=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,n)},t.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},t._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},t._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return n.EventEmitter=r,e},typeof define=="function"&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):typeof module=="object"&&module.exports?module.exports=e:this.EventEmitter=e}.call(this),function(e){function r(e){if(!e)return;if(typeof n[e]=="string")return e;e=e.charAt(0).toUpperCase()+e.slice(1);var r;for(var i=0,s=t.length;i<s;i++){r=t[i]+e;if(typeof n[r]=="string")return r}}var t="Webkit Moz ms Ms O".split(" "),n=document.documentElement.style;typeof define=="function"&&define.amd?define("get-style-property/get-style-property",[],function(){return r}):typeof exports=="object"?module.exports=r:e.getStyleProperty=r}(window),function(e,t){function i(e){var t=parseFloat(e),n=e.indexOf("%")===-1&&!isNaN(t);return n&&t}function o(){var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var t=0,n=s.length;t<n;t++){var r=s[t];e[r]=0}return e}function u(e){function a(e){typeof e=="string"&&(e=document.querySelector(e));if(!e||typeof e!="object"||!e.nodeType)return;var n=r(e);if(n.display==="none")return o();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;var l=a.isBorderBox=!!t&&!!n[t]&&n[t]==="border-box";for(var c=0,h=s.length;c<h;c++){var p=s[c],d=n[p];d=f(e,d);var v=parseFloat(d);a[p]=isNaN(v)?0:v}var m=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,b=a.marginTop+a.marginBottom,w=a.borderLeftWidth+a.borderRightWidth,E=a.borderTopWidth+a.borderBottomWidth,S=l&&u,x=i(n.width);x!==!1&&(a.width=x+(S?0:m+w));var T=i(n.height);return T!==!1&&(a.height=T+(S?0:g+E)),a.innerWidth=a.width-(m+w),a.innerHeight=a.height-(g+E),a.outerWidth=a.width+y,a.outerHeight=a.height+b,a}function f(e,t){if(n||t.indexOf("%")===-1)return t;var r=e.style,i=r.left,s=e.runtimeStyle,o=s&&s.left;return o&&(s.left=e.currentStyle.left),r.left=t,t=r.pixelLeft,r.left=i,o&&(s.left=o),t}var t=e("boxSizing"),u;return function(){if(!t)return;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[t]="border-box";var n=document.body||document.documentElement;n.appendChild(e);var s=r(e);u=i(s.width)===200,n.removeChild(e)}(),a}var n=e.getComputedStyle,r=n?function(e){return n(e,null)}:function(e){return e.currentStyle},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];typeof define=="function"&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],u):typeof exports=="object"?module.exports=u(require("get-style-property")):e.getSize=u(e.getStyleProperty)}(window),function(e,t){function r(e,t){return e[n](t)}function i(e){if(e.parentNode)return;var t=document.createDocumentFragment();t.appendChild(e)}function s(e,t){i(e);var n=e.parentNode.querySelectorAll(t);for(var r=0,s=n.length;r<s;r++)if(n[r]===e)return!0;return!1}function o(e,t){return i(e),r(e,t)}var n=function(){if(t.matchesSelector)return"matchesSelector";var e=["webkit","moz","ms","o"];for(var n=0,r=e.length;n<r;n++){var i=e[n],s=i+"MatchesSelector";if(t[s])return s}}(),u;if(n){var a=document.createElement("div"),f=r(a,"div");u=f?r:o}else u=s;typeof define=="function"&&define.amd?define("matches-selector/matches-selector",[],function(){return u}):window.matchesSelector=u}(this,Element.prototype),function(e){function r(e,t){for(var n in t)e[n]=t[n];return e}function i(e){for(var t in e)return!1;return t=null,!0}function s(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function o(e,t,o){function d(e,t){if(!e)return;this.element=e,this.layout=t,this.position={x:0,y:0},this._create()}var u=o("transition"),a=o("transform"),f=u&&a,l=!!o("perspective"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],h=["transform","transition","transitionDuration","transitionProperty"],p=function(){var e={};for(var t=0,n=h.length;t<n;t++){var r=h[t],i=o(r);i&&i!==r&&(e[r]=i)}return e}();r(d.prototype,e.prototype),d.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},d.prototype.getSize=function(){this.size=t(this.element)},d.prototype.css=function(e){var t=this.element.style;for(var n in e){var r=p[n]||n;t[r]=e[n]}},d.prototype.getPosition=function(){var e=n(this.element),t=this.layout.options,r=t.isOriginLeft,i=t.isOriginTop,s=parseInt(e[r?"left":"right"],10),o=parseInt(e[i?"top":"bottom"],10);s=isNaN(s)?0:s,o=isNaN(o)?0:o;var u=this.layout.size;s-=r?u.paddingLeft:u.paddingRight,o-=i?u.paddingTop:u.paddingBottom,this.position.x=s,this.position.y=o},d.prototype.layoutPosition=function(){var e=this.layout.size,t=this.layout.options,n={};t.isOriginLeft?(n.left=this.position.x+e.paddingLeft+"px",n.right=""):(n.right=this.position.x+e.paddingRight+"px",n.left=""),t.isOriginTop?(n.top=this.position.y+e.paddingTop+"px",n.bottom=""):(n.bottom=this.position.y+e.paddingBottom+"px",n.top=""),this.css(n),this.emitEvent("layout",[this])};var v=l?function(e,t){return"translate3d("+e+"px, "+t+"px, 0)"}:function(e,t){return"translate("+e+"px, "+t+"px)"};d.prototype._transitionTo=function(e,t){this.getPosition();var n=this.position.x,r=this.position.y,i=parseInt(e,10),s=parseInt(t,10),o=i===this.position.x&&s===this.position.y;this.setPosition(e,t);if(o&&!this.isTransitioning){this.layoutPosition();return}var u=e-n,a=t-r,f={},l=this.layout.options;u=l.isOriginLeft?u:-u,a=l.isOriginTop?a:-a,f.transform=v(u,a),this.transition({to:f,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.prototype.goTo=function(e,t){this.setPosition(e,t),this.layoutPosition()},d.prototype.moveTo=f?d.prototype._transitionTo:d.prototype.goTo,d.prototype.setPosition=function(e,t){this.position.x=parseInt(e,10),this.position.y=parseInt(t,10)},d.prototype._nonTransition=function(e){this.css(e.to),e.isCleaning&&this._removeStyles(e.to);for(var t in e.onTransitionEnd)e.onTransitionEnd[t].call(this)},d.prototype._transition=function(e){if(!parseFloat(this.layout.options.transitionDuration)){this._nonTransition(e);return}var t=this._transn;for(var n in e.onTransitionEnd)t.onEnd[n]=e.onTransitionEnd[n];for(n in e.to)t.ingProperties[n]=!0,e.isCleaning&&(t.clean[n]=!0);if(e.from){this.css(e.from);var r=this.element.offsetHeight;r=null}this.enableTransition(e.to),this.css(e.to),this.isTransitioning=!0};var m=a&&s(a)+",opacity";d.prototype.enableTransition=function(){if(this.isTransitioning)return;this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(c,this,!1)},d.prototype.transition=d.prototype[u?"_transition":"_nonTransition"],d.prototype.onwebkitTransitionEnd=function(e){this.ontransitionend(e)},d.prototype.onotransitionend=function(e){this.ontransitionend(e)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};d.prototype.ontransitionend=function(e){if(e.target!==this.element)return;var t=this._transn,n=g[e.propertyName]||e.propertyName;delete t.ingProperties[n],i(t.ingProperties)&&this.disableTransition(),n in t.clean&&(this.element.style[e.propertyName]="",delete t.clean[n]);if(n in t.onEnd){var r=t.onEnd[n];r.call(this),delete t.onEnd[n]}this.emitEvent("transitionEnd",[this])},d.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(c,this,!1),this.isTransitioning=!1},d.prototype._removeStyles=function(e){var t={};for(var n in e)t[n]="";this.css(t)};var y={transitionProperty:"",transitionDuration:""};return d.prototype.removeTransitionStyles=function(){this.css(y)},d.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},d.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration)){this.removeElem();return}var e=this;this.on("transitionEnd",function(){return e.removeElem(),!0}),this.hide()},d.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var e=this.layout.options;this.transition({from:e.hiddenStyle,to:e.visibleStyle,isCleaning:!0})},d.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var e=this.layout.options;this.transition({from:e.visibleStyle,to:e.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},d.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},d}var t=e.getComputedStyle,n=t?function(e){return t(e,null)}:function(e){return e.currentStyle};typeof define=="function"&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],o):(e.Outlayer={},e.Outlayer.Item=o(e.EventEmitter,e.getSize,e.getStyleProperty))}(window),function(e){function s(e,t){for(var n in t)e[n]=t[n];return e}function u(e){return o.call(e)==="[object Array]"}function a(e){var t=[];if(u(e))t=e;else if(e&&typeof e.length=="number")for(var n=0,r=e.length;n<r;n++)t.push(e[n]);else t.push(e);return t}function c(e,t){var n=l(t,e);n!==-1&&t.splice(n,1)}function h(e){return e.replace(/(.)([A-Z])/g,function(e,t,n){return t+"-"+n}).toLowerCase()}function p(o,u,l,p,d,v){function y(e,r){typeof e=="string"&&(e=t.querySelector(e));if(!e||!f(e)){n&&n.error("Bad "+this.constructor.namespace+" element: "+e);return}this.element=e,this.options=s({},this.constructor.defaults),this.option(r);var i=++m;this.element.outlayerGUID=i,g[i]=this,this._create(),this.options.isInitLayout&&this.layout()}var m=0,g={};return y.namespace="outlayer",y.Item=v,y.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},s(y.prototype,l.prototype),y.prototype.option=function(e){s(this.options,e)},y.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),s(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},y.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},y.prototype._itemize=function(e){var t=this._filterFindItemElements(e),n=this.constructor.Item,r=[];for(var i=0,s=t.length;i<s;i++){var o=t[i],u=new n(o,this);r.push(u)}return r},y.prototype._filterFindItemElements=function(e){e=a(e);var t=this.options.itemSelector,n=[];for(var r=0,i=e.length;r<i;r++){var s=e[r];if(!f(s))continue;if(t){d(s,t)&&n.push(s);var o=s.querySelectorAll(t);for(var u=0,l=o.length;u<l;u++)n.push(o[u])}else n.push(s)}return n},y.prototype.getItemElements=function(){var e=[];for(var t=0,n=this.items.length;t<n;t++)e.push(this.items[t].element);return e},y.prototype.layout=function(){this._resetLayout(),this._manageStamps();var e=this.options.isLayoutInstant!==undefined?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},y.prototype._init=y.prototype.layout,y.prototype._resetLayout=function(){this.getSize()},y.prototype.getSize=function(){this.size=p(this.element)},y.prototype._getMeasurement=function(e,t){var n=this.options[e],r;n?(typeof n=="string"?r=this.element.querySelector(n):f(n)&&(r=n),this[e]=r?p(r)[t]:n):this[e]=0},y.prototype.layoutItems=function(e,t){e=this._getItemsForLayout(e),this._layoutItems(e,t),this._postLayout()},y.prototype._getItemsForLayout=function(e){var t=[];for(var n=0,r=e.length;n<r;n++){var i=e[n];i.isIgnored||t.push(i)}return t},y.prototype._layoutItems=function(e,t){function r(){n.emitEvent("layoutComplete",[n,e])}var n=this;if(!e||!e.length){r();return}this._itemsOn(e,"layout",r);var i=[];for(var s=0,o=e.length;s<o;s++){var u=e[s],a=this._getItemLayoutPosition(u);a.item=u,a.isInstant=t||u.isLayoutInstant,i.push(a)}this._processLayoutQueue(i)},y.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},y.prototype._processLayoutQueue=function(e){for(var t=0,n=e.length;t<n;t++){var r=e[t];this._positionItem(r.item,r.x,r.y,r.isInstant)}},y.prototype._positionItem=function(e,t,n,r){r?e.goTo(t,n):e.moveTo(t,n)},y.prototype._postLayout=function(){this.resizeContainer()},y.prototype.resizeContainer=function(){if(!this.options.isResizingContainer)return;var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))},y.prototype._getContainerSize=i,y.prototype._setContainerMeasure=function(e,t){if(e===undefined)return;var n=this.size;n.isBorderBox&&(e+=t?n.paddingLeft+n.paddingRight+n.borderLeftWidth+n.borderRightWidth:n.paddingBottom+n.paddingTop+n.borderTopWidth+n.borderBottomWidth),e=Math.max(e,0),this.element.style[t?"width":"height"]=e+"px"},y.prototype._itemsOn=function(e,t,n){function o(){return r++,r===i&&n.call(s),!0}var r=0,i=e.length,s=this;for(var u=0,a=e.length;u<a;u++){var f=e[u];f.on(t,o)}},y.prototype.ignore=function(e){var t=this.getItem(e);t&&(t.isIgnored=!0)},y.prototype.unignore=function(e){var t=this.getItem(e);t&&delete t.isIgnored},y.prototype.stamp=function(e){e=this._find(e);if(!e)return;this.stamps=this.stamps.concat(e);for(var t=0,n=e.length;t<n;t++){var r=e[t];this.ignore(r)}},y.prototype.unstamp=function(e){e=this._find(e);if(!e)return;for(var t=0,n=e.length;t<n;t++){var r=e[t];c(r,this.stamps),this.unignore(r)}},y.prototype._find=function(e){if(!e)return;return typeof e=="string"&&(e=this.element.querySelectorAll(e)),e=a(e),e},y.prototype._manageStamps=function(){if(!this.stamps||!this.stamps.length)return;this._getBoundingRect();for(var e=0,t=this.stamps.length;e<t;e++){var n=this.stamps[e];this._manageStamp(n)}},y.prototype._getBoundingRect=function(){var e=this.element.getBoundingClientRect(),t=this.size;this._boundingRect={left:e.left+t.paddingLeft+t.borderLeftWidth,top:e.top+t.paddingTop+t.borderTopWidth,right:e.right-(t.paddingRight+t.borderRightWidth),bottom:e.bottom-(t.paddingBottom+t.borderBottomWidth)}},y.prototype._manageStamp=i,y.prototype._getElementOffset=function(e){var t=e.getBoundingClientRect(),n=this._boundingRect,r=p(e),i={left:t.left-n.left-r.marginLeft,top:t.top-n.top-r.marginTop,right:n.right-t.right-r.marginRight,bottom:n.bottom-t.bottom-r.marginBottom};return i},y.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},y.prototype.bindResize=function(){if(this.isResizeBound)return;o.bind(e,"resize",this),this.isResizeBound=!0},y.prototype.unbindResize=function(){this.isResizeBound&&o.unbind(e,"resize",this),this.isResizeBound=!1},y.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},y.prototype.resize=function(){if(!this.isResizeBound||!this.needsResizeLayout())return;this.layout()},y.prototype.needsResizeLayout=function(){var e=p(this.element),t=this.size&&e;return t&&e.innerWidth!==this.size.innerWidth},y.prototype.addItems=function(e){var t=this._itemize(e);return t.length&&(this.items=this.items.concat(t)),t},y.prototype.appended=function(e){var t=this.addItems(e);if(!t.length)return;this.layoutItems(t,!0),this.reveal(t)},y.prototype.prepended=function(e){var t=this._itemize(e);if(!t.length)return;var n=this.items.slice(0);this.items=t.concat(n),this._resetLayout(),this._manageStamps(),this.layoutItems(t,!0),this.reveal(t),this.layoutItems(n)},y.prototype.reveal=function(e){var t=e&&e.length;if(!t)return;for(var n=0;n<t;n++){var r=e[n];r.reveal()}},y.prototype.hide=function(e){var t=e&&e.length;if(!t)return;for(var n=0;n<t;n++){var r=e[n];r.hide()}},y.prototype.getItem=function(e){for(var t=0,n=this.items.length;t<n;t++){var r=this.items[t];if(r.element===e)return r}},y.prototype.getItems=function(e){if(!e||!e.length)return;var t=[];for(var n=0,r=e.length;n<r;n++){var i=e[n],s=this.getItem(i);s&&t.push(s)}return t},y.prototype.remove=function(e){e=a(e);var t=this.getItems(e);if(!t||!t.length)return;this._itemsOn(t,"remove",function(){this.emitEvent("removeComplete",[this,t])});for(var n=0,r=t.length;n<r;n++){var i=t[n];i.remove(),c(i,this.items)}},y.prototype.destroy=function(){var e=this.element.style;e.height="",e.position="",e.width="";for(var t=0,n=this.items.length;t<n;t++){var i=this.items[t];i.destroy()}this.unbindResize(),delete this.element.outlayerGUID,r&&r.removeData(this.element,this.constructor.namespace)},y.data=function(e){var t=e&&e.outlayerGUID;return t&&g[t]},y.create=function(e,i){function o(){y.apply(this,arguments)}return Object.create?o.prototype=Object.create(y.prototype):s(o.prototype,y.prototype),o.prototype.constructor=o,o.defaults=s({},y.defaults),s(o.defaults,i),o.prototype.settings={},o.namespace=e,o.data=y.data,o.Item=function(){v.apply(this,arguments)},o.Item.prototype=new v,u(function(){var i=h(e),s=t.querySelectorAll(".js-"+i),u="data-"+i+"-options";for(var a=0,f=s.length;a<f;a++){var l=s[a],c=l.getAttribute(u),p;try{p=c&&JSON.parse(c)}catch(d){n&&n.error("Error parsing "+u+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+d);continue}var v=new o(l,p);r&&r.data(l,e,v)}}),r&&r.bridget&&r.bridget(e,o),o},y.Item=v,y}var t=e.document,n=e.console,r=e.jQuery,i=function(){},o=Object.prototype.toString,f=typeof HTMLElement=="object"?function(t){return t instanceof HTMLElement}:function(t){return t&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"},l=Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1};typeof define=="function"&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],p):e.Outlayer=p(e.eventie,e.docReady,e.EventEmitter,e.getSize,e.matchesSelector,e.Outlayer.Item)}(window),function(e){function t(e){function t(){e.Item.apply(this,arguments)}t.prototype=new e.Item,t.prototype._create=function(){this.id=this.layout.itemGUID++,e.Item.prototype._create.call(this),this.sortData={}},t.prototype.updateSortData=function(){if(this.isIgnored)return;this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var e=this.layout.options.getSortData,t=this.layout._sorters;for(var n in e){var r=t[n];this.sortData[n]=r(this.element,this)}};var n=t.prototype.destroy;return t.prototype.destroy=function(){n.apply(this,arguments),this.css({display:""})},t}typeof define=="function"&&define.amd?define("isotope/js/item",["outlayer/outlayer"],t):(e.Isotope=e.Isotope||{},e.Isotope.Item=t(e.Outlayer))}(window),function(e){function t(e,t){function n(e){this.isotope=e,e&&(this.options=e.options[this.namespace],this.element=e.element,this.items=e.filteredItems,this.size=e.size)}return function(){function o(e){return function(){return t.prototype[e].apply(this.isotope,arguments)}}var e=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"];for(var r=0,i=e.length;r<i;r++){var s=e[r];n.prototype[s]=o(s)}}(),n.prototype.needsVerticalResizeLayout=function(){var t=e(this.isotope.element),n=this.isotope.size&&t;return n&&t.innerHeight!==this.isotope.size.innerHeight},n.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},n.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},n.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},n.prototype.getSegmentSize=function(e,t){var n=e+t,r="outer"+t;this._getMeasurement(n,r);if(this[n])return;var i=this.getFirstItemSize();this[n]=i&&i[r]||this.isotope.size["inner"+t]},n.prototype.getFirstItemSize=function(){var t=this.isotope.filteredItems[0];return t&&t.element&&e(t.element)},n.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},n.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},n.modes={},n.create=function(e,t){function r(){n.apply(this,arguments)}return r.prototype=new n,t&&(r.options=t),r.prototype.namespace=e,n.modes[e]=r,r},n}typeof define=="function"&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],t):(e.Isotope=e.Isotope||{},e.Isotope.LayoutMode=t(e.getSize,e.Outlayer))}(window),function(e){function n(e,n){var r=e.create("masonry");return r.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var e=this.cols;this.colYs=[];while(e--)this.colYs.push(0);this.maxY=0},r.prototype.measureColumns=function(){this.getContainerWidth();if(!this.columnWidth){var e=this.items[0],t=e&&e.element;this.columnWidth=t&&n(t).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},r.prototype.getContainerWidth=function(){var e=this.options.isFitWidth?this.element.parentNode:this.element,t=n(e);this.containerWidth=t&&t.innerWidth},r.prototype._getItemLayoutPosition=function(e){e.getSize();var n=e.size.outerWidth%this.columnWidth,r=n&&n<1?"round":"ceil",i=Math[r](e.size.outerWidth/this.columnWidth);i=Math.min(i,this.cols);var s=this._getColGroup(i),o=Math.min.apply(Math,s),u=t(s,o),a={x:this.columnWidth*u,y:o},f=o+e.size.outerHeight,l=this.cols+1-s.length;for(var c=0;c<l;c++)this.colYs[u+c]=f;return a},r.prototype._getColGroup=function(e){if(e<2)return this.colYs;var t=[],n=this.cols+1-e;for(var r=0;r<n;r++){var i=this.colYs.slice(r,r+e);t[r]=Math.max.apply(Math,i)}return t},r.prototype._manageStamp=function(e){var t=n(e),r=this._getElementOffset(e),i=this.options.isOriginLeft?r.left:r.right,s=i+t.outerWidth,o=Math.floor(i/this.columnWidth);o=Math.max(0,o);var u=Math.floor(s/this.columnWidth);u-=s%this.columnWidth?0:1,u=Math.min(this.cols-1,u);var a=(this.options.isOriginTop?r.top:r.bottom)+t.outerHeight;for(var f=o;f<=u;f++)this.colYs[f]=Math.max(a,this.colYs[f])},r.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var e={height:this.maxY};return this.options.isFitWidth&&(e.width=this._getContainerFitWidth()),e},r.prototype._getContainerFitWidth=function(){var e=0,t=this.cols;while(--t){if(this.colYs[t]!==0)break;e++}return(this.cols-e)*this.columnWidth-this.gutter},r.prototype.needsResizeLayout=function(){var e=this.containerWidth;return this.getContainerWidth(),e!==this.containerWidth},r}var t=Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i===t)return n}return-1};typeof define=="function"&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],n):e.Masonry=n(e.Outlayer,e.getSize)}(window),function(e){function t(e,t){for(var n in t)e[n]=t[n];return e}function n(e,n){var r=e.create("masonry"),i=r.prototype._getElementOffset,s=r.prototype.layout,o=r.prototype._getMeasurement;t(r.prototype,n.prototype),r.prototype._getElementOffset=i,r.prototype.layout=s,r.prototype._getMeasurement=o;var u=r.prototype.measureColumns;r.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,u.call(this)};var a=r.prototype._manageStamp;return r.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,a.apply(this,arguments)},r}typeof define=="function"&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],n):n(e.Isotope.LayoutMode,e.Masonry)}(window),function(e){function t(e){var t=e.create("fitRows");return t.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0},t.prototype._getItemLayoutPosition=function(e){e.getSize(),this.x!==0&&e.size.outerWidth+this.x>this.isotope.size.innerWidth&&(this.x=0,this.y=this.maxY);var t={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+e.size.outerHeight),this.x+=e.size.outerWidth,t},t.prototype._getContainerSize=function(){return{height:this.maxY}},t}typeof define=="function"&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],t):t(e.Isotope.LayoutMode)}(window),function(e){function t(e){var t=e.create("vertical",{horizontalAlignment:0});return t.prototype._resetLayout=function(){this.y=0},t.prototype._getItemLayoutPosition=function(e){e.getSize();var t=(this.isotope.size.innerWidth-e.size.outerWidth)*this.options.horizontalAlignment,n=this.y;return this.y+=e.size.outerHeight,{x:t,y:n}},t.prototype._getContainerSize=function(){return{height:this.y}},t}typeof define=="function"&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],t):t(e.Isotope.LayoutMode)}(window),function(e){function n(e,t){for(var n in t)e[n]=t[n];return e}function u(e){return o.call(e)==="[object Array]"}function f(e){var t=[];if(u(e))t=e;else if(e&&typeof e.length=="number")for(var n=0,r=e.length;n<r;n++)t.push(e[n]);else t.push(e);return t}function l(e,t){var n=a(t,e);n!==-1&&t.splice(n,1)}function c(e,i,o,u,a){function p(e,t){return function(r,i){for(var s=0,o=e.length;s<o;s++){var u=e[s],a=r.sortData[u],f=i.sortData[u];if(a>f||a<f){var l=t[u]!==undefined?t[u]:t,c=l?1:-1;return(a>f?1:-1)*c}}return 0}}var c=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});c.Item=u,c.LayoutMode=a,c.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in a.modes)this._initLayoutMode(t)},c.prototype.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},c.prototype._itemize=function(){var t=e.prototype._itemize.apply(this,arguments);for(var n=0,r=t.length;n<r;n++){var i=t[n];i.id=this.itemGUID++}return this._updateItemsSortData(t),t},c.prototype._initLayoutMode=function(e){var t=a.modes[e],r=this.options[e]||{};this.options[e]=t.options?n(t.options,r):r,this.modes[e]=new t(this)},c.prototype.layout=function(){if(!this._isLayoutInited&&this.options.isInitLayout){this.arrange();return}this._layout()},c.prototype._layout=function(){var e=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,e),this._isLayoutInited=!0},c.prototype.arrange=function(e){this.option(e),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},c.prototype._init=c.prototype.arrange,c.prototype._getIsInstant=function(){var e=this.options.isLayoutInstant!==undefined?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=e,e},c.prototype._filter=function(e){function c(){l.reveal(r),l.hide(i)}var t=this.options.filter;t=t||"*";var n=[],r=[],i=[],s=this._getFilterTest(t);for(var o=0,u=e.length;o<u;o++){var a=e[o];if(a.isIgnored)continue;var f=s(a);f&&n.push(a),f&&a.isHidden?r.push(a):!f&&!a.isHidden&&i.push(a)}var l=this;return this._isInstant?this._noTransition(c):c(),n},c.prototype._getFilterTest=function(e){return t&&this.options.isJQueryFiltering?function(n){return t(n.element).is(e)}:typeof e=="function"?function(t){return e(t.element)}:function(t){return o(t.element,e)}},c.prototype.updateSortData=function(e){this._getSorters(),e=f(e);var t=this.getItems(e);t=t.length?t:this.items,this._updateItemsSortData(t)},c.prototype._getSorters=function(){var e=this.options.getSortData;for(var t in e){var n=e[t];this._sorters[t]=h(n)}},c.prototype._updateItemsSortData=function(e){for(var t=0,n=e.length;t<n;t++){var r=e[t];r.updateSortData()}};var h=function(){function e(e){if(typeof e!="string")return e;var n=r(e).split(" "),i=n[0],s=i.match(/^\[(.+)\]$/),o=s&&s[1],u=t(o,i),a=c.sortDataParsers[n[1]];return e=a?function(e){return e&&a(u(e))}:function(e){return e&&u(e)},e}function t(e,t){var n;return e?n=function(t){return t.getAttribute(e)}:n=function(e){var n=e.querySelector(t);return n&&s(n)},n}return e}();c.sortDataParsers={parseInt:function(e){return parseInt(e,10)},parseFloat:function(e){return parseFloat(e)}},c.prototype._sort=function(){var e=this.options.sortBy;if(!e)return;var t=[].concat.apply(e,this.sortHistory),n=p(t,this.options.sortAscending);this.filteredItems.sort(n),e!==this.sortHistory[0]&&this.sortHistory.unshift(e)},c.prototype._mode=function(){var e=this.options.layoutMode,t=this.modes[e];if(!t)throw new Error("No layout mode: "+e);return t.options=this.options[e],t},c.prototype._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},c.prototype._getItemLayoutPosition=function(e){return this._mode()._getItemLayoutPosition(e)},c.prototype._manageStamp=function(e){this._mode()._manageStamp(e)},c.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},c.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},c.prototype.appended=function(e){var t=this.addItems(e);if(!t.length)return;var n=this._filterRevealAdded(t);this.filteredItems=this.filteredItems.concat(n)},c.prototype.prepended=function(e){var t=this._itemize(e);if(!t.length)return;var n=this.items.slice(0);this.items=t.concat(n),this._resetLayout(),this._manageStamps();var r=this._filterRevealAdded(t);this.layoutItems(n),this.filteredItems=r.concat(this.filteredItems)},c.prototype._filterRevealAdded=function(e){var t=this._noTransition(function(){return this._filter(e)});return this.layoutItems(t,!0),this.reveal(t),e},c.prototype.insert=function(e){var t=this.addItems(e);if(!t.length)return;var n,r,i=t.length;for(n=0;n<i;n++)r=t[n],this.element.appendChild(r.element);var s=this._filter(t);this._noTransition(function(){this.hide(s)});for(n=0;n<i;n++)t[n].isLayoutInstant=!0;this.arrange();for(n=0;n<i;n++)delete t[n].isLayoutInstant;this.reveal(s)};var d=c.prototype.remove;return c.prototype.remove=function(e){e=f(e);var t=this.getItems(e);d.call(this,e);if(!t||!t.length)return;for(var n=0,r=t.length;n<r;n++){var i=t[n];l(i,this.filteredItems)}},c.prototype.shuffle=function(){for(var e=0,t=this.items.length;e<t;e++){var n=this.items[e];n.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},c.prototype._noTransition=function(e){var t=this.options.transitionDuration;this.options.transitionDuration=0;var n=e.call(this);return this.options.transitionDuration=t,n},c.prototype.getFilteredItemElements=function(){var e=[];for(var t=0,n=this.filteredItems.length;t<n;t++)e.push(this.filteredItems[t].element);return e},c}var t=e.jQuery,r=String.prototype.trim?function(e){return e.trim()}:function(e){return e.replace(/^\s+|\s+$/g,"")},i=document.documentElement,s=i.textContent?function(e){return e.textContent}:function(e){return e.innerText},o=Object.prototype.toString,a=Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1};typeof define=="function"&&define.amd?define("app/plugins/isotope/isotope.pkgd",["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],c):e.Isotope=c(e.Outlayer,e.getSize,e.matchesSelector,e.Isotope.Item,e.Isotope.LayoutMode)}(window),define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t+=1)e[t](s)}function a(){var e=o;i&&e.length&&(o=[],u(e))}function f(){i||(i=!0,n&&clearInterval(n),a())}function c(e){return i?e(s):o.push(e),c}var e,t,n,r=typeof window!="undefined"&&window.document,i=!r,s=r?document:null,o=[];if(r){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),t=document.createElement("div");try{e=window.frameElement===null}catch(l){}t.doScroll&&e&&window.external&&(n=setInterval(function(){try{t.doScroll(),f()}catch(e){}},30))}document.readyState==="complete"&&f()}return c.version="2.0.1",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),define("app/views/home/Home",["require","jquery","hb!./Home.htm","hb!./title.htm","jock/template/template-engine","jock/view/view-manager","app/plugins/isotope/isotope.pkgd","domReady!"],function(e){function u(){function r(e){console.log("arg",e),t("#radios").radiosToSlider();var n=new o("#isotope",{layoutMode:"masonry",transitionDuration:"1s"});t("#radios").click(function(e){var r=t(e.target),i=r.data("radio");if(i==null)return;i==="fast"?i="*":i="."+i,console.log(i),n.arrange({filter:i})}),t("#down").on("click",function(){window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,i()})}function i(){var e=new XMLHttpRequest;e.open("GET","test.pdf"),e.responseType="arraybuffer",e.onload=function(){if(this.status===200){console.log(e.response);var n=new Blob([e.response],{type:"application/pdf"}),r=URL.createObjectURL(n);t("<a id='moo' href='"+r+"' download='QuoteComparisonReport.pdf' style='display:none'></a>").appendTo("body"),t("#moo")[0].click()}},e.send()}var e=this;this.onInit=function(e,t){e.attach(n).then(r)}}var t=e("jquery"),n=e("hb!./Home.htm"),r=e("hb!./title.htm"),i=e("jock/template/template-engine"),s=e("jock/view/view-manager"),o=e("app/plugins/isotope/isotope.pkgd");return e("domReady!"),u}),define("hb!app/views/customer/CustomerSearch.htm",["handlebars"],function(e){return e.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,s='<div class="container">\r\n\r\n    <h1>Customer Search</h1>\r\n\r\n    <table class="table">\r\n        <thead>\r\n        <th>Name</th>\r\n        <th>Action</th>\r\n        </thead>\r\n        <tbody>\r\n';return i=t.each.call(e,e!=null?e.customers:e,{name:"each",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),i!=null&&(s+=i),s+"        </tbody>\r\n    </table>\r\n\r\n</div>"},1:function(e,t,n,r){var i,s="function",o=t.helperMissing,u=this.escapeExpression;return"            <tr>\r\n                <td>"+u((i=(i=t.name||(e!=null?e.name:e))!=null?i:o,typeof i===s?i.call(e,{name:"name",hash:{},data:r}):i))+"</td>\r\n                <td><a href='' "+u((t.action||e&&e.action||o).call(e,{name:"action",hash:{click:r&&r.edit},data:r}))+">Edit</a> | <a href='' "+u((t.action||e&&e.action||o).call(e,{name:"action",hash:{click:r&&r.remove},data:r}))+">Delete</a></td>\r\n            </tr>\r\n\r\n"},useData:!0})}),define("hb!app/views/customer/CustomerEdit.htm",["handlebars"],function(e){return e.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i=t.helperMissing,s=this.escapeExpression;return'<div class="container">\r\n\r\n    <h1>Customer Edit</h1>\r\n\r\n    <div class="row">\r\n        <div class="form-group col-md-12">\r\n            <form id="form"  role="form" name="form" method="post" action="submit.action">\r\n                <div class="row">\r\n                    <div class="form-group col-md-3">\r\n\r\n                        <label for="name">Name</label>\r\n                        <input type="text" class="form-control" id="name" name="name" placeholder="Enter name">\r\n                    </div>\r\n                </div>\r\n\r\n                <div class="row">\r\n                    <div class="form-group col-md-3">\r\n\r\n                        <label for="email">Email</label>\r\n                        <input class="form-control validate[required, custom[email]]" type="text" name="email" id="email" />\r\n                    </div>\r\n                </div>\r\n\r\n                <input type="hidden" name="id">\r\n\r\n                <div class="row">\r\n                    <div class="form-group col-md-3">\r\n                        <button type="submit" class="btn btn-primary"  '+s((t.action||e&&e.action||i).call(e,{name:"action",hash:{click:r&&r.save},data:r}))+'>Save</button>\r\n                        <button class="btn btn-default"  '+s((t.action||e&&e.action||i).call(e,{name:"action",hash:{click:r&&r.back},data:r}))+">Back</button>\r\n                    </div>\r\n                </div>\r\n            </form>\r\n\r\n        </div>\r\n    </div>\r\n</div>"},useData:!0})}),function(e){e("app/plugins/toastr",["jquery"],function(e){return function(){function o(e,t,n){return g({type:i.error,iconClass:b().iconClasses.error,message:e,optionsOverride:n,title:t})}function u(e,t,n){return g({type:i.info,iconClass:b().iconClasses.info,message:e,optionsOverride:n,title:t})}function a(e){n=e}function f(e,t,n){return g({type:i.success,iconClass:b().iconClasses.success,message:e,optionsOverride:n,title:t})}function l(e,t,n){return g({type:i.warning,iconClass:b().iconClasses.warning,message:e,optionsOverride:n,title:t})}function c(e){var n=b();t||y(n),d(e,n)||p(n)}function h(n){var r=b();t||y(r);if(n&&e(":focus",n).length===0){w(n);return}t.children().length&&t.remove()}function p(n){var r=t.children();for(var i=r.length-1;i>=0;i--)d(e(r[i]),n)}function d(t,n){return t&&e(":focus",t).length===0?(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){w(t)}}),!0):!1}function v(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:undefined,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:undefined,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:"<button>&times;</button>",newestOnTop:!0}}function m(e){if(!n)return;n(e)}function g(n){function h(t){if(e(":focus",u).length&&!t)return;return u[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){w(u),i.onHidden&&c.state!=="hidden"&&i.onHidden(),c.state="hidden",c.endTime=new Date,m(c)}})}function p(){if(i.timeOut>0||i.extendedTimeOut>0)o=setTimeout(h,i.extendedTimeOut)}function d(){clearTimeout(o),u.stop(!0,!0)[i.showMethod]({duration:i.showDuration,easing:i.showEasing})}var i=b(),s=n.iconClass||i.iconClass;typeof n.optionsOverride!="undefined"&&(i=e.extend(i,n.optionsOverride),s=n.optionsOverride.iconClass||s),r++,t=y(i);var o=null,u=e("<div/>"),a=e("<div/>"),f=e("<div/>"),l=e(i.closeHtml),c={toastId:r,state:"visible",startTime:new Date,options:i,map:n};return n.iconClass&&u.addClass(i.toastClass).addClass(s),n.title&&(a.append(n.title).addClass(i.titleClass),u.append(a)),n.message&&(f.append(n.message).addClass(i.messageClass),u.append(f)),i.closeButton&&(l.addClass("toast-close-button").attr("role","button"),u.prepend(l)),u.hide(),i.newestOnTop?t.prepend(u):t.append(u),u[i.showMethod]({duration:i.showDuration,easing:i.showEasing,complete:i.onShown}),i.timeOut>0&&(o=setTimeout(h,i.timeOut)),u.hover(d,p),!i.onclick&&i.tapToDismiss&&u.click(h),i.closeButton&&l&&l.click(function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble!==undefined&&e.cancelBubble!==!0&&(e.cancelBubble=!0),h(!0)}),i.onclick&&u.click(function(){i.onclick(),h()}),m(c),i.debug&&console&&console.log(c),u}function y(n){return n||(n=b()),t=e("#"+n.containerId),t.length?t:(t=e("<div/>").attr("id",n.containerId).addClass(n.positionClass).attr("aria-live","polite").attr("role","alert"),t.appendTo(e(n.target)),t)}function b(){return e.extend({},v(),s.options)}function w(e){t||(t=y());if(e.is(":visible"))return;e.remove(),e=null,t.children().length===0&&t.remove()}var t,n,r=0,i={error:"error",info:"info",success:"success",warning:"warning"},s={clear:c,remove:h,error:o,getContainer:y,info:u,options:{},subscribe:a,success:f,version:"2.0.2",warning:l};return s}()})}(typeof define=="function"&&define.amd?define:function(e,t){typeof module!="undefined"&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)}),define("app/views/customer/CustomerEdit",["require","jquery","hb!./CustomerEdit.htm","jock/template/template-engine","jock/view/view-manager","app/plugins/toastr","domReady!","./CustomerSearch"],function(e){function o(){function u(e,n,r){e.preventDefault();var i=t("#form").validationEngine("validate");if(i){var o=t("#form").toObject(),u=t.ajax("/data/customer"+o.id+".json"),a=r.data.container;a.tracker.add(u,{msg:"Saving..."}),s.success("Customer '"+o.name+"' saved!","Saved")}}function a(t,n,r){t.preventDefault();var s=e("./CustomerSearch");i.showView({view:s})}function f(e,t){var i={save:u,back:a},s=r.render(n,{customer:e},i,{data:{container:t}});return s}function l(e){t("#form").fromObject(e),t("#form").validationEngine()}var o={};return o.onInit=function(e,n){var r=e;if(n.params.id==null){r.cancel();return}var i=n.params.id,s=t.ajax("/data/customer"+i+".json");r.tracker.add(s),s.then(function(e){var t=f(e,r);r.attach(t).then(function(){l(e)})}),r.overwrite.then(function(e){console.error("Overwritten customer, aborting AJAX")})},o}var t=e("jquery"),n=e("hb!./CustomerEdit.htm"),r=e("jock/template/template-engine"),i=e("jock/view/view-manager"),s=e("app/plugins/toastr");return e("domReady!"),o}),define("app/views/customer/CustomerSearch",["require","jquery","hb!./CustomerSearch.htm","jock/template/template-engine","jock/view/view-manager","./CustomerEdit","domReady!"],function(e){function o(){function o(e,t){e.preventDefault(),i.showView({view:s,params:{id:t.id},args:{customer:t}})}function u(e,t){e.preventDefault(),console.log("Delete",t)}function a(e){var t={edit:o,remove:u},i=r.render(n,{customers:e},t);return i}function f(){}var e={};return e.onInit=function(e,n){var r=t.ajax("/data/customers.json");e.tracker.add(r),r.then(function(t){var r=a(t);e.attach(r).then(function(){f(n)}),e.visible.then(function(){f(n)})}),e.overwrite.then(function(e){console.error("Overwritten customers, aborting AJAX"),r.abort()})},e}var t=e("jquery"),n=e("hb!./CustomerSearch.htm"),r=e("jock/template/template-engine"),i=e("jock/view/view-manager"),s=e("./CustomerEdit");return e("domReady!"),o}),define("hb!app/views/product/ProductSearch.htm",["handlebars"],function(e){return e.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,s='<div class="container">\r\n\r\n    <h1>Product Search</h1>\r\n\r\n    <table class="table">\r\n        <thead>\r\n        <th>Name</th>\r\n        <th>Action</th>\r\n        </thead>\r\n        <tbody>\r\n';return i=t.each.call(e,e!=null?e.products:e,{name:"each",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),i!=null&&(s+=i),s+"        </tbody>\r\n    </table>\r\n\r\n</div>"},1:function(e,t,n,r){var i,s="function",o=t.helperMissing,u=this.escapeExpression;return"            <tr>\r\n                <td>"+u((i=(i=t.name||(e!=null?e.name:e))!=null?i:o,typeof i===s?i.call(e,{name:"name",hash:{},data:r}):i))+"</td>\r\n                <td><a href='' "+u((t.action||e&&e.action||o).call(e,{name:"action",hash:{click:r&&r.onEdit},data:r}))+">Edit</a> | <a href='' "+u((t.action||e&&e.action||o).call(e,{name:"action",hash:{click:r&&r.onDelete},data:r}))+">Delete</a></td>\r\n            </tr>\r\n\r\n"},useData:!0})}),define("hb!app/views/product/ProductEdit.htm",["handlebars"],function(e){return e.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,s=t.helperMissing,o=this.escapeExpression,u='<div class="container">\r\n\r\n    <h1>Product Edit</h1>\r\n    \r\n    <div class="row">\r\n        <form id="form"  role="form">\r\n            <div class="row">\r\n                <div class="form-group col-md-3">\r\n\r\n                    <label for="name">Name</label>\r\n                    <input type="text" class="form-control floatlabel" id="name" name="name" placeholder="Enter name">\r\n                </div>\r\n            </div>\r\n\r\n            <input type="hidden" name="id">\r\n\r\n            <div class="row">\r\n                <div class="form-group col-md-3">\r\n                    <button type="submit" class="btn btn-primary"  '+o((t.action||e&&e.action||s).call(e,{name:"action",hash:{click:r&&r.save},data:r}))+'>Save</button>\r\n                    <button class="btn btn-default"  '+o((t.action||e&&e.action||s).call(e,{name:"action",hash:{click:r&&r.back},data:r}))+'>Back</button>\r\n                </div>\r\n            </div>\r\n            \r\n             <div class="row">\r\n                    <div class="col-md-12">\r\n                        <div>\r\n\r\n                            <ul class="nav nav-tabs">\r\n';return i=t.each.call(e,e!=null?e.tabs:e,{name:"each",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),i!=null&&(u+=i),u+'                            </ul>\r\n\r\n                            <!-- Tab panes -->\r\n                            <div class="tab-content">\r\n                                <div class="tab-pane active" id="tabContent">\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n        </form>\r\n\r\n    </div>\r\n</div>'},1:function(e,t,n,r){var i,s,o="function",u=t.helperMissing,a=this.escapeExpression,f='                                <li class="';return i=t["if"].call(e,e!=null?e.active:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),i!=null&&(f+=i),f+'">\r\n                                    <a href="'+a((s=(s=t.tpl||(e!=null?e.tpl:e))!=null?s:u,typeof s===o?s.call(e,{name:"tpl",hash:{},data:r}):s))+'" '+a((t.action||e&&e.action||u).call(e,{name:"action",hash:{click:r&&r.selectTab},data:r}))+">"+a((s=(s=t.label||(e!=null?e.label:e))!=null?s:u,typeof s===o?s.call(e,{name:"label",hash:{},data:r}):s))+"</a>\r\n                                </li>\r\n"},2:function(e,t,n,r){return"active"},useData:!0})}),define("app/views/customer/customerEdit",["require","jquery","hb!./CustomerEdit.htm","jock/template/template-engine","jock/view/view-manager","app/plugins/toastr","domReady!","./CustomerSearch"],function(e){function o(){function u(e,n,r){e.preventDefault();var i=t("#form").validationEngine("validate");if(i){var o=t("#form").toObject(),u=t.ajax("/data/customer"+o.id+".json"),a=r.data.container;a.tracker.add(u,{msg:"Saving..."}),s.success("Customer '"+o.name+"' saved!","Saved")}}function a(t,n,r){t.preventDefault();var s=e("./CustomerSearch");i.showView({view:s})}function f(e,t){var i={save:u,back:a},s=r.render(n,{customer:e},i,{data:{container:t}});return s}function l(e){t("#form").fromObject(e),t("#form").validationEngine()}var o={};return o.onInit=function(e,n){var r=e;if(n.params.id==null){r.cancel();return}var i=n.params.id,s=t.ajax("/data/customer"+i+".json");r.tracker.add(s),s.then(function(e){var t=f(e,r);r.attach(t).then(function(){l(e)})}),r.overwrite.then(function(e){console.error("Overwritten customer, aborting AJAX")})},o}var t=e("jquery"),n=e("hb!./CustomerEdit.htm"),r=e("jock/template/template-engine"),i=e("jock/view/view-manager"),s=e("app/plugins/toastr");return e("domReady!"),o}),define("app/views/customer/customerSearch",["require","jquery","hb!./CustomerSearch.htm","jock/template/template-engine","jock/view/view-manager","./CustomerEdit","domReady!"],function(e){function o(){function o(e,t){e.preventDefault(),i.showView({view:s,params:{id:t.id},args:{customer:t}})}function u(e,t){e.preventDefault(),console.log("Delete",t)}function a(e){var t={edit:o,remove:u},i=r.render(n,{customers:e},t);return i}function f(){}var e={};return e.onInit=function(e,n){var r=t.ajax("/data/customers.json");e.tracker.add(r),r.then(function(t){var r=a(t);e.attach(r).then(function(){f(n)}),e.visible.then(function(){f(n)})}),e.overwrite.then(function(e){console.error("Overwritten customers, aborting AJAX"),r.abort()})},e}var t=e("jquery"),n=e("hb!./CustomerSearch.htm"),r=e("jock/template/template-engine"),i=e("jock/view/view-manager"),s=e("./CustomerEdit");return e("domReady!"),o}),define("app/views/product/ProductEdit",["require","jquery","hb!./ProductEdit.htm","jock/template/template-engine","jock/view/view-manager","app/plugins/toastr","app/views/customer/customerEdit","app/views/customer/customerSearch","domReady!","./ProductSearch"],function(e){function a(){function f(e,t,n){e.preventDefault(),t.label=="One"?i.showView({view:o,target:"#tabContent",params:{id:1}}):(console.log("Two"),i.showView({view:u,target:"#tabContent",params:{id:1}}))}function l(e,n,r){e.preventDefault();var i=t("#form").toObject(),o=r.data.container,u=t.ajax("/data/product"+i.id+".json");o.tracker.add(u,{msg:"Saving..."}),s.success("Product '"+i.name+"' saved!","Saved")}function c(t,n,r){t.preventDefault();var s=e("./ProductSearch");i.showView({view:s})}function h(e,t){var i={save:l,back:c,selectTab:f},s=r.render(n,e,i,{data:{container:t}});return s}function p(e){t("#form").fromObject(e)}var a={};return a.onInit=function(e,n){var r=e;if(n.params.id==null){r.cancel();return}var i=n.params.id,s=t.ajax("/data/product"+i+".json");r.tracker.add(s),s.then(function(e){var t=[{label:"One",tpl:"#",disable:"false",active:!0},{label:"Two",tpl:"#",disable:"false",active:!1},{label:"Three",tpl:"#",disable:"false",active:!1}],n={product:e,tabs:t},i=h(n,r);r.attach(i).then(function(){p(e)})}),r.overwrite.then(function(e){console.error("Overwritten product, aborting AJAX"),s.abort()})},a}var t=e("jquery"),n=e("hb!./ProductEdit.htm"),r=e("jock/template/template-engine"),i=e("jock/view/view-manager"),s=e("app/plugins/toastr"),o=e("app/views/customer/customerEdit"),u=e("app/views/customer/customerSearch");return e("domReady!"),a}),define("app/views/product/ProductSearch",["require","jquery","hb!./ProductSearch.htm","jock/template/template-engine","jock/view/view-manager","./ProductEdit","domReady!"],function(e){function o(){function o(t){var i={edit:e.onEdit,remove:e.onDelete},s=r.render(n,{products:t},e);return s}function u(){}var e={};return e.onInit=function(e,n){var r=t.ajax("/data/products.json");e.tracker.add(r),r.then(function(t){var r=o(t);e.attach(r).then(function(){u(n)})}),e.overwrite.then(function(e){console.error("Overwritten products, aborting AJAX"),r.abort()})},e.onEdit=function(e,t){e.preventDefault(),i.showView({view:s,params:{id:t.id},args:{product:t}})},e.onDelete=function(e,t){e.preventDefault(),console.log("Delete",t)},e}var t=e("jquery"),n=e("hb!./ProductSearch.htm"),r=e("jock/template/template-engine"),i=e("jock/view/view-manager"),s=e("./ProductEdit");return e("domReady!"),o}),define("hb!app/views/calendar/calendarEdit.htm",["handlebars"],function(e){return e.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'<div class="container">\r\n\r\n    <h1>Calendar Demo</h1>\r\n\r\n    <button id="addSelected" type="button" class="btn btn-primary btn-xl">Add events</button>\r\n    <button id="removeAll" type="button" class="btn btn-danger btn-xl">Remove events</button>\r\n\r\n    <br>\r\n    <br>\r\n\r\n    <div id=\'calendar\'></div>\r\n</div>\r\n\r\n<!-- Confirm dialog -->\r\n<!--\r\n<div class="modal fade" id="confirmDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">\r\n    <div class="modal-dialog modal-sm">\r\n        <div class="modal-content">\r\n            <div class="modal-header">\r\n                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\r\n                <h4 class="modal-title" id="myModalLabel">Confirm</h4>\r\n            </div>\r\n            <div class="modal-body">\r\n                Are you sure?\r\n            </div>\r\n            <div class="modal-footer">\r\n                <button type="button" class="btn btn-primary" id="confirm">Ok</button>\r\n                <button type="button" class="btn btn-default" data-dismiss="modal" id="cancelConfirm">Cancel</button>\r\n            </div> \r\n        </div>\r\n    </div>\r\n</div>\r\n-->'},useData:!0})}),define("app/views/calendar/calendar",["require","jquery"],function(e){function n(e){var n={},r={},i="#"+e,s="calendarSelected",o=[],u=(new Date).getTime();return n.unselectAll=function(){t(i+" td").removeClass(s)},n.cal=function(){return t(i).fullCalendar},n.select=function(e){r.selectFn=e},n.eventClick=function(e){r.eventClickFn=e},n.init=function(){t(i).fullCalendar({eventClick:function(e,t,n){r.eventClickFn!=null&&r.eventClickFn(e,t,n)},unselect:function(){},select:function(e,i,s,o){console.log(s),console.log(s.ctrlKey,s.shiftKey,s.altKey),s.ctrlKey!==!0&&n.unselectAll();while(i.isAfter(e)){var u=e.format("YYYY-MM-DD");console.log(u);var a=t('#calendar [data-date="'+u+'"]');t(a).toggleClass("calendarSelected"),e.add("d",1)}r.selectFn!=null&&r.selectFn(e,i,s,o)},eventMouseover:function(e,r){var i="<div id='events-layer' class='fc-transparent' style='position:absolute; width:100%; height:100%; top:2px; text-align:right; z-index:100'> <a class='remove-event' id='events-layer-remove'>X</a></div>";t(this).append(i),t("#events-layer-remove",this).on("click",function(t){n.deleteEvent(e)})},eventMouseout:function(e,n){t("#events-layer").remove()},eventRender:function(e,n){t(n).find(".fc-event-inner").append("<div>"+e.content+"")},selectable:!0,selectHelper:!0,unselectAuto:!0,unselectable:!0,header:{left:"prev,next today",center:"title",right:"month, agendaWeek, agendaDay"},editable:!1,droppable:!1}),t(i).fullCalendar("addEventSource",o)},n.selected=function(){var e=t("#calendar .calendarSelected");return e},n.hasSelected=function(){var e=n.selected();return e.length===0?!1:!0},n.selectedMoments=function(){var e=n.selected(),r=[];return e.each(function(e){var n=t(this).attr("data-date"),i=t.fullCalendar.moment(n);r.push(i)}),r},n.generateID=function(){return++u},n.addEvent=function(e){o.push(e)},n.refresh=function(){t(i).fullCalendar("refetchEvents"),n.unselectAll()},n.deleteEvents=function(){t(i).fullCalendar("removeEventSource",o),o=[],t(i).fullCalendar("addEventSource",o)},n.deleteEvent=function(e){console.log("remove",e._id,e.id);for(var n=0;n<o.length;n++){var r=o[n];if(r.id===e.id){o.splice(n,1);break}}t(i).fullCalendar("refetchEvents")},n}var t=e("jquery");return n}),define("hb!app/views/calendar/event/editEventDialog.htm",["handlebars"],function(e){return e.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'<div class="modal fade" id="eventDialog" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">\r\n    <div class="modal-dialog modal-lg">\r\n        <div class="modal-content">\r\n            <div class="modal-header">\r\n                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\r\n                <h4 class="modal-title" id="myModalLabel">Event</h4>\r\n            </div>\r\n            <div class="modal-body">\r\n\r\n                <div class="row">\r\n                    <div class="form-group col-md-12">\r\n                        <form id="form"  role="form" name="form" method="post" action="submit.action">\r\n                            <div class="row">\r\n                                <div class="form-group col-md-3">\r\n\r\n                                    <label for="time">Time</label>\r\n                                    <div class="form-group col-md-12">\r\n                                    <input type="text" class="form-control" id="time" name="time" placeholder="7-1, 2-5 or 7-15 etc.">\r\n                                    </div>\r\n                                    <div class="form-group col-md-12">\r\n                                    <span id="workTime" class="workTime"></span>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <div class="row">\r\n                                <div class="form-group col-md-3">\r\n                                    <label for="tags">Tags</label>\r\n                                    <select multiple="multiple" style="width:300px" name="tags" id="tags">\r\n                                        <option  value="one">One</option>\r\n                                        <option value="two">Two</option>\r\n                                        <option value="three">Three</option>\r\n                                    </select>\r\n                                </div>\r\n                            </div>\r\n\r\n\r\n                            <div class="row">\r\n                                <div class="form-group col-md-12">\r\n\r\n                                    <label for="description">Description</label>\r\n                                    <textarea rows="5" class="form-control" name="description" id="description"></textarea>\r\n                                </div>\r\n                            </div>\r\n                        </form>\r\n\r\n\r\n                    </div>\r\n                </div>\r\n\r\n                <div class="modal-footer">\r\n                    <button type="button" class="btn btn-primary" id="saveEvents">Save</button>\r\n                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>\r\n                </div> \r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>'},useData:!0})}),function(e){typeof e.fn.each2=="undefined"&&e.extend(e.fn,{each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})}(jQuery),function(e,t){function p(t){var n=e(document.createTextNode(""));t.before(n),n.before(t),n.remove()}function d(e){function t(e){return h[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function v(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(g(e,t[n]))return n;return-1}function m(){var t=e(c);t.appendTo("body");var n={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),n}function g(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e+""==n+"":n.constructor===String?n+""==e+"":!1}function y(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function b(e){return e.outerWidth(!1)-e.width()}function w(n){var r="keyup-change-value";n.on("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.on("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function E(n){n.on("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function S(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function x(e,t){var n=S(e,function(e){t.trigger("scroll-debounced",e)});t.on("scroll",function(e){v(e.target,t.get())>=0&&n(e)})}function T(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus();var i=t.offsetWidth>0||t.offsetHeight>0;i&&t===document.activeElement&&(t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!1),r.select()))},0)}function N(t){t=e(t)[0];var n=0,r=0;if("selectionStart"in t)n=t.selectionStart,r=t.selectionEnd-n;else if("selection"in document){t.focus();var i=document.selection.createRange();r=document.selection.createRange().text.length,i.moveStart("character",-t.value.length),n=i.text.length-r}return{offset:n,length:r}}function C(e){e.preventDefault(),e.stopPropagation()}function k(e){e.preventDefault(),e.stopImmediatePropagation()}function L(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function A(t,n,r){var i,s=[],o;i=e.trim(t.attr("class")),i&&(i=""+i,e(i.split(/\s+/)).each2(function(){this.indexOf("select2-")===0&&s.push(this)})),i=e.trim(n.attr("class")),i&&(i=""+i,e(i.split(/\s+/)).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),o&&s.push(o))})),t.attr("class",s.join(" "))}function O(e,t,n,r){var i=d(e.toUpperCase()).indexOf(d(t.toUpperCase())),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function M(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})}function _(n){var r,i=null,s=n.quietMillis||100,o=n.url,u=this;return function(a){window.clearTimeout(r),r=window.setTimeout(function(){var r=n.data,s=o,f=n.transport||e.fn.select2.ajaxDefaults.transport,l={type:n.type||"GET",cache:n.cache||!1,jsonpCallback:n.jsonpCallback||t,dataType:n.dataType||"json"},c=e.extend({},e.fn.select2.ajaxDefaults.params,l);r=r?r.call(u,a.term,a.page,a.context):null,s=typeof s=="function"?s.call(u,a.term,a.page,a.context):s,i&&typeof i.abort=="function"&&i.abort(),n.params&&(e.isFunction(n.params)?e.extend(c,n.params.call(u)):e.extend(c,n.params)),e.extend(c,{url:s,dataType:n.dataType,data:r,success:function(e){var t=n.results(e,a.page,a);a.callback(t)}}),i=f.call(u,c)},s)}}function D(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=o.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function P(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]},u=r?n(i):n;e.isArray(u)&&(e(u).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o))}}function H(t,n){if(e.isFunction(t))return!0;if(!t)return!1;if(typeof t=="string")return!0;throw new Error(n+" must be a string, function, or falsy value")}function B(t,n){if(e.isFunction(t)){var r=Array.prototype.slice.call(arguments,2);return t.apply(n,r)}return t}function j(t){var n=0;return e.each(t,function(e,t){t.children?n+=j(t.children):n++}),n}function F(e,n,r,i){var s=e,o=!1,u,a,f,l,c;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){c=i.tokenSeparators[f],a=e.indexOf(c);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+c.length);if(u.length>0){u=i.createSearchChoice.call(this,u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(g(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function I(){var t=this;e.each(arguments,function(e,n){t[n].remove(),t[n]=null})}function q(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}if(window.Select2!==t)return;var n,r,i,s,o,u,a={x:0,y:0},f,l,n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},c="<div class='select2-measure-scrollbar'></div>",h={"Ⓐ":"A","Ａ":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","Ｂ":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","Ｃ":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","Ｄ":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","Ǳ":"DZ","Ǆ":"DZ","ǲ":"Dz","ǅ":"Dz","Ⓔ":"E","Ｅ":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","Ｆ":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","Ｇ":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","Ｈ":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","Ｉ":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","Ｊ":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","Ｋ":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","Ｌ":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","Ǉ":"LJ","ǈ":"Lj","Ⓜ":"M","Ｍ":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","Ｎ":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","Ǌ":"NJ","ǋ":"Nj","Ⓞ":"O","Ｏ":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","Ｐ":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Ｑ":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","Ｒ":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","Ｓ":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","Ｔ":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","Ｕ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","Ｖ":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","Ｗ":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","Ｘ":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Ｙ":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Ｚ":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","ａ":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","ｂ":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","ｃ":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","ｄ":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","ǳ":"dz","ǆ":"dz","ⓔ":"e","ｅ":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","ｆ":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","ｇ":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","ｈ":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","ｉ":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","ｊ":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","ｋ":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","ｌ":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","ǉ":"lj","ⓜ":"m","ｍ":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","ｎ":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ŉ":"n","ꞑ":"n","ꞥ":"n","ǌ":"nj","ⓞ":"o","ｏ":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","ｐ":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","ｑ":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","ｒ":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","ｓ":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","ｔ":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","ｕ":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","ｖ":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","ｗ":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","ｘ":"x","ẋ":"x","ẍ":"x","ⓨ":"y","ｙ":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","ｚ":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};f=e(document),o=function(){var e=1;return function(){return e++}}(),r=q(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results";this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&n.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",n.element.attr("title")),this.body=e("body"),A(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",n.element.attr("style")),this.container.css(B(n.containerCss,this.opts.element)),this.container.addClass(B(n.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",C),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),A(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(B(n.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",C),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",C),E(this.results),this.dropdown.on("mousemove-filtered",s,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",s,this.bind(function(e){this._touchEvent=!0,this.highlightUnderEvent(e)})),this.dropdown.on("touchmove",s,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",s,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(e){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),x(80,this.results),this.dropdown.on("scroll-debounced",s,this.bind(this.loadMoreIfNeeded)),e(this.container).on("change",".select2-input",function(e){e.stopPropagation()}),e(this.dropdown).on("change",".select2-input",function(e){e.stopPropagation()}),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop();i>0&&s-i<=0?(r.scrollTop(0),C(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),C(e))}),w(i),i.on("keyup-change input paste",this.bind(this.updateResults)),i.on("focus",function(){i.addClass("select2-focused")}),i.on("blur",function(){i.removeClass("select2-focused")}),this.dropdown.on("mouseup",s,this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(e){e.stopPropagation()}),this.nextSearchTerm=t,e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),n.maximumInputLength!==null&&this.search.attr("maxlength",n.maximumInputLength);var u=n.element.prop("disabled");u===t&&(u=!1),this.enable(!u);var a=n.element.prop("readonly");a===t&&(a=!1),this.readonly(a),l=l||m(),this.autofocus=n.element.prop("autofocus"),n.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",n.searchInputPlaceholder)},destroy:function(){var e=this.opts.element,n=e.data("select2");this.close(),e.length&&e[0].detachEvent&&e.each(function(){this.detachEvent("onpropertychange",this._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,n!==t&&(n.container.remove(),n.liveRegion.remove(),n.dropdown.remove(),e.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?e.attr({tabindex:this.elementTabIndex}):e.removeAttr("tabindex"),e.show()),I.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(e){if(e.is("option"))return{id:e.prop("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:e.prop("disabled"),locked:g(e.attr("locked"),"locked")||g(e.data("locked"),!0)};if(e.is("optgroup"))return{text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")}},prepareOpts:function(n){var r,i,s,u,a=this;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var u,f=this.opts.id,l=this.liveRegion;u=function(r,i,c){var h,p,d,v,m,g,y,b,w,E;r=n.sortResults(r,i,s);var S=[];for(h=0,p=r.length;h<p;h+=1)d=r[h],m=d.disabled===!0,v=!m&&f(d)!==t,g=d.children&&d.children.length>0,y=e("<li></li>"),y.addClass("select2-results-dept-"+c),y.addClass("select2-result"),y.addClass(v?"select2-result-selectable":"select2-result-unselectable"),m&&y.addClass("select2-disabled"),g&&y.addClass("select2-result-with-children"),y.addClass(a.opts.formatResultCssClass(d)),y.attr("role","presentation"),b=e(document.createElement("div")),b.addClass("select2-result-label"),b.attr("id","select2-result-label-"+o()),b.attr("role","option"),E=n.formatResult(d,b,s,a.opts.escapeMarkup),E!==t&&(b.html(E),y.append(b)),g&&(w=e("<ul></ul>"),w.addClass("select2-result-sub"),u(d.children,w,c+1),y.append(w)),y.data("select2-data",d),S.push(y[0]);i.append(S),l.text(n.formatMatches(r.length))},u(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.data("select2Tags")}i?(n.query=this.bind(function(e){var n={results:[],more:!1},i=e.term,s,o,u;u=function(t,n){var r;t.is("option")?e.matcher(i,t.text(),t)&&n.push(a.optionToData(t)):t.is("optgroup")&&(r=a.optionToData(t),t.children().each2(function(e,t){u(t,r.children)}),r.children.length>0&&n.push(r))},s=r.children(),this.getPlaceholder()!==t&&s.length>0&&(o=this.getPlaceholderOption(),o&&(s=s.not(o))),s.each2(function(e,t){u(t,n.results)}),e.callback(n)}),n.id=function(e){return e.id}):"query"in n||("ajax"in n?(u=n.element.data("ajax-url"),u&&u.length>0&&(n.ajax.url=u),n.query=_.call(n.element,n.ajax)):"data"in n?n.query=D(n.data):"tags"in n&&(n.query=P(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(t){return{id:e.trim(t),text:e.trim(t)}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(y(t.val(),n.separator)).each(function(){var t={id:this,text:this},r=n.tags;e.isFunction(r)&&(r=r()),e(r).each(function(){if(g(this.id,t.id))return t=this,!1}),i.push(t)}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");if(n.createSearchChoicePosition==="top")n.createSearchChoicePosition=function(e,t){e.unshift(t)};else if(n.createSearchChoicePosition==="bottom")n.createSearchChoicePosition=function(e,t){e.push(t)};else if(typeof n.createSearchChoicePosition!="function")throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return n},monitorSource:function(){var n=this.opts.element,r,i=this;n.on("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),this._sync=this.bind(function(){var e=n.prop("disabled");e===t&&(e=!1),this.enable(!e);var r=n.prop("readonly");r===t&&(r=!1),this.readonly(r),A(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(B(this.opts.containerCssClass,this.opts.element)),A(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(B(this.opts.dropdownCssClass,this.opts.element))}),n.length&&n[0].attachEvent&&n.each(function(){this.attachEvent("onpropertychange",i._sync)}),r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,r!==t&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new r(function(t){e.each(t,i._sync)}),this.propertyObserver.observe(n.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(t){var n=e.Event("select2-selecting",{val:this.id(t),object:t,choice:t});return this.opts.element.trigger(n),!n.isDefaultPrevented()},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var e=this._enabled&&!this._readonly,t=!e;return e===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",t),this.close(),this.enabledInterface=e,!0)},enable:function(e){e===t&&(e=!0);if(this._enabled===e)return;this._enabled=e,this.opts.element.prop("disabled",!e),this.enableInterface()},disable:function(){this.enable(!1)},readonly:function(e){e===t&&(e=!1);if(this._readonly===e)return;this._readonly=e,this.opts.element.prop("readonly",e),this.enableInterface()},opened:function(){return this.container?this.container.hasClass("select2-dropdown-open"):!1},positionDropdown:function(){var t=this.dropdown,n=this.container.offset(),r=this.container.outerHeight(!1),i=this.container.outerWidth(!1),s=t.outerHeight(!1),o=e(window),u=o.width(),a=o.height(),f=o.scrollLeft()+u,c=o.scrollTop()+a,h=n.top+r,p=n.left,d=h+s<=c,v=n.top-s>=o.scrollTop(),m=t.outerWidth(!1),g=p+m<=f,y=t.hasClass("select2-drop-above"),b,w,E,S,x;y?(w=!0,!v&&d&&(E=!0,w=!1)):(w=!1,!d&&v&&(E=!0,w=!0)),E&&(t.hide(),n=this.container.offset(),r=this.container.outerHeight(!1),i=this.container.outerWidth(!1),s=t.outerHeight(!1),f=o.scrollLeft()+u,c=o.scrollTop()+a,h=n.top+r,p=n.left,m=t.outerWidth(!1),g=p+m<=f,t.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(x=e(".select2-results",t)[0],t.addClass("select2-drop-auto-width"),t.css("width",""),m=t.outerWidth(!1)+(x.scrollHeight===x.clientHeight?0:l.width),m>i?i=m:m=i,s=t.outerHeight(!1),g=p+m<=f):this.container.removeClass("select2-drop-auto-width"),this.body.css("position")!=="static"&&(b=this.body.offset(),h-=b.top,p-=b.left),g||(p=n.left+this.container.outerWidth(!1)-m),S={left:p,width:i},w?(S.top=n.top-s,S.bottom="auto",this.container.addClass("select2-drop-above"),t.addClass("select2-drop-above")):(S.top=h,S.bottom="auto",this.container.removeClass("select2-drop-above"),t.removeClass("select2-drop-above")),S=e.extend(S,B(this.opts.dropdownCss,this.opts.element)),t.css(S)},shouldOpen:function(){var t;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(t=e.Event("select2-opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),f.on("mousemove.select2Event",function(e){a.x=e.pageX,a.y=e.pageY}),!0):!1},opening:function(){var t=this.containerEventName,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body),s.on("mousedown touchstart click",function(t){p(s);var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close(),t.preventDefault(),t.stopPropagation())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var o=this;this.container.parents().add(window).each(function(){e(this).on(r+" "+n+" "+i,function(e){o.opened()&&o.positionDropdown()})})},close:function(){if(!this.opened())return;var t=this.containerEventName,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).off(n).off(r).off(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),f.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(e.Event("select2-close"))},externalSearch:function(e){this.open(),this.search.val(e),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return B(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a,f;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices().find(".select2-result-label"),i=e(n[r]),f=(i.offset()||{}).top||0,s=f+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=f-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return v(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.removeHighlight(),r=e(n[t]),r.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",r.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(r.text()),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"select2-highlight",val:this.id(i),choice:i})},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.removeHighlight()},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=this.resultsPage+1,i=this,s=this.search.val(),o=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:s,page:r,context:o,matcher:this.opts.matcher,callback:this.bind(function(n){if(!i.opened())return;i.opts.populateResults.call(this,e,n.results,{term:s,page:r,context:o}),i.postprocessResults(n,!1,!1),n.more===!0?(t.detach().appendTo(e).text(B(i.opts.formatLoadMore,i.opts.element,r+1)),window.setTimeout(function(){i.loadMoreIfNeeded()},10)):t.remove(),i.positionDropdown(),i.resultsPage=r,i.context=n.context,this.opts.element.trigger({type:"select2-loaded",items:n})})}))},tokenize:function(){},updateResults:function(n){function h(){r.removeClass("select2-active"),u.positionDropdown(),i.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?u.liveRegion.text(i.text()):u.liveRegion.text(u.opts.formatMatches(i.find(".select2-result-selectable").length))}function p(e){i.html(e),h()}var r=this.search,i=this.results,s=this.opts,o,u=this,a,f=r.val(),l=e.data(this.container,"select2-last-term"),c;if(n!==!0&&l&&g(f,l))return;e.data(this.container,"select2-last-term",f);if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;c=++this.queryCount;var d=this.getMaximumSelectionSize();if(d>=1){o=this.data();if(e.isArray(o)&&o.length>=d&&H(s.formatSelectionTooBig,"formatSelectionTooBig")){p("<li class='select2-selection-limit'>"+B(s.formatSelectionTooBig,s.element,d)+"</li>");return}}if(r.val().length<s.minimumInputLength){H(s.formatInputTooShort,"formatInputTooShort")?p("<li class='select2-no-results'>"+B(s.formatInputTooShort,s.element,r.val(),s.minimumInputLength)+"</li>"):p(""),n&&this.showSearch&&this.showSearch(!0);return}if(s.maximumInputLength&&r.val().length>s.maximumInputLength){H(s.formatInputTooLong,"formatInputTooLong")?p("<li class='select2-no-results'>"+B(s.formatInputTooLong,s.element,r.val(),s.maximumInputLength)+"</li>"):p("");return}s.formatSearching&&this.findHighlightableChoices().length===0&&p("<li class='select2-searching'>"+B(s.formatSearching,s.element)+"</li>"),r.addClass("select2-active"),this.removeHighlight(),a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(c!=this.queryCount)return;if(!this.opened()){this.search.removeClass("select2-active");return}this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(u,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return g(u.id(this),u.id(a))}).length===0&&this.opts.createSearchChoicePosition(o.results,a));if(o.results.length===0&&H(s.formatNoMatches,"formatNoMatches")){p("<li class='select2-no-results'>"+B(s.formatNoMatches,s.element,r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&H(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+s.escapeMarkup(B(s.formatLoadMore,s.element,this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),h(),this.opts.element.trigger({type:"select2-loaded",items:o})})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){T(this.search)},selectHighlighted:function(e){if(this._touchMoved){this.clearTouchMoved();return}var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r?(this.highlight(t),this.onSelect(r,e)):e&&e.noFocus&&this.close()},getPlaceholder:function(){var e;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((e=this.getPlaceholderOption())!==t?e.text():t)},getPlaceholderOption:function(){if(this.select){var n=this.select.children("option").first();if(this.opts.placeholderOption!==t)return this.opts.placeholderOption==="first"&&n||typeof this.opts.placeholderOption=="function"&&this.opts.placeholderOption(this.select);if(e.trim(n.text())===""&&n.val()==="")return n}},initContainerWidth:function(){function n(){var n,r,i,s,o,u;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){u=r[s].replace(/\s/g,""),i=u.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=q(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>","   <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>","   <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>","   <div class='select2-search'>","       <label for='' class='select2-offscreen'></label>","       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'","       aria-autocomplete='list' />","   </div>","   <ul class='select2-results' role='listbox'>","   </ul>","</div>"].join(""));return t},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var n,r,i;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),n=this.search.get(0),n.createTextRange?(r=n.createTextRange(),r.collapse(!1),r.select()):n.setSelectionRange&&(i=this.search.val().length,n.setSelectionRange(i,i))),this.search.val()===""&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(e.Event("select2-open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){e("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),I.call(this,"selection","focusser")},initContainer:function(){var t,r=this.container,i=this.dropdown,s=o(),u;this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=t=r.find(".select2-choice"),this.focusser=r.find(".select2-focusser"),t.find(".select2-chosen").attr("id","select2-chosen-"+s),this.focusser.attr("aria-labelledby","select2-chosen-"+s),this.results.attr("id","select2-results-"+s),this.search.attr("aria-owns","select2-results-"+s),this.focusser.attr("id","s2id_autogen"+s),u=e("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(u.text()).attr("for",this.focusser.attr("id"));var a=this.opts.element.attr("title");this.opts.element.attr("title",a||u.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(e("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(e){if(!this.isInterfaceEnabled())return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){C(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),C(e);return;case n.ENTER:this.selectHighlighted(),C(e);return;case n.TAB:this.selectHighlighted({noFocus:!0});return;case n.ESC:this.cancel(e),C(e);return}})),this.search.on("blur",this.bind(function(e){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(e){if(!this.isInterfaceEnabled())return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){C(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;this.open(),C(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),C(e);return}})),w(this.focusser),this.focusser.on("keyup-change input",this.bind(function(e){if(this.opts.minimumResultsForSearch>=0){e.stopPropagation();if(this.opened())return;this.open()}})),t.on("mousedown touchstart","abbr",this.bind(function(e){if(!this.isInterfaceEnabled())return;this.clear(),k(e),this.close(),this.selection.focus()})),t.on("mousedown touchstart",this.bind(function(n){p(t),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),C(n)})),i.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),t.on("focus",this.bind(function(e){C(e)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(e.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(t){var n=this.selection.data("select2-data");if(n){var r=e.Event("select2-clearing");this.opts.element.trigger(r);if(r.isDefaultPrevented())return;var i=this.getPlaceholderOption();this.opts.element.val(i?i.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),t!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(n),choice:n}),this.triggerChange({removed:n}))}},initSelection:function(){var e;if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder(),n.nextSearchTerm=n.opts.nextSearchTerm(e,n.search.val()))})}},isPlaceholderOptionSelected:function(){var e;return this.getPlaceholder()===t?!1:(e=this.getPlaceholderOption())!==t&&e.prop("selected")||this.opts.element.val()===""||this.opts.element.val()===t||this.opts.element.val()===null},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),n=this;return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var r=e.find("option").filter(function(){return this.selected&&!this.disabled});t(n.optionToData(r))}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val(),s=null;t.query({matcher:function(e,n,r){var o=g(i,t.id(r));return o&&(s=r),o},callback:e.isFunction(r)?function(){r(s)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===t?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&e!==t){if(this.select&&this.getPlaceholderOption()===t)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(e,t,n){var r=0,i=this,s=!0;this.findHighlightableChoices().each2(function(e,t){if(g(i.id(t.data("select2-data")),i.opts.element.val()))return r=e,!1}),n!==!1&&(t===!0&&r>=0?this.highlight(r):this.highlight(0));if(t===!0){var o=this.opts.minimumResultsForSearch;o>=0&&this.showSearch(j(e.results)>=o)}},showSearch:function(t){if(this.showSearchInput===t)return;this.showSearchInput=t,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!t),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!t),e(this.dropdown,this.container).toggleClass("select2-with-searchbox",t)},onSelect:function(e,t){if(!this.triggerSelect(e))return;var n=this.opts.element.val(),r=this.data();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"select2-selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.close(),(!t||!t.noFocus)&&this.opts.shouldFocusInput(this)&&this.focusser.focus(),g(n,this.id(e))||this.triggerChange({added:e,removed:r})},updateSelection:function(e){var n=this.selection.find(".select2-chosen"),r,i;this.selection.data("select2-data",e),n.empty(),e!==null&&(r=this.opts.formatSelection(e,n,this.opts.escapeMarkup)),r!==t&&n.append(r),i=this.opts.formatSelectionCssClass(e,n),i!==t&&n.addClass(i),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.container.addClass("select2-allowclear")},val:function(){var e,n=!1,r=null,i=this,s=this.data();if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find("option").filter(function(){return this.selected}).each2(function(e,t){return r=i.optionToData(t),!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange({added:r,removed:s});else{if(!e&&e!==0){this.clear(n);return}if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange({added:e,removed:s})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n,r=!1;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;arguments.length>1&&(r=arguments[1]),e?(n=this.data(),this.opts.element.val(e?this.id(e):""),this.updateSelection(e),r&&this.triggerChange({added:e,removed:n})):this.clear(r)}}),s=q(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>","  <li class='select2-search-field'>","    <label for='' class='select2-offscreen'></label>","    <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>","  </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>","   <ul class='select2-results'>","   </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),n=this;return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var r=[];e.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(e,t){r.push(n.optionToData(t))}),t(r)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=y(n.val(),t.separator),s=[];t.query({matcher:function(n,r,o){var u=e.grep(i,function(e){return g(e,t.id(o))}).length;return u&&s.push(o),u},callback:e.isFunction(r)?function(){var e=[];for(var n=0;n<i.length;n++){var o=i[n];for(var u=0;u<s.length;u++){var a=s[u];if(g(o,t.id(a))){e.push(a),s.splice(u,1);break}}}r(e)}:e.noop})}),t},selectChoice:function(e){var t=this.container.find(".select2-search-choice-focus");if(!t.length||!e||e[0]!=t[0])t.length&&this.opts.element.trigger("choice-deselected",t),t.removeClass("select2-search-choice-focus"),e&&e.length&&(this.close(),e.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",e))},destroy:function(){e("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),I.call(this,"searchContainer","selection")},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t);var i=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(t){i.search[0].focus(),i.selectChoice(e(this))}),this.search.attr("id","s2id_autogen"+o()),this.search.prev().text(e("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){if(this.search.attr("placeholder")&&this.search.val().length==0)return;if(!this.isInterfaceEnabled())return;this.opened()||this.open()})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(e){if(!this.isInterfaceEnabled())return;++this.keydowns;var t=r.find(".select2-search-choice-focus"),i=t.prev(".select2-search-choice:not(.select2-locked)"),s=t.next(".select2-search-choice:not(.select2-locked)"),o=N(this.search);if(!(!t.length||e.which!=n.LEFT&&e.which!=n.RIGHT&&e.which!=n.BACKSPACE&&e.which!=n.DELETE&&e.which!=n.ENTER)){var u=t;e.which==n.LEFT&&i.length?u=i:e.which==n.RIGHT?u=s.length?s:null:e.which===n.BACKSPACE?this.unselect(t.first())&&(this.search.width(10),u=i.length?i:s):e.which==n.DELETE?this.unselect(t.first())&&(this.search.width(10),u=s.length?s:null):e.which==n.ENTER&&(u=null),this.selectChoice(u),C(e),(!u||!u.length)&&this.open();return}if((e.which===n.BACKSPACE&&this.keydowns==1||e.which==n.LEFT)&&o.offset==0&&!o.length){this.selectChoice(r.find(".select2-search-choice:not(.select2-locked)").last()),C(e);return}this.selectChoice(null);if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),C(e);return;case n.ENTER:this.selectHighlighted(),C(e);return;case n.TAB:this.selectHighlighted({noFocus:!0}),this.close();return;case n.ESC:this.cancel(e),C(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&C(e),e.which===n.ENTER&&C(e)})),this.search.on("keyup",this.bind(function(e){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(t){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),t.stopImmediatePropagation(),this.opts.element.trigger(e.Event("select2-blur"))})),this.container.on("click",t,this.bind(function(t){if(!this.isInterfaceEnabled())return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.open(),this.focusSearch(),t.preventDefault()})),this.container.on("focus",t,this.bind(function(){if(!this.isInterfaceEnabled())return;this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder(),n=this.getMaxSearchWidth();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.search.width(n>0?n:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),this.search.val()===""&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(e.Event("select2-open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){v(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer.call(this,e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,n){if(!this.triggerSelect(e))return;this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(e,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!n||!n.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'>    <div></div>    <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f,l;f=this.opts.formatSelection(n,o.find("div"),this.opts.escapeMarkup),f!=t&&o.find("div").replaceWith("<div>"+f+"</div>"),l=this.opts.formatSelectionCssClass(n,o.find("div")),l!=t&&o.addClass(l),r&&o.find(".select2-search-choice-close").on("mousedown",C).on("click dblclick",this.bind(function(t){if(!this.isInterfaceEnabled())return;this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),C(t),this.close(),this.focusSearch()})).on("focus",this.bind(function(){if(!this.isInterfaceEnabled())return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(t){var n=this.getVal(),r,i;t=t.closest(".select2-search-choice");if(t.length===0)throw"Invalid argument: "+t+". Must be .select2-search-choice";r=t.data("select2-data");if(!r)return;var s=e.Event("select2-removing");s.val=this.id(r),s.choice=r,this.opts.element.trigger(s);if(s.isDefaultPrevented())return!1;while((i=v(this.id(r),n))>=0)n.splice(i,1),this.setVal(n),this.select&&this.postprocessResults();return t.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(r),choice:r}),this.triggerChange({removed:r}),!0},postprocessResults:function(e,t,n){var r=this.getVal(),i=this.results.find(".select2-result"),s=this.results.find(".select2-result-with-children"),o=this;i.each2(function(e,t){var n=o.id(t.data("select2-data"));v(n,r)>=0&&(t.addClass("select2-selected"),t.find(".select2-result-selectable").addClass("select2-selected"))}),s.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&n!==!1&&o.highlight(0),!this.opts.createSearchChoice&&!i.filter(".select2-result:not(.select2-selected)").length>0&&(!e||e&&!e.more&&this.results.find(".select2-no-results").length===0)&&H(o.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+B(o.opts.formatNoMatches,o.opts.element,o.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-b(this.search)},resizeSearch:function(){var e,t,n,r,i,s=b(this.search);e=L(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(Math.floor(i))},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),y(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){v(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},buildChangeDetails:function(e,t){var t=t.slice(0),e=e.slice(0);for(var n=0;n<t.length;n++)for(var r=0;r<e.length;r++)g(this.opts.id(t[n]),this.opts.id(e[r]))&&(t.splice(n,1),n>0&&n--,e.splice(r,1),r--);return{added:t,removed:e}},val:function(n,r){var i,s=this;if(arguments.length===0)return this.getVal();i=this.data(),i.length||(i=[]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange({added:this.data(),removed:i});return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange(this.buildChangeDetails(i,this.data()));else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e.map(t,s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange(s.buildChangeDetails(i,s.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t,n){var r=this,i,s;if(arguments.length===0)return this.selection.children(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();s=this.data(),t||(t=[]),i=e.map(t,function(e){return r.opts.id(e)}),this.setVal(i),this.updateSelection(t),this.clearSearch(),n&&this.triggerChange(this.buildChangeDetails(s,this.data()))}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,i,s,o,u,a=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],f=["opened","isFocused","container","dropdown"],l=["val","data"],c={search:"externalSearch"};return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?u=r.element.prop("multiple"):(u=r.multiple||!1,"tags"in r&&(r.multiple=u=!0)),i=u?new window.Select2["class"].multi:new window.Select2["class"].single,i.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(v(n[0],a)<0)throw"Unknown method: "+n[0];o=t,i=e(this).data("select2");if(i===t)return;s=n[0],s==="container"?o=i.container:s==="dropdown"?o=i.dropdown:(c[s]&&(s=c[s]),o=i[s].apply(i,n.slice(1)));if(v(n[0],f)>=0||v(n[0],l)>=0&&n.length==1)return!1}}),o===t?this:o},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return O(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n,r){return e?r(e.text):t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return e.css},formatSelectionCssClass:function(e,n){return t},formatMatches:function(e){return e===1?"One result is available, press enter to select it.":e+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" or more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please delete "+n+" character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results…"},formatSearching:function(){return"Searching…"},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==t?null:e.id},matcher:function(e,t){return d(""+t).toUpperCase().indexOf(d(""+e).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:F,escapeMarkup:M,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null},nextSearchTerm:function(e,n){return t},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(e){var t="ontouchstart"in window||navigator.msMaxTouchPoints>0;return t?e.opts.minimumResultsForSearch<0?!1:!0:!0}},e.fn.select2.ajaxDefaults={transport:e.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:_,local:D,tags:P},util:{debounce:S,markMatch:O,escapeMarkup:M,stripDiacritics:d},"class":{"abstract":r,single:i,multi:s}}}(jQuery),define("select2",["jquery"],function(e){return function(){var t,n;return t||e.Select2}}(this)),define("app/views/calendar/event/editEventDialog",["require","jquery","hb!./editEventDialog.htm","select2","jock/utils/utils","moment"],function(e){function o(){function u(){t("#saveEvents").on("click",function(t){e!=null&&e(t,o)}),t("#eventDialog").on("shown.bs.modal",function(e){f()}),t("#eventDialog").on("hidden.bs.modal",function(e){t("#eventDialog").remove(),t("body > .select2-hidden-accessible").remove(),t("body > .select2-drop-mask").remove(),t("body > .select2-drop").remove(),t("body > .select2-sizer").remove()}),t("#time").on("keyup",function(e){var n=t(this).val();a(n)})}function a(e){var n=e.match(/(\d+)\s*-\s*(\d+)/);if(n===null){t("#workTime").text("");return}var r=parseInt(n[1]),i=parseInt(n[2]),o;r>i&&(i+=12),o=i-r;var u=new Date;u.setHours(r);var a=s(u).format("HH:00");u.setHours(i);var f=s(u).format("HH:00");t("#workTime").text(""+a+" - "+f+" (work: "+o+"h)")}function f(){t("#saveEvents").focus()}var e,r={},o=null;return r.show=function(r){e=r.onSave,t("body").append(n),u(),t("#eventDialog").modal({show:!0,keyboard:!1});var s=r.event||{data:{}};o=r.event,i.fromObject("#form",s.data),t("select").select2();var f=s.data.time||"";a(f)},r.hide=function(){t("#eventDialog").modal("hide"),o=null},r.getData=function(){var e=i.toObject("#form");return e},r.setData=function(e){i.fromObject("#form",e)},r}var t=e("jquery"),n=e("hb!./editEventDialog.htm"),r=e("select2"),i=e("jock/utils/utils"),s=e("moment");return o}),define("app/views/calendar/CalendarEdit",["require","jquery","hb!./calendarEdit.htm","./calendar","jock/template/template-engine","moment","app/plugins/toastr","./event/editEventDialog","jock/utils/string","domReady!"],function(e){function c(){function i(){function e(){o.error("Please select a date on the calendar. Drag your mouse for group selection. Hold 'ctrl' down to make multiple selections.","No date selected")}f.init(),f.select(function(e,t,n,r){}),f.eventClick(function(e,t,n){var r={event:e};s(r)}),t("#addSelected").on("click",function(){f.hasSelected()?s():e()}),t("#removeAll").on("click",function(){if(!f.hasSelected())e();else{o.clear();var t=confirm("Are you sure?");if(!t)return;f.deleteEvents()}}),t("#confirmDialog").on("shown.bs.modal",function(e){t("#cancelConfirm").focus()})}function s(e){e=e||{},o.clear(),e.onSave=c,l.show(e)}function c(e,n){l.hide();var r,i;n!=null?(i=n.id,f.deleteEvent(n),r=[n.start]):r=f.selectedMoments();var s=l.getData();t.each(r,function(e,n){console.log(s);var r=t.isArray(s.tags)?s.tags.join():s.tags,o={id:i||f.generateID(),title:r,content:a.prune(s.description,100),start:n,data:s,allDay:!1};f.addEvent(o)}),f.refresh()}var e={};return f=r("calendar"),l=u(),e.onInit=function(e,t){e.attach(n),e.visible.then(function(){i()})},e}var t=e("jquery"),n=e("hb!./calendarEdit.htm"),r=e("./calendar"),i=e("jock/template/template-engine"),s=e("moment"),o=e("app/plugins/toastr"),u=e("./event/editEventDialog"),a=e("jock/utils/string");e("domReady!");var f,l;return c}),define("app/plugins/jquery.placeholder",["require","jquery"],function(e){function l(e){var n={},r=/^jQuery\d+$/;return t.each(e.attributes,function(e,t){t.specified&&!r.test(t.name)&&(n[t.name]=t.value)}),n}function c(e,n){var r=this,i=t(r);if(r.value==i.attr("placeholder")&&i.hasClass("placeholder"))if(i.data("placeholder-password")){i=i.hide().next().show().attr("id",i.removeAttr("id").data("placeholder-id"));if(e===!0)return i[0].value=n;i.focus()}else r.value="",i.removeClass("placeholder"),r==p()&&r.select()}function h(){var e,n=this,r=t(n),i=this.id;if(n.value==""){if(n.type=="password"){if(!r.data("placeholder-textinput")){try{e=r.clone().attr({type:"text"})}catch(s){e=t("<input>").attr(t.extend(l(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-password":r,"placeholder-id":i}).bind("focus.placeholder",c),r.data({"placeholder-textinput":e,"placeholder-id":i}).before(e)}r=r.removeAttr("id").hide().prev().attr("id",i).show()}r.addClass("placeholder"),r[0].value=r.attr("placeholder")}else r.removeClass("placeholder")}function p(){try{return document.activeElement}catch(e){}}var t=e("jquery"),n=Object.prototype.toString.call(window.operamini)=="[object OperaMini]",r="placeholder"in document.createElement("input")&&!n,i="placeholder"in document.createElement("textarea")&&!n,s=t.fn,o=t.valHooks,u=t.propHooks,a,f;r&&i?(f=s.placeholder=function(){return this},f.input=f.textarea=!0):(f=s.placeholder=function(){var e=this;return e.filter((r?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":c,"blur.placeholder":h}).data("placeholder-enabled",!0).trigger("blur.placeholder"),e},f.input=r,f.textarea=i,a={get:function(e){var n=t(e),r=n.data("placeholder-password");return r?r[0].value:n.data("placeholder-enabled")&&n.hasClass("placeholder")?"":e.value},set:function(e,n){var r=t(e),i=r.data("placeholder-password");return i?i[0].value=n:r.data("placeholder-enabled")?(n==""?(e.value=n,e!=p()&&h.call(e)):r.hasClass("placeholder")?c.call(e,!0,n)||(e.value=n):e.value=n,r):e.value=n}},r||(o.input=a,u.value=a),i||(o.textarea=a,u.value=a),t(function(){t(document).delegate("form","submit.placeholder",function(){var e=t(".placeholder",this).each(c);setTimeout(function(){e.each(h)},10)})}),t(window).bind("beforeunload.placeholder",function(){t(".placeholder").each(function(){this.value=""})}))}),define("app/plugins/radios-to-slider",["require","jquery"],function(e){function u(e,t){this.bearer=e,this.options=t,this.currentLevel=0}var t=e("jquery"),n=44,r=22,i=50,s=32,o=40;u.prototype={activate:function(){this.numOptions=this.bearer.find("input[type=radio]").length,this.addBaseStyle(),this.addLevels(),this.addBar(),this.setSlider(),this.addInteraction()},addBaseStyle:function(){this.bearer.find("input[type=radio]").hide(),this.bearer.addClass("radios-to-slider"),this.bearer.addClass(this.options.size),this.bearer.css("width",this.numOptions*r+(this.numOptions-1)*i+"px");var e=0;this.bearer.find("label").each(function(){var o=s/2-n/2+e*i+e*r;t(this).addClass("slider-label"),t(this).css("left",o+"px"),e++})},addLevels:function(){var e=this.bearer;this.bearer.find("input[type=radio]").each(function(){var n=t(this).attr("id");e.append("<ins class='slider-level' data-radio='"+n+"'></ins>")});var n=0;this.bearer.find(".slider-level").each(function(){var s=parseInt(e.css("padding-left").replace("px",""));t(this).css("left",s+n*i+n*r+"px"),n++})},addBar:function(){this.bearer.append("<ins class='slider-bar'><span class='slider-knob'></span></ins>")},setSlider:function(){var e=1,n=this;this.bearer.find("input[type=radio]").each(function(){var r=t(this).attr("id");t(this).prop("checked")&&(n.bearer.find(".slider-bar").css("display","block"),n.bearer.find(".slider-bar").width(e*s+(e-1)*o+"px"),n.currentLevel=e),n.options.animation&&n.bearer.find(".slider-bar").addClass("transition-enabled"),e++});var r=0;this.bearer.find(".slider-level").each(function(){r++,r<n.currentLevel?(t(this).show(),t(this).addClass("slider-lower-level")):r==n.currentLevel?t(this).hide():(t(this).show(),t(this).removeClass("slider-lower-level"))});var r=0;this.bearer.find(".slider-label").each(function(){r++,r==n.currentLevel?t(this).addClass("slider-label-active"):t(this).removeClass("slider-label-active")})},addInteraction:function(){var e=this;this.bearer.find(".slider-level").click(function(){var n=t(this).attr("data-radio");e.bearer.find("#"+n).prop("checked",!0),e.setSlider()}),this.bearer.find("input[type=radio]").change(function(){e.setSlider()})}},t.fn.radiosToSlider=function(e){this.each(function(){e=t.extend({},t.fn.radiosToSlider.defaults,e);var n=new u(t(this),e);n.activate()})},t.fn.radiosToSlider.defaults={size:"medium",animation:!0}});if(typeof jQuery=="undefined")throw new Error("Bootstrap's JavaScript requires jQuery");+function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}(jQuery),+function(e){var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),+function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.isLoading=!1};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",r=this.$element,i=r.is("input")?"val":"html",s=r.data();t+="Text",s.resetText||r.data("resetText",r[i]()),r[i](s[t]||this.options[t]),setTimeout(e.proxy(function(){t=="loadingText"?(this.isLoading=!0,r.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,r.removeClass(n).removeAttr(n))},this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");n.prop("type")=="radio"&&(n.prop("checked")&&this.$element.hasClass("active")?e=!1:t.find(".active").removeClass("active")),e&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}e&&this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle"),t.preventDefault()})}(jQuery),+function(e){var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},t.prototype.to=function(t){var n=this,r=this.getActiveIndex();if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid.bs.carousel",function(){n.to(t)}):r==t?this.pause().cycle():this.slide(t>r?"next":"prev",e(this.$items[t]))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(this.sliding)return;return this.slide("next")},t.prototype.prev=function(){if(this.sliding)return;return this.slide("prev")},t.prototype.slide=function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this;if(!i.length){if(!this.options.wrap)return;i=this.$element.find(".item")[u]()}if(i.hasClass("active"))return this.sliding=!1;var f=e.Event("slide.bs.carousel",{relatedTarget:i[0],direction:o});this.$element.trigger(f);if(f.isDefaultPrevented())return;return this.sliding=!0,s&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")})),e.support.transition&&this.$element.hasClass("slide")?(i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),r.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(r.css("transition-duration").slice(0,-1)*1e3)):(r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),s&&this.cycle(),this};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("bs.carousel"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("bs.carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o=n.attr("data-slide-to");o&&(s.interval=!1),i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("bs.carousel").to(o),t.preventDefault()}),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var t=e(this);t.carousel(t.data())})})}(jQuery),+function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .panel > .in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);!i&&s.toggle&&n=="show"&&(n=!n),i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=collapse][data-parent="'+a+'"]').not(n).addClass("collapsed"),n[s.hasClass("in")?"addClass":"removeClass"]("collapsed");s.collapse(u)})}(jQuery),+function(e){function i(r){e(t).remove(),e(n).each(function(){var t=s(e(this)),n={relatedTarget:this};if(!t.hasClass("open"))return;t.trigger(r=e.Event("hide.bs.dropdown",n));if(r.isDefaultPrevented())return;t.removeClass("open").trigger("hidden.bs.dropdown",n)})}function s(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".dropdown-backdrop",n="[data-toggle=dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".disabled, :disabled"))return;var r=s(n),o=r.hasClass("open");i();if(!o){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click",i);var u={relatedTarget:this};r.trigger(t=e.Event("show.bs.dropdown",u));if(t.isDefaultPrevented())return;r.toggleClass("open").trigger("shown.bs.dropdown",u),n.focus()}return!1},r.prototype.keydown=function(t){if(!/(38|40|27)/.test(t.keyCode))return;var r=e(this);t.preventDefault(),t.stopPropagation();if(r.is(".disabled, :disabled"))return;var i=s(r),o=i.hasClass("open");if(!o||o&&t.keyCode==27)return t.which==27&&i.find(n).focus(),r.click();var u=" li:not(.divider):visible a",a=i.find("[role=menu]"+u+", [role=listbox]"+u);if(!a.length)return;var f=a.index(a.filter(":focus"));t.keyCode==38&&f>0&&f--,t.keyCode==40&&f<a.length-1&&f++,~f||(f=0),a.eq(f).focus()};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),typeof t=="string"&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+", [role=menu], [role=listbox]",r.prototype.keydown)}(jQuery),+function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show().scrollTop(0),r&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=e.support.transition&&n;this.$backdrop=e('<div class="modal-backdrop '+n+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;r?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());n.is("a")&&t.preventDefault(),i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".modal",function(){e(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){e(document.body).removeClass("modal-open")})}(jQuery),+function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focusin",a=o=="hover"?"mouseleave":"focusout";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this,r=this.tip();this.setContent(),this.options.animation&&r.addClass("fade");var i=typeof this.options.placement=="function"?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,o=s.test(i);o&&(i=i.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(i),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);var u=this.getPosition(),a=r[0].offsetWidth,f=r[0].offsetHeight;if(o){var l=this.$element.parent(),c=i,h=document.documentElement.scrollTop||document.body.scrollTop,p=this.options.container=="body"?window.innerWidth:l.outerWidth(),d=this.options.container=="body"?window.innerHeight:l.outerHeight(),v=this.options.container=="body"?0:l.offset().left;i=i=="bottom"&&u.top+u.height+f-h>d?"top":i=="top"&&u.top-h-f<0?"bottom":i=="right"&&u.right+a>p?"left":i=="left"&&u.left-a<v?"right":i,r.removeClass(c).addClass(i)}var m=this.getCalculatedOffset(i,u,a,f);this.applyPlacement(m,i),this.hoverState=null;var g=function(){n.$element.trigger("shown.bs."+n.type)};e.support.transition&&this.$tip.hasClass("fade")?r.one(e.support.transition.end,g).emulateTransitionEnd(150):g()}},t.prototype.applyPlacement=function(t,n){var r,i=this.tip(),s=i[0].offsetWidth,o=i[0].offsetHeight,u=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(u)&&(u=0),isNaN(a)&&(a=0),t.top=t.top+u,t.left=t.left+a,e.offset.setOffset(i[0],e.extend({using:function(e){i.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),i.addClass("in");var f=i[0].offsetWidth,l=i[0].offsetHeight;n=="top"&&l!=o&&(r=!0,t.top=t.top+o-l);if(/bottom|top/.test(n)){var c=0;t.left<0&&(c=t.left*-2,t.left=0,i.offset(t),f=i[0].offsetWidth,l=i[0].offsetHeight),this.replaceArrow(c-s+f,f,"left")}else this.replaceArrow(l-o,l,"top");r&&i.offset(t)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach(),t.$element.trigger("hidden.bs."+t.type)}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),this.hoverState=null,this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;if(!i&&n=="destroy")return;i||r.data("bs.tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(jQuery),+function(e){var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?typeof n=="string"?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||(typeof t.content=="function"?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},t.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("bs.popover"),s=typeof n=="object"&&n;if(!i&&n=="destroy")return;i||r.data("bs.popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(jQuery),+function(e){function t(n,r){var i,s=e.proxy(this.process,this);this.$element=e(n).is("body")?e(window):e(n),this.$body=e("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",s),this.options=e.extend({},t.DEFAULTS,r),this.selector=(this.options.target||(i=e(n).attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=e([]),this.targets=e([]),this.activeTarget=null,this.refresh(),this.process()}t.DEFAULTS={offset:10},t.prototype.refresh=function(){var t=this.$element[0]==window?"offset":"position";this.offsets=e([]),this.targets=e([]);var n=this,r=this.$body.find(this.selector).map(function(){var r=e(this),i=r.data("target")||r.attr("href"),s=/^#./.test(i)&&e(i);return s&&s.length&&s.is(":visible")&&[[s[t]().top+(!e.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),i]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);if(s&&e<=r[0])return s!=(o=i[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},t.prototype.activate=function(t){this.activeTarget=t,e(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',r=e(n).parents("li").addClass("active");r.parent(".dropdown-menu").length&&(r=r.closest("li.dropdown").addClass("active")),r.trigger("activate.bs.scrollspy")};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("bs.scrollspy"),s=typeof n=="object"&&n;i||r.data("bs.scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(jQuery),+function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;var i=n.find(".active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(jQuery),+function(e){var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$window.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var n=e(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),s=this.options.offset,o=s.top,u=s.bottom;this.affixed=="top"&&(i.top+=r),typeof s!="object"&&(u=o=s),typeof o=="function"&&(o=s.top(this.$element)),typeof u=="function"&&(u=s.bottom(this.$element));var a=this.unpin!=null&&r+this.unpin<=i.top?!1:u!=null&&i.top+this.$element.height()>=n-u?"bottom":o!=null&&r<=o?"top":!1;if(this.affixed===a)return;this.unpin&&this.$element.css("top","");var f="affix"+(a?"-"+a:""),l=e.Event(f+".bs.affix");this.$element.trigger(l);if(l.isDefaultPrevented())return;this.affixed=a,this.unpin=a=="bottom"?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(f).trigger(e.Event(f.replace("affix","affixed"))),a=="bottom"&&this.$element.offset({top:n-u-this.$element.height()})};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("bs.affix"),s=typeof n=="object"&&n;i||r.data("bs.affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(jQuery),define("bootstrap",["jquery"],function(){}),define("app/plugins/jquery.validationEngine",["jquery"],function(e){var t={init:function(n){var r=this;if(!r.data("jqv")||r.data("jqv")==null)n=t._saveOptions(r,n),e(document).on("click",".formError",function(){e(this).fadeOut(150,function(){e(this).parent(".formErrorOuter").remove(),e(this).remove()})});return this},attach:function(n){var r=this,i;return n?i=t._saveOptions(r,n):i=r.data("jqv"),i.validateAttribute=r.find("[data-validation-engine*=validate]").length?"data-validation-engine":"class",i.binded&&(r.on(i.validationEventTrigger,"["+i.validateAttribute+"*=validate]:not([type=checkbox]):not([type=radio]):not(.datepicker)",t._onFieldEvent),r.on("click","["+i.validateAttribute+"*=validate][type=checkbox],["+i.validateAttribute+"*=validate][type=radio]",t._onFieldEvent),r.on(i.validationEventTrigger,"["+i.validateAttribute+"*=validate][class*=datepicker]",{delay:300},t._onFieldEvent)),i.autoPositionUpdate&&e(window).bind("resize",{noAnimation:!0,formElem:r},t.updatePromptsPosition),r.on("click","a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']",t._submitButtonClick),r.removeData("jqv_submitButton"),r.on("submit",t._onSubmitEvent),this},detach:function(){var n=this,r=n.data("jqv");return n.find("["+r.validateAttribute+"*=validate]").not("[type=checkbox]").off(r.validationEventTrigger,t._onFieldEvent),n.find("["+r.validateAttribute+"*=validate][type=checkbox],[class*=validate][type=radio]").off("click",t._onFieldEvent),n.off("submit",t.onAjaxFormComplete),n.off("submit",t.onAjaxFormComplete),n.removeData("jqv"),n.off("click","a[data-validation-engine-skip], a[class*='validate-skip'], button[data-validation-engine-skip], button[class*='validate-skip'], input[data-validation-engine-skip], input[class*='validate-skip']",t._submitButtonClick),n.removeData("jqv_submitButton"),r.autoPositionUpdate&&e(window).unbind("resize",t.updatePromptsPosition),this},validate:function(){var n=e(this),r=null;if(n.is("form")||n.hasClass("validationEngineContainer")){if(n.hasClass("validating"))return!1;n.addClass("validating");var i=n.data("jqv"),r=t._validateFields(this);setTimeout(function(){n.removeClass("validating")},100),r&&i.onSuccess?i.onSuccess():!r&&i.onFailure&&i.onFailure()}else if(n.is("form")||n.hasClass("validationEngineContainer"))n.removeClass("validating");else{var s=n.closest("form, .validationEngineContainer"),i=s.data("jqv")?s.data("jqv"):e.validationEngine.defaults,r=t._validateField(n,i);r&&i.onFieldSuccess?i.onFieldSuccess():i.onFieldFailure&&i.InvalidFields.length>0&&i.onFieldFailure()}return i.onValidationComplete?!!i.onValidationComplete(s,r):r},updatePromptsPosition:function(n){if(n&&this==window)var r=n.data.formElem,i=n.data.noAnimation;else var r=e(this.closest("form, .validationEngineContainer"));var s=r.data("jqv");return r.find("["+s.validateAttribute+"*=validate]").not(":disabled").each(function(){var n=e(this);s.prettySelect&&n.is(":hidden")&&(n=r.find("#"+s.usePrefix+n.attr("id")+s.useSuffix));var o=t._getPrompt(n),u=e(o).find(".formErrorContent").html();o&&t._updatePrompt(n,e(o),u,undefined,!1,s,i)}),this},showPrompt:function(e,n,r,i){var s=this.closest("form, .validationEngineContainer"),o=s.data("jqv");return o||(o=t._saveOptions(this,o)),r&&(o.promptPosition=r),o.showArrow=i==1,t._showPrompt(this,e,n,!1,o),this},hide:function(){var n=e(this).closest("form, .validationEngineContainer"),r=n.data("jqv"),i=r&&r.fadeDuration?r.fadeDuration:.3,s;return e(this).is("form")||e(this).hasClass("validationEngineContainer")?s="parentForm"+t._getClassName(e(this).attr("id")):s=t._getClassName(e(this).attr("id"))+"formError",e("."+s).fadeTo(i,.3,function(){e(this).parent(".formErrorOuter").remove(),e(this).remove()}),this},hideAll:function(){var t=this,n=t.data("jqv"),r=n?n.fadeDuration:300;return e(".formError").fadeTo(r,300,function(){e(this).parent(".formErrorOuter").remove(),e(this).remove()}),this},_onFieldEvent:function(n){var r=e(this),i=r.closest("form, .validationEngineContainer"),s=i.data("jqv");s.eventTrigger="field",window.setTimeout(function(){t._validateField(r,s,n),s.InvalidFields.length==0&&s.onFieldSuccess?s.onFieldSuccess():s.InvalidFields.length>0&&s.onFieldFailure&&s.onFieldFailure()},n.data?n.data.delay:0)},_onSubmitEvent:function(){var n=e(this),r=n.data("jqv");if(n.data("jqv_submitButton")){var i=e("#"+n.data("jqv_submitButton"));if(i&&i.length>0)if(i.hasClass("validate-skip")||i.attr("data-validation-engine-skip")=="true")return!0}r.eventTrigger="submit";var s=t._validateFields(n);return s&&r.ajaxFormValidation?(t._validateFormWithAjax(n,r),!1):r.onValidationComplete?!!r.onValidationComplete(n,s):s},_checkAjaxStatus:function(t){var n=!0;return e.each(t.ajaxValidCache,function(e,t){if(!t)return n=!1,!1}),n},_checkAjaxFieldStatus:function(e,t){return t.ajaxValidCache[e]==1},_validateFields:function(n){var r=n.data("jqv"),i=!1;r.globalFormValidating(),n.trigger("jqv.form.validating");var s=null;n.find("["+r.validateAttribute+"*=validate]").not(":disabled").each(function(){var o=e(this),u=[];if(e.inArray(o.attr("name"),u)<0){i|=t._validateField(o,r),i&&s==null&&(o.is(":hidden")&&r.prettySelect?s=o=n.find("#"+r.usePrefix+t._jqSelector(o.attr("id"))+r.useSuffix):s=o);if(r.doNotShowAllErrosOnSubmit)return!1;u.push(o.attr("name"));if(r.showOneMessage==1&&i)return!1}}),n.trigger("jqv.form.result",[i]);if(i){if(r.scroll){var o=s.offset().top,u=s.offset().left,a=r.promptPosition;typeof a=="string"&&a.indexOf(":")!=-1&&(a=a.substring(0,a.indexOf(":")));if(a!="bottomRight"&&a!="bottomLeft"){var f=t._getPrompt(s);f&&(o=f.offset().top)}r.scrollOffset&&(o-=r.scrollOffset);if(r.isOverflown){var l=e(r.overflownDIV);if(!l.length)return!1;var c=l.scrollTop(),h=-parseInt(l.offset().top);o+=c+h-5;var p=e(r.overflownDIV+":not(:animated)");p.animate({scrollTop:o},1100,function(){r.focusFirstField&&s.focus()})}else e("html, body").animate({scrollTop:o},1100,function(){r.focusFirstField&&s.focus()}),e("html, body").animate({scrollLeft:u},1100)}else r.focusFirstField&&s.focus();return!1}return!0},_validateFormWithAjax:function(n,r){var i=n.serialize(),s=r.ajaxFormValidationMethod?r.ajaxFormValidationMethod:"GET",o=r.ajaxFormValidationURL?r.ajaxFormValidationURL:n.attr("action"),u=r.dataType?r.dataType:"json";e.ajax({type:s,url:o,cache:!1,dataType:u,data:i,form:n,methods:t,options:r,beforeSend:function(){return r.onBeforeAjaxFormValidation(n,r)},error:function(e,n){t._ajaxError(e,n)},success:function(i){if(u=="json"&&i!==!0){var s=!1;for(var o=0;o<i.length;o++){var a=i[o],f=a[0],l=e(e("#"+f)[0]);if(l.length==1){var c=a[2];if(a[1]==1)if(c==""||!c)t._closePrompt(l);else{if(r.allrules[c]){var h=r.allrules[c].alertTextOk;h&&(c=h)}r.showPrompts&&t._showPrompt(l,c,"pass",!1,r,!0)}else{s|=!0;if(r.allrules[c]){var h=r.allrules[c].alertText;h&&(c=h)}r.showPrompts&&t._showPrompt(l,c,"",!1,r,!0)}}}r.onAjaxFormComplete(!s,n,i,r)}else r.onAjaxFormComplete(!0,n,i,r)}})},_validateField:function(n,r,i){n.attr("id")||(n.attr("id","form-validation-field-"+e.validationEngine.fieldIdCounter),++e.validationEngine.fieldIdCounter);if(!r.validateNonVisibleFields&&(n.is(":hidden")&&!r.prettySelect||n.parent().is(":hidden")))return!1;var s={e:i},o={field:n,error:r.isError,text:p,obj:s};r.globalFieldValidating(o),n.trigger("jqv.field.validating",[o]),console.log("RESULT",s.ok);if(s.ok!=null&&!s.ok)return!1;var u=n.attr(r.validateAttribute),a=/validate\[(.*)\]/.exec(u);if(!a)return!1;var f=a[1],l=f.split(/\[|,|\]/),c=!1,h=n.attr("name"),p="",d="",v=!1,m=!1;r.isError=!1,r.showArrow=!0,r.maxErrorsPerField>0&&(m=!0);var g=e(n.closest("form, .validationEngineContainer"));for(var y=0;y<l.length;y++)l[y]=l[y].replace(" ",""),l[y]===""&&delete l[y];for(var y=0,b=0;y<l.length;y++){if(m&&b>=r.maxErrorsPerField){if(!v){var w=e.inArray("required",l);v=w!=-1&&w>=y}break}var E=undefined;switch(l[y]){case"required":v=!0,E=t._getErrorMessage(g,n,l[y],l,y,r,t._required);break;case"custom":E=t._getErrorMessage(g,n,l[y],l,y,r,t._custom);break;case"groupRequired":var S="["+r.validateAttribute+"*="+l[y+1]+"]",x=g.find(S).eq(0);x[0]!=n[0]&&(t._validateField(x,r,i),r.showArrow=!0),E=t._getErrorMessage(g,n,l[y],l,y,r,t._groupRequired),E&&(v=!0),r.showArrow=!1;break;case"ajax":E=t._ajax(n,l,y,r),E&&(d="load");break;case"minSize":E=t._getErrorMessage(g,n,l[y],l,y,r,t._minSize);break;case"maxSize":E=t._getErrorMessage(g,n,l[y],l,y,r,t._maxSize);break;case"min":E=t._getErrorMessage(g,n,l[y],l,y,r,t._min);break;case"max":E=t._getErrorMessage(g,n,l[y],l,y,r,t._max);break;case"past":E=t._getErrorMessage(g,n,l[y],l,y,r,t._past);break;case"future":E=t._getErrorMessage(g,n,l[y],l,y,r,t._future);break;case"dateRange":var S="["+r.validateAttribute+"*="+l[y+1]+"]";r.firstOfGroup=g.find(S).eq(0),r.secondOfGroup=g.find(S).eq(1);if(r.firstOfGroup[0].value||r.secondOfGroup[0].value)E=t._getErrorMessage(g,n,l[y],l,y,r,t._dateRange);E&&(v=!0),r.showArrow=!1;break;case"dateTimeRange":var S="["+r.validateAttribute+"*="+l[y+1]+"]";r.firstOfGroup=g.find(S).eq(0),r.secondOfGroup=g.find(S).eq(1);if(r.firstOfGroup[0].value||r.secondOfGroup[0].value)E=t._getErrorMessage(g,n,l[y],l,y,r,t._dateTimeRange);E&&(v=!0),r.showArrow=!1;break;case"maxCheckbox":n=e(g.find("input[name='"+h+"']")),E=t._getErrorMessage(g,n,l[y],l,y,r,t._maxCheckbox);break;case"minCheckbox":n=e(g.find("input[name='"+h+"']")),E=t._getErrorMessage(g,n,l[y],l,y,r,t._minCheckbox);break;case"equals":E=t._getErrorMessage(g,n,l[y],l,y,r,t._equals);break;case"funcCall":E=t._getErrorMessage(g,n,l[y],l,y,r,t._funcCall);break;case"creditCard":E=t._getErrorMessage(g,n,l[y],l,y,r,t._creditCard);break;case"condRequired":E=t._getErrorMessage(g,n,l[y],l,y,r,t._condRequired),E!==undefined&&(v=!0);break;default:}var T=!1;if(typeof E=="object")switch(E.status){case"_break":T=!0;break;case"_error":E=E.message;break;case"_error_no_prompt":return!0;default:}if(T)break;typeof E=="string"&&(p+=E+"<br/>",r.isError=!0,b++)}!v&&!n.val()&&n.val().length<1&&(r.isError=!1);var N=n.prop("type"),C=n.data("promptPosition")||r.promptPosition;(N=="radio"||N=="checkbox")&&g.find("input[name='"+h+"']").size()>1&&(C==="inline"?n=e(g.find("input[name='"+h+"'][type!=hidden]:last")):n=e(g.find("input[name='"+h+"'][type!=hidden]:first")),r.showArrow=!1),n.is(":hidden")&&r.prettySelect&&(n=g.find("#"+r.usePrefix+t._jqSelector(n.attr("id"))+r.useSuffix)),r.isError&&r.showPrompts?t._showPrompt(n,p,d,!1,r):c||t._closePrompt(n);if(!c){var o={field:n,error:r.isError,text:p};r.globalFieldResult(o),n.trigger("jqv.field.result",[n,r.isError,p])}var k=e.inArray(n[0],r.InvalidFields);return k==-1?r.isError&&r.InvalidFields.push(n[0]):r.isError||r.InvalidFields.splice(k,1),t._handleStatusCssClasses(n,r),r.isError&&r.onFieldFailure&&r.onFieldFailure(n),!r.isError&&r.onFieldSuccess&&r.onFieldSuccess(n),r.isError},_handleStatusCssClasses:function(e,t){t.addSuccessCssClassToField&&e.removeClass(t.addSuccessCssClassToField),t.addFailureCssClassToField&&e.removeClass(t.addFailureCssClassToField),t.addSuccessCssClassToField&&!t.isError&&e.addClass(t.addSuccessCssClassToField),t.addFailureCssClassToField&&t.isError&&e.addClass(t.addFailureCssClassToField)},_getErrorMessage:function(n,r,i,s,o,u,a){var f=jQuery.inArray(i,s);if(i==="custom"||i==="funcCall"){var l=s[f+1];i=i+"["+l+"]",delete s[f]}var c=i,h=r.attr("data-validation-engine")?r.attr("data-validation-engine"):r.attr("class"),p=h.split(" "),d;i=="future"||i=="past"||i=="maxCheckbox"||i=="minCheckbox"?d=a(n,r,s,o,u):d=a(r,s,o,u);if(d!=undefined){var v=t._getCustomErrorMessage(e(r),p,c,u);v&&(d=v)}return d},_getCustomErrorMessage:function(e,n,r,i){var s=!1,o=/^custom\[.*\]$/.test(r)?t._validityProp.custom:t._validityProp[r];if(o!=undefined){s=e.attr("data-errormessage-"+o);if(s!=undefined)return s}s=e.attr("data-errormessage");if(s!=undefined)return s;var u="#"+e.attr("id");if(typeof i.custom_error_messages[u]!="undefined"&&typeof i.custom_error_messages[u][r]!="undefined")s=i.custom_error_messages[u][r].message;else if(n.length>0)for(var a=0;a<n.length&&n.length>0;a++){var f="."+n[a];if(typeof i.custom_error_messages[f]!="undefined"&&typeof i.custom_error_messages[f][r]!="undefined"){s=i.custom_error_messages[f][r].message;break}}return!s&&typeof i.custom_error_messages[r]!="undefined"&&typeof i.custom_error_messages[r]["message"]!="undefined"&&(s=i.custom_error_messages[r].message),s},_validityProp:{required:"value-missing",custom:"custom-error",groupRequired:"value-missing",ajax:"custom-error",minSize:"range-underflow",maxSize:"range-overflow",min:"range-underflow",max:"range-overflow",past:"type-mismatch",future:"type-mismatch",dateRange:"type-mismatch",dateTimeRange:"type-mismatch",maxCheckbox:"range-overflow",minCheckbox:"range-underflow",equals:"pattern-mismatch",funcCall:"custom-error",creditCard:"pattern-mismatch",condRequired:"value-missing"},_required:function(t,n,r,i,s){switch(t.prop("type")){case"text":case"password":case"textarea":case"file":case"select-one":case"select-multiple":default:var o=e.trim(t.val()),u=e.trim(t.attr("data-validation-placeholder")),a=e.trim(t.attr("placeholder"));if(!o||u&&o==u||a&&o==a)return i.allrules[n[r]].alertText;break;case"radio":case"checkbox":if(s){if(!t.attr("checked"))return i.allrules[n[r]].alertTextCheckboxMultiple;break}var f=t.closest("form, .validationEngineContainer"),l=t.attr("name");if(f.find("input[name='"+l+"']:checked").size()==0)return f.find("input[name='"+l+"']:visible").size()==1?i.allrules[n[r]].alertTextCheckboxe:i.allrules[n[r]].alertTextCheckboxMultiple}},_groupRequired:function(n,r,i,s){var o="["+s.validateAttribute+"*="+r[i+1]+"]",u=!1;n.closest("form, .validationEngineContainer").find(o).each(function(){if(!t._required(e(this),r,i,s))return u=!0,!1});if(!u)return s.allrules[r[i]].alertText},_custom:function(e,t,n,r){var i=t[n+1],s=r.allrules[i],o;if(!s){alert("jqv:custom rule not found - "+i);return}if(s.regex){var u=s.regex;if(!u){alert("jqv:custom regex not found - "+i);return}var a=new RegExp(u);if(!a.test(e.val()))return r.allrules[i].alertText}else{if(!s.func){alert("jqv:custom type not allowed "+i);return}o=s.func;if(typeof o!="function"){alert("jqv:custom parameter 'function' is no function - "+i);return}if(!o(e,t,n,r))return r.allrules[i].alertText}},_funcCall:function(e,t,n,r){var i=t[n+1],s;if(i.indexOf(".")>-1){var o=i.split("."),u=window;while(o.length)u=u[o.shift()];s=u}else s=window[i]||r.customFunctions[i];if(typeof s=="function")return s(e,t,n,r)},_equals:function(t,n,r,i){var s=n[r+1];if(t.val()!=e("#"+s).val())return i.allrules.equals.alertText},_maxSize:function(e,t,n,r){var i=t[n+1],s=e.val().length;if(s>i){var o=r.allrules.maxSize;return o.alertText+i+o.alertText2}},_minSize:function(e,t,n,r){var i=t[n+1],s=e.val().length;if(s<i){var o=r.allrules.minSize;return o.alertText+i+o.alertText2}},_min:function(e,t,n,r){var i=parseFloat(t[n+1]),s=parseFloat(e.val());if(s<i){var o=r.allrules.min;return o.alertText2?o.alertText+i+o.alertText2:o.alertText+i}},_max:function(e,t,n,r){var i=parseFloat(t[n+1]),s=parseFloat(e.val());if(s>i){var o=r.allrules.max;return o.alertText2?o.alertText+i+o.alertText2:o.alertText+i}},_past:function(n,r,i,s,o){var u=i[s+1],a=e(n.find("input[name='"+u.replace(/^#+/,"")+"']")),f;if(u.toLowerCase()=="now")f=new Date;else if(undefined!=a.val()){if(a.is(":disabled"))return;f=t._parseDate(a.val())}else f=t._parseDate(u);var l=t._parseDate(r.val());if(l>f){var c=o.allrules.past;return c.alertText2?c.alertText+t._dateToString(f)+c.alertText2:c.alertText+t._dateToString(f)}},_future:function(n,r,i,s,o){var u=i[s+1],a=e(n.find("input[name='"+u.replace(/^#+/,"")+"']")),f;if(u.toLowerCase()=="now")f=new Date;else if(undefined!=a.val()){if(a.is(":disabled"))return;f=t._parseDate(a.val())}else f=t._parseDate(u);var l=t._parseDate(r.val());if(l<f){var c=o.allrules.future;return c.alertText2?c.alertText+t._dateToString(f)+c.alertText2:c.alertText+t._dateToString(f)}},_isDate:function(e){var t=new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/);return t.test(e)},_isDateTime:function(e){var t=new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/);return t.test(e)},_dateCompare:function(e,t){return new Date(e.toString())<new Date(t.toString())},_dateRange:function(e,n,r,i){if(!i.firstOfGroup[0].value&&i.secondOfGroup[0].value||i.firstOfGroup[0].value&&!i.secondOfGroup[0].value)return i.allrules[n[r]].alertText+i.allrules[n[r]].alertText2;if(!t._isDate(i.firstOfGroup[0].value)||!t._isDate(i.secondOfGroup[0].value))return i.allrules[n[r]].alertText+i.allrules[n[r]].alertText2;if(!t._dateCompare(i.firstOfGroup[0].value,i.secondOfGroup[0].value))return i.allrules[n[r]].alertText+i.allrules[n[r]].alertText2},_dateTimeRange:function(e,n,r,i){if(!i.firstOfGroup[0].value&&i.secondOfGroup[0].value||i.firstOfGroup[0].value&&!i.secondOfGroup[0].value)return i.allrules[n[r]].alertText+i.allrules[n[r]].alertText2;if(!t._isDateTime(i.firstOfGroup[0].value)||!t._isDateTime(i.secondOfGroup[0].value))return i.allrules[n[r]].alertText+i.allrules[n[r]].alertText2;if(!t._dateCompare(i.firstOfGroup[0].value,i.secondOfGroup[0].value))return i.allrules[n[r]].alertText+i.allrules[n[r]].alertText2},_maxCheckbox:function(e,t,n,r,i){var s=n[r+1],o=t.attr("name"),u=e.find("input[name='"+o+"']:checked").size();if(u>s)return i.showArrow=!1,i.allrules.maxCheckbox.alertText2?i.allrules.maxCheckbox.alertText+" "+s+" "+i.allrules.maxCheckbox.alertText2:i.allrules.maxCheckbox.alertText},_minCheckbox:function(e,t,n,r,i){var s=n[r+1],o=t.attr("name"),u=e.find("input[name='"+o+"']:checked").size();if(u<s)return i.showArrow=!1,i.allrules.minCheckbox.alertText+" "+s+" "+i.allrules.minCheckbox.alertText2},_creditCard:function(e,t,n,r){var i=!1,s=e.val().replace(/ +/g,"").replace(/-+/g,""),o=s.length;if(o>=14&&o<=16&&parseInt(s)>0){var u=0,n=o-1,a=1,f,l=new String;do f=parseInt(s.charAt(n)),l+=a++%2==0?f*2:f;while(--n>=0);for(n=0;n<l.length;n++)u+=parseInt(l.charAt(n));i=u%10==0}if(!i)return r.allrules.creditCard.alertText},_ajax:function(n,r,i,s){var o=r[i+1],u=s.allrules[o],a=u.extraData,f=u.extraDataDynamic,l={fieldId:n.attr("id"),fieldValue:n.val()};if(typeof a=="object")e.extend(l,a);else if(typeof a=="string"){var c=a.split("&");for(var i=0;i<c.length;i++){var h=c[i].split("=");h[0]&&h[0]&&(l[h[0]]=h[1])}}if(f){var p=[],d=String(f).split(",");for(var i=0;i<d.length;i++){var v=d[i];if(e(v).length){var m=n.closest("form, .validationEngineContainer").find(v).val(),g=v.replace("#","")+"="+escape(m);l[v.replace("#","")]=m}}}s.eventTrigger=="field"&&delete s.ajaxValidCache[n.attr("id")];if(!s.isError&&!t._checkAjaxFieldStatus(n.attr("id"),s))return e.ajax({type:s.ajaxFormValidationMethod,url:u.url,cache:!1,dataType:"json",data:l,field:n,rule:u,methods:t,options:s,beforeSend:function(){},error:function(e,n){t._ajaxError(e,n)},success:function(r){var i=r[0],o=e("#"+i).eq(0);if(o.length==1){var a=r[1],f=r[2];if(!a){s.ajaxValidCache[i]=!1,s.isError=!0;if(f){if(s.allrules[f]){var l=s.allrules[f].alertText;l&&(f=l)}}else f=u.alertText;s.showPrompts&&t._showPrompt(o,f,"",!0,s)}else{s.ajaxValidCache[i]=!0;if(f){if(s.allrules[f]){var l=s.allrules[f].alertTextOk;l&&(f=l)}}else f=u.alertTextOk;s.showPrompts&&(f?t._showPrompt(o,f,"pass",!0,s):t._closePrompt(o)),s.eventTrigger=="submit"&&n.closest("form").submit()}}var c={field:o,error:s.isError,text:f};s.globalFieldResult(c),o.trigger("jqv.field.result",[o,s.isError,f])}}),u.alertTextLoad},_ajaxError:function(e,t){e.status==0&&t==null?alert("The page is not served from a server! ajax call failed"):typeof console!="undefined"&&console.log("Ajax error: "+e.status+" "+t)},_dateToString:function(e){return e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()},_parseDate:function(e){var t=e.split("-");return t==e&&(t=e.split("/")),t==e?(t=e.split("."),new Date(t[2],t[1]-1,t[0])):new Date(t[0],t[1]-1,t[2])},_showPrompt:function(n,r,i,s,o,u){var a=t._getPrompt(n);u&&(a=!1),e.trim(r)&&(a?t._updatePrompt(n,a,r,i,s,o):t._buildPrompt(n,r,i,s,o))},_buildPrompt:function(n,r,i,s,o){var u=e("<div>");u.addClass(t._getClassName(n.attr("id"))+"formError"),u.addClass("parentForm"+t._getClassName(n.closest("form, .validationEngineContainer").attr("id"))),u.addClass("formError");switch(i){case"pass":u.addClass("greenPopup");break;case"load":u.addClass("blackPopup");break;default:}s&&u.addClass("ajaxed");var a=e("<div>").addClass("formErrorContent").html(r).appendTo(u),f=n.data("promptPosition")||o.promptPosition;if(o.showArrow){var l=e("<div>").addClass("formErrorArrow");if(typeof f=="string"){var c=f.indexOf(":");c!=-1&&(f=f.substring(0,c))}switch(f){case"bottomLeft":case"bottomRight":u.find(".formErrorContent").before(l),l.addClass("formErrorArrowBottom").html('<div class="line1"><!-- --></div><div class="line2"><!-- --></div><div class="line3"><!-- --></div><div class="line4"><!-- --></div><div class="line5"><!-- --></div><div class="line6"><!-- --></div><div class="line7"><!-- --></div><div class="line8"><!-- --></div><div class="line9"><!-- --></div><div class="line10"><!-- --></div>');break;case"topLeft":case"topRight":l.html('<div class="line10"><!-- --></div><div class="line9"><!-- --></div><div class="line8"><!-- --></div><div class="line7"><!-- --></div><div class="line6"><!-- --></div><div class="line5"><!-- --></div><div class="line4"><!-- --></div><div class="line3"><!-- --></div><div class="line2"><!-- --></div><div class="line1"><!-- --></div>'),u.append(l)}}o.addPromptClass&&u.addClass(o.addPromptClass);var h=n.attr("data-required-class");if(h!==undefined)u.addClass(h);else if(o.prettySelect&&e("#"+n.attr("id")).next().is("select")){var p=e("#"+n.attr("id").substr(o.usePrefix.length).substring(o.useSuffix.length)).attr("data-required-class");p!==undefined&&u.addClass(p)}u.css({opacity:0}),f==="inline"?(u.addClass("inline"),typeof n.attr("data-prompt-target")!="undefined"&&e("#"+n.attr("data-prompt-target")).length>0?u.appendTo(e("#"+n.attr("data-prompt-target"))):n.after(u)):n.before(u);var c=t._calculatePosition(n,u,o);return u.css({position:f==="inline"?"relative":"absolute",top:c.callerTopPosition,left:c.callerleftPosition,marginTop:c.marginTopSize,opacity:0}).data("callerField",n),o.autoHidePrompt&&setTimeout(function(){u.animate({opacity:0},function(){u.closest(".formErrorOuter").remove(),u.remove()})},o.autoHideDelay),u.animate({opacity:.87})},_updatePrompt:function(e,n,r,i,s,o,u){if(n){typeof i!="undefined"&&(i=="pass"?n.addClass("greenPopup"):n.removeClass("greenPopup"),i=="load"?n.addClass("blackPopup"):n.removeClass("blackPopup")),s?n.addClass("ajaxed"):n.removeClass("ajaxed"),n.find(".formErrorContent").html(r);var a=t._calculatePosition(e,n,o),f={top:a.callerTopPosition,left:a.callerleftPosition,marginTop:a.marginTopSize};u?n.css(f):n.animate(f)}},_closePrompt:function(e){var n=t._getPrompt(e);n&&n.fadeTo("fast",0,function(){n.parent(".formErrorOuter").remove(),n.remove()})},closePrompt:function(e){return t._closePrompt(e)},_getPrompt:function(n){var r=e(n).closest("form, .validationEngineContainer").attr("id"),i=t._getClassName(n.attr("id"))+"formError",s=e("."+t._escapeExpression(i)+".parentForm"+r)[0];if(s)return e(s)},_escapeExpression:function(e){return e.replace(/([#;&,\.\+\*\~':"\!\^$\[\]\(\)=>\|])/g,"\\$1")},isRTL:function(t){var n=e(document),r=e("body"),i=t&&t.hasClass("rtl")||t&&(t.attr("dir")||"").toLowerCase()==="rtl"||n.hasClass("rtl")||(n.attr("dir")||"").toLowerCase()==="rtl"||r.hasClass("rtl")||(r.attr("dir")||"").toLowerCase()==="rtl";return Boolean(i)},_calculatePosition:function(e,t,n){var r,i,s,o=e.width(),u=e.position().left,a=e.position().top,f=e.height(),l=t.height();r=i=0,s=-l;var c=e.data("promptPosition")||n.promptPosition,h="",p="",d=0,v=0;typeof c=="string"&&c.indexOf(":")!=-1&&(h=c.substring(c.indexOf(":")+1),c=c.substring(0,c.indexOf(":")),h.indexOf(",")!=-1&&(p=h.substring(h.indexOf(",")+1),h=h.substring(0,h.indexOf(",")),v=parseInt(p),isNaN(v)&&(v=0)),d=parseInt(h),isNaN(h)&&(h=0));switch(c){default:case"topRight":i+=u+o-30,r+=a;break;case"topLeft":r+=a,i+=u;break;case"centerRight":r=a+4,s=0,i=u+e.outerWidth(!0)+5;break;case"centerLeft":i=u-(t.width()+2),r=a+4,s=0;break;case"bottomLeft":r=a+e.height()+5,s=0,i=u;break;case"bottomRight":i=u+o-30,r=a+e.height()+5,s=0;break;case"inline":i=0,r=0,s=0}return i+=d,r+=v,{callerTopPosition:r+"px",callerleftPosition:i+"px",marginTopSize:s+"px"}},_saveOptions:function(t,n){if(e.validationEngineLanguage)var r=e.validationEngineLanguage.allRules;else e.error("jQuery.validationEngine rules are not loaded, plz add localization files to the page");e.validationEngine.defaults.allrules=r;var i=e.extend(!0,{},e.validationEngine.defaults,n);return t.data("jqv",i),i},_getClassName:function(e){if(e)return e.replace(/:/g,"_").replace(/\./g,"_")},_jqSelector:function(e){return e.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1")},_condRequired:function(e,n,r,i){var s,o;for(s=r+1;s<n.length;s++){o=jQuery("#"+n[s]).first();if(o.length&&t._required(o,["required"],0,i,true)==undefined)return t._required(e,["required"],0,i)}},_submitButtonClick:function(t){var n=e(this),r=n.closest("form, .validationEngineContainer");r.data("jqv_submitButton",n.attr("id"))}};e.fn.validationEngine=function(n){var r=e(this);if(!r[0])return r;if(typeof n=="string"&&n.charAt(0)!="_"&&t[n])return n!="showPrompt"&&n!="hide"&&n!="hideAll"&&t.init.apply(r),t[n].apply(r,Array.prototype.slice.call(arguments,1));if(typeof n=="object"||!n)return t.init.apply(r,arguments),t.attach.apply(r);e.error("Method "+n+" does not exist in jQuery.validationEngine")},e.validationEngine={fieldIdCounter:0,defaults:{globalFormValidating:e.noop,globalFieldValidating:e.noop,globalFieldResult:e.noop,validationEventTrigger:"blur keyup change",scroll:!0,focusFirstField:!0,showPrompts:!0,validateNonVisibleFields:!1,promptPosition:"topRight",bindMethod:"bind",inlineAjax:!1,ajaxFormValidation:!1,ajaxFormValidationURL:!1,ajaxFormValidationMethod:"get",onAjaxFormComplete:e.noop,onBeforeAjaxFormValidation:e.noop,onValidationComplete:!1,doNotShowAllErrosOnSubmit:!1,custom_error_messages:{},binded:!0,showArrow:!0,isError:!1,maxErrorsPerField:!1,ajaxValidCache:{},autoPositionUpdate:!1,InvalidFields:[],onFieldSuccess:!1,onFieldFailure:!1,onSuccess:!1,onFailure:!1,validateAttribute:"class",addSuccessCssClassToField:"",addFailureCssClassToField:"",autoHidePrompt:!1,autoHideDelay:1e4,fadeDuration:.3,prettySelect:!1,addPromptClass:"",usePrefix:"",useSuffix:"",showOneMessage:!1}},e(function(){e.validationEngine.defaults.promptPosition=t.isRTL()?"topLeft":"topRight"})}),define("app/plugins/languages/jquery.validationEngine-en",["jquery"],function(e){e.fn.validationEngineLanguage=function(){},e.validationEngineLanguage={newLang:function(){e.validationEngineLanguage.allRules={required:{regex:"none",alertText:"* This field is required",alertTextCheckboxMultiple:"* Please select an option",alertTextCheckboxe:"* This checkbox is required",alertTextDateRange:"* Both date range fields are required"},requiredInFunction:{func:function(e,t,n,r){return e.val()=="test"?!0:!1},alertText:"* Field must equal test"},dateRange:{regex:"none",alertText:"* Invalid ",alertText2:"Date Range"},dateTimeRange:{regex:"none",alertText:"* Invalid ",alertText2:"Date Time Range"},minSize:{regex:"none",alertText:"* Minimum ",alertText2:" characters required"},maxSize:{regex:"none",alertText:"* Maximum ",alertText2:" characters allowed"},groupRequired:{regex:"none",alertText:"* You must fill one of the following fields"},min:{regex:"none",alertText:"* Minimum value is "},max:{regex:"none",alertText:"* Maximum value is "},past:{regex:"none",alertText:"* Date prior to "},future:{regex:"none",alertText:"* Date past "},maxCheckbox:{regex:"none",alertText:"* Maximum ",alertText2:" options allowed"},minCheckbox:{regex:"none",alertText:"* Please select ",alertText2:" options"},equals:{regex:"none",alertText:"* Fields do not match"},creditCard:{regex:"none",alertText:"* Invalid credit card number"},phone:{regex:/^([\+][0-9]{1,3}[\ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9\ \.\-\/]{3,20})((x|ext|extension)[\ ]?[0-9]{1,4})?$/,alertText:"* Invalid phone number"},email:{regex:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,alertText:"* Invalid email address"},integer:{regex:/^[\-\+]?\d+$/,alertText:"* Not a valid integer"},number:{regex:/^[\-\+]?((([0-9]{1,3})([,][0-9]{3})*)|([0-9]+))?([\.]([0-9]+))?$/,alertText:"* Invalid floating decimal number"},date:{func:function(e){var t=new RegExp(/^(\d{4})[\/\-\.](0?[1-9]|1[012])[\/\-\.](0?[1-9]|[12][0-9]|3[01])$/),n=t.exec(e.val());if(n==null)return!1;var r=n[1],i=n[2]*1,s=n[3]*1,o=new Date(r,i-1,s);return o.getFullYear()==r&&o.getMonth()==i-1&&o.getDate()==s},alertText:"* Invalid date, must be in YYYY-MM-DD format"},ipv4:{regex:/^((([01]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))[.]){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))$/,alertText:"* Invalid IP address"},url:{regex:/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,alertText:"* Invalid URL"},onlyNumberSp:{regex:/^[0-9\ ]+$/,alertText:"* Numbers only"},onlyLetterSp:{regex:/^[a-zA-Z\ \']+$/,alertText:"* Letters only"},onlyLetterNumber:{regex:/^[0-9a-zA-Z]+$/,alertText:"* No special characters allowed"},ajaxUserCall:{url:"ajaxValidateFieldUser",extraData:"name=eric",alertText:"* This user is already taken",alertTextLoad:"* Validating, please wait"},ajaxUserCallPhp:{url:"phpajax/ajaxValidateFieldUser.php",extraData:"name=eric",alertTextOk:"* This username is available",alertText:"* This user is already taken",alertTextLoad:"* Validating, please wait"},ajaxNameCall:{url:"ajaxValidateFieldName",alertText:"* This name is already taken",alertTextOk:"* This name is available",alertTextLoad:"* Validating, please wait"},ajaxNameCallPhp:{url:"phpajax/ajaxValidateFieldName.php",alertText:"* This name is already taken",alertTextLoad:"* Validating, please wait"},validate2fields:{alertText:"* Please input HELLO"},dateFormat:{regex:/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/,alertText:"* Invalid Date"},dateTimeFormat:{regex:/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/,alertText:"* Invalid Date or Date Format",alertText2:"Expected Format: ",alertText3:"mm/dd/yyyy hh:mm:ss AM|PM or ",alertText4:"yyyy-mm-dd hh:mm:ss AM|PM"}}}},e.validationEngineLanguage.newLang()}),define("app/util/validation-setup",["require","jquery","../plugins/jquery.validationEngine","../plugins/languages/jquery.validationEngine-en"],function(e){var t=e("jquery"),n={};return e("../plugins/jquery.validationEngine"),e("../plugins/languages/jquery.validationEngine-en"),n.setupValidation=function(){t.validationEngine.defaults.globalFieldValidating=function(e){e.obj.ok=!1;if(e.obj.e==null){e.obj.ok=!0;return}if(e.obj.e.type==="focusout"){e.field.data("enableValidation",!0),e.obj.ok=!0;return}if(e.obj.e.type==="keyup"||e.obj.e.type==="change")e.field.data("enableValidation")===!0?e.obj.ok=!0:e.obj.ok=!1}},n}),function(e){typeof define=="function"&&define.amd?define("app/plugins/fullcalendar",["jquery","moment"],e):e(jQuery,moment)}(function(e,t){function r(e,t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")}function i(e,t){var n=t.longDateFormat("L");return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),e.isRTL?n+=" ddd":n="ddd "+n,n}function f(e){l(n,e)}function l(t){function n(n,r){e.isPlainObject(r)&&e.isPlainObject(t[n])&&!c(n)?t[n]=l({},t[n],r):r!==undefined&&(t[n]=r)}for(var r=1;r<arguments.length;r++)e.each(arguments[r],n);return t}function c(e){return/(Time|Duration)$/.test(e)}function h(r,i){function H(e){x?I()&&(V(),W(e)):B()}function B(){T=c.theme?"ui":"fc",r.addClass("fc"),c.isRTL?r.addClass("fc-rtl"):r.addClass("fc-ltr"),c.theme&&r.addClass("ui-widget"),x=e("<div class='fc-content' />").prependTo(r),E=new p(f,c),S=E.render(),S&&r.prepend(S),R(c.defaultView),c.handleWindowResize&&e(window).resize(J),q()||j()}function j(){setTimeout(function(){!N.start&&q()&&z()},0)}function F(){N&&(St("viewDestroy",N,N,N.element),N.triggerEventDestroy()),e(window).unbind("resize",J),E.destroy(),x.remove(),r.removeClass("fc fc-rtl ui-widget")}function I(){return r.is(":visible")}function q(){return e("body").is(":visible")}function R(e){(!N||e!=N.name)&&U(e)}function U(t){A++,N&&(St("viewDestroy",N,N,N.element),at(),N.triggerEventDestroy(),gt(),N.element.remove(),E.deactivateButton(N.name)),E.activateButton(t),N=new a[t](e("<div class='fc-view fc-view-"+t+"' />").appendTo(x),f),z(),yt(),A--}function z(e){(!N.start||e||!M.isWithin(N.intervalStart,N.intervalEnd))&&I()&&W(e)}function W(e){A++,N.start&&(St("viewDestroy",N,N,N.element),at(),Z()),gt(),e&&(M=N.incrementDate(M,e)),N.render(M.clone()),$(),yt(),(N.afterRender||P)(),st(),ot(),St("viewRender",N,N,N.element),A--,et()}function X(){I()&&(at(),Z(),V(),$(),Y())}function V(){c.contentHeight?k=c.contentHeight:c.height?k=c.height-(S?S.height():0)-O(x):k=Math.round(x.width()/Math.max(c.aspectRatio,.5))}function $(){k===undefined&&V(),A++,N.setHeight(k),N.setWidth(x.width()),A--,C=r.outerWidth()}function J(){if(!A)if(N.start){var e=++L;setTimeout(function(){e==L&&!A&&I()&&C!=(C=r.outerWidth())&&(A++,X(),N.trigger("windowResize",w),A--)},200)}else j()}function K(){Z(),nt()}function Q(e){Z(),Y(e)}function Y(e){I()&&(N.renderEvents(_,e),N.trigger("eventAfterAllRender"))}function Z(){N.triggerEventDestroy(),N.clearEvents(),N.clearEventData()}function et(){!c.lazyFetching||g(N.start,N.end)?nt():Y()}function nt(){b(N.start,N.end)}function rt(e){_=e,Y()}function it(e){Q(e)}function st(){E.updateTitle(N.title)}function ot(){var e=f.getNow();e.isWithin(N.intervalStart,N.intervalEnd)?E.disableButton("today"):E.enableButton("today")}function ut(e,t){N.select(e,t)}function at(){N&&N.unselect()}function ft(){z(-1)}function lt(){z(1)}function ct(){M.add("years",-1),z()}function ht(){M.add("years",1),z()}function pt(){M=f.getNow(),z()}function dt(e){M=f.moment(e),z()}function vt(e){M.add(t.duration(e)),z()}function mt(){return M.clone()}function gt(){x.css({width:"100%",height:x.height(),overflow:"hidden"})}function yt(){x.css({width:"",height:"",overflow:""})}function bt(){return f}function wt(){return N}function Et(e,t){if(t===undefined)return c[e];if(e=="height"||e=="contentHeight"||e=="aspectRatio")c[e]=t,X()}function St(e,t){if(c[e])return c[e].apply(t||w,Array.prototype.slice.call(arguments,2))}var f=this;i=i||{};var c=l({},n,i),h;c.lang in s?h=s[c.lang]:h=s[n.lang],h&&(c=l({},n,h,i)),c.isRTL&&(c=l({},n,o,h||{},i)),f.options=c,f.render=H,f.destroy=F,f.refetchEvents=K,f.reportEvents=rt,f.reportEventChange=it,f.rerenderEvents=Q,f.changeView=R,f.select=ut,f.unselect=at,f.prev=ft,f.next=lt,f.prevYear=ct,f.nextYear=ht,f.today=pt,f.gotoDate=dt,f.incrementDate=vt,f.getDate=mt,f.getCalendar=bt,f.getView=wt,f.option=Et,f.trigger=St;var d=y(t.langData(c.lang));c.monthNames&&(d._months=c.monthNames),c.monthNamesShort&&(d._monthsShort=c.monthNamesShort),c.dayNames&&(d._weekdays=c.dayNames),c.dayNamesShort&&(d._weekdaysShort=c.dayNamesShort);if(c.firstDay!=null){var v=y(d._week);v.dow=c.firstDay,d._week=v}f.defaultAllDayEventDuration=t.duration(c.defaultAllDayEventDuration),f.defaultTimedEventDuration=t.duration(c.defaultTimedEventDuration),f.moment=function(){var e;return c.timezone==="local"?(e=u.moment.apply(null,arguments),e.hasTime()&&e.local()):c.timezone==="UTC"?e=u.moment.utc.apply(null,arguments):e=u.moment.parseZone.apply(null,arguments),e._lang=d,e},f.getIsAmbigTimezone=function(){return c.timezone!=="local"&&c.timezone!=="UTC"},f.rezoneDate=function(e){return f.moment(e.toArray())},f.getNow=function(){var e=c.now;return typeof e=="function"&&(e=e()),f.moment(e)},f.calculateWeekNumber=function(e){var t=c.weekNumberCalculation;if(typeof t=="function")return t(e);if(t==="local")return e.week();if(t.toUpperCase()==="ISO")return e.isoWeek()},f.getEventEnd=function(e){return e.end?e.end.clone():f.getDefaultEventEnd(e.allDay,e.start)},f.getDefaultEventEnd=function(e,t){var n=t.clone();return e?n.stripTime().add(f.defaultAllDayEventDuration):n.add(f.defaultTimedEventDuration),f.getIsAmbigTimezone()&&n.stripZone(),n},f.formatRange=function(e,t,n){return typeof n=="function"&&(n=n.call(f,c,d)),tt(e,t,n,null,c.isRTL)},f.formatDate=function(e,t){return typeof t=="function"&&(t=t.call(f,c,d)),G(e,t)},m.call(f,c);var g=f.isFetchNeeded,b=f.fetchEvents,w=r[0],E,S,x,T,N,C,k,L=0,A=0,M,_=[],D;c.defaultDate!=null?M=f.moment(c.defaultDate):M=f.getNow(),c.droppable&&e(document).bind("dragstart",function(t,n){var r=t.target,i=e(r);if(!i.parents(".fc").length){var s=c.dropAccept;if(e.isFunction(s)?s.call(r,i):i.is(s))D=r,N.dragStart(D,t,n)}}).bind("dragstop",function(e,t){D&&(N.dragStop(D,e,t),D=null)})}function p(t,n){function o(){s=n.theme?"ui":"fc";var t=n.header;if(t)return i=e("<table class='fc-header' style='width:100%'/>").append(e("<tr/>").append(f("left")).append(f("center")).append(f("right"))),i}function u(){i.remove()}function f(r){var i=e("<td class='fc-header-"+r+"'/>"),o=n.header[r];return o&&e.each(o.split(" "),function(r){r>0&&i.append("<span class='fc-header-space'/>");var o;e.each(this.split(","),function(r,u){if(u=="title")i.append("<span class='fc-header-title'><h2>&nbsp;</h2></span>"),o&&o.addClass(s+"-corner-right"),o=null;else{var f;t[u]?f=t[u]:a[u]&&(f=function(){v.removeClass(s+"-state-hover"),t.changeView(u)});if(f){var l=j(n.themeButtonIcons,u),c=j(n.buttonIcons,u),h=j(n.defaultButtonText,u),p=j(n.buttonText,u),d;p?d=F(p):l&&n.theme?d="<span class='ui-icon ui-icon-"+l+"'></span>":c&&!n.theme?d="<span class='fc-icon fc-icon-"+c+"'></span>":d=F(h||u);var v=e("<span class='fc-button fc-button-"+u+" "+s+"-state-default'>"+d+"</span>").click(function(){v.hasClass(s+"-state-disabled")||f()}).mousedown(function(){v.not("."+s+"-state-active").not("."+s+"-state-disabled").addClass(s+"-state-down")}).mouseup(function(){v.removeClass(s+"-state-down")}).hover(function(){v.not("."+s+"-state-active").not("."+s+"-state-disabled").addClass(s+"-state-hover")},function(){v.removeClass(s+"-state-hover").removeClass(s+"-state-down")}).appendTo(i);q(v),o||v.addClass(s+"-corner-left"),o=v}}}),o&&o.addClass(s+"-corner-right")}),i}function l(e){i.find("h2").html(e)}function c(e){i.find("span.fc-button-"+e).addClass(s+"-state-active")}function h(e){i.find("span.fc-button-"+e).removeClass(s+"-state-active")}function p(e){i.find("span.fc-button-"+e).addClass(s+"-state-disabled")}function d(e){i.find("span.fc-button-"+e).removeClass(s+"-state-disabled")}var r=this;r.render=o,r.destroy=u,r.updateTitle=l,r.activateButton=c,r.deactivateButton=h,r.disableButton=p,r.enableButton=d;var i=e([]),s}function m(t){function S(e,t){return!l||e.clone().stripZone()<l.clone().stripZone()||t.clone().stripZone()>c.clone().stripZone()}function x(e,t){l=e,c=t,y=[];var n=++h,r=f.length;p=r;for(var i=0;i<r;i++)T(f[i],n)}function T(e,t){N(e,function(n){if(t==h){if(n)for(var r=0;r<n.length;r++){var i=j(n[r],e);i&&y.push(i)}p--,p||s(y)}})}function N(r,i){var s,o=u.sourceFetchers,a;for(s=0;s<o.length;s++){a=o[s].call(n,r,l.clone(),c.clone(),t.timezone,i);if(a===!0)return;if(typeof a=="object"){N(a,i);return}}var f=r.events;if(f)e.isFunction(f)?(H(),f.call(n,l.clone(),c.clone(),t.timezone,function(e){i(e),B()})):e.isArray(f)?i(f):i();else{var h=r.url;if(h){var p=r.success,v=r.error,m=r.complete,g;e.isFunction(r.data)?g=r.data():g=r.data;var y=e.extend({},g||{}),b=W(r.startParam,t.startParam),w=W(r.endParam,t.endParam),E=W(r.timezoneParam,t.timezoneParam);b&&(y[b]=l.format()),w&&(y[w]=c.format()),t.timezone&&t.timezone!="local"&&(y[E]=t.timezone),H(),e.ajax(e.extend({},d,r,{data:y,success:function(t){t=t||[];var n=z(p,this,arguments);e.isArray(n)&&(t=n),i(t)},error:function(){z(v,this,arguments),i()},complete:function(){z(m,this,arguments),B()}}))}else i()}}function C(e){e=k(e),e&&(p++,T(e,h))}function k(t){e.isFunction(t)||e.isArray(t)?t={events:t}:typeof t=="string"&&(t={url:t});if(typeof t=="object")return q(t),f.push(t),t}function L(t){f=e.grep(f,function(e){return!R(e,t)}),y=e.grep(y,function(e){return!R(e.source,t)}),s(y)}function A(e){e.start=n.moment(e.start),e.end&&(e.end=n.moment(e.end)),F(e),M(e),s(y)}function M(e){var t,n,r,i;for(t=0;t<y.length;t++){n=y[t];if(n._id==e._id&&n!==e)for(r=0;r<O.length;r++)i=O[r],e[i]!==undefined&&(n[i]=e[i])}}function _(e,t){var n=j(e);n&&(n.source||(t&&(a.events.push(n),n.source=a),y.push(n)),s(y))}function D(t){var n;if(!t){y=[];for(n=0;n<f.length;n++)e.isArray(f[n].events)&&(f[n].events=[])}else{if(!e.isFunction(t)){var r=t+"";t=function(e){return e._id==r}}y=e.grep(y,t,!0);for(n=0;n<f.length;n++)e.isArray(f[n].events)&&(f[n].events=e.grep(f[n].events,t,!0))}s(y)}function P(t){return e.isFunction(t)?e.grep(y,t):t?(t+="",e.grep(y,function(e){return e._id==t})):y}function H(){m++||r("loading",null,!0,i())}function B(){--m||r("loading",null,!1,i())}function j(r,i){var s={},u,a,f,l;t.eventDataTransform&&(r=t.eventDataTransform(r)),i&&i.eventDataTransform&&(r=i.eventDataTransform(r)),u=n.moment(r.start||r.date);if(!u.isValid())return;a=null;if(r.end){a=n.moment(r.end);if(!a.isValid())return}return f=r.allDay,f===undefined&&(l=W(i?i.allDayDefault:undefined,t.allDayDefault),l!==undefined?f=l:f=!u.hasTime()&&(!a||!a.hasTime())),f?(u.hasTime()&&u.stripTime(),a&&a.hasTime()&&a.stripTime()):(u.hasTime()||(u=n.rezoneDate(u)),a&&!a.hasTime()&&(a=n.rezoneDate(a))),e.extend(s,r),i&&(s.source=i),s._id=r._id||(r.id===undefined?"_fc"+v++:r.id+""),r.className?typeof r.className=="string"?s.className=r.className.split(/\s+/):s.className=r.className:s.className=[],s.allDay=f,s.start=u,s.end=a,t.forceEventDuration&&!s.end&&(s.end=o(s)),g(s),s}function F(e,t,r){var i=e._allDay,s=e._start,o=e._end,u=!1,a,f,l;return!t&&!r&&(t=e.start,r=e.end),e.allDay!=i?a=e.allDay:a=!(t||r).hasTime(),a&&(t&&(t=t.clone().stripTime()),r&&(r=r.clone().stripTime())),t&&(a?f=E(t,s.clone().stripTime()):f=E(t,s)),a!=i?u=!0:r&&(l=E(r||n.getDefaultEventEnd(a,t||s),t||s).subtract(E(o||n.getDefaultEventEnd(i,s),s))),I(P(e._id),u,a,f,l)}function I(r,i,s,o,u){var a=n.getIsAmbigTimezone(),f=[];return e.each(r,function(e,r){var l=r._allDay,c=r._start,h=r._end,p=s!=null?s:l,d=c.clone(),v=!i&&h?h.clone():null;p?(d.stripTime(),v&&v.stripTime()):(d.hasTime()||(d=n.rezoneDate(d)),v&&!v.hasTime()&&(v=n.rezoneDate(v))),!v&&(t.forceEventDuration||+u)&&(v=n.getDefaultEventEnd(p,d)),d.add(o),v&&v.add(o).add(u),a&&(+o||+u)&&(d.stripZone(),v&&v.stripZone()),r.allDay=p,r.start=d,r.end=v,g(r),f.push(function(){r.allDay=l,r.start=c,r.end=h,g(r)})}),function(){for(var e=0;e<f.length;e++)f[e]()}}function q(e){e.className?typeof e.className=="string"&&(e.className=e.className.split(/\s+/)):e.className=[];var t=u.sourceNormalizers;for(var r=0;r<t.length;r++)t[r].call(n,e)}function R(e,t){return e&&t&&U(e)==U(t)}function U(e){return(typeof e=="object"?e.events||e.url:"")||e}var n=this;n.isFetchNeeded=S,n.fetchEvents=x,n.addEventSource=C,n.removeEventSource=L,n.updateEvent=A,n.renderEvent=_,n.removeEvents=D,n.clientEvents=P,n.mutateEvent=F;var r=n.trigger,i=n.getView,s=n.reportEvents,o=n.getEventEnd,a={events:[]},f=[a],l,c,h=0,p=0,m=0,y=[],b=t.eventSources||[];t.events&&b.push(t.events);for(var w=0;w<b.length;w++)k(b[w]);var O=["title","url","allDay","className","editable","color","backgroundColor","borderColor","textColor"]}function g(e){e._allDay=e.allDay,e._start=e.start.clone(),e._end=e.end?e.end.clone():null}function y(e){var t=function(){};return t.prototype=e,new t}function b(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function E(e,n){return t.duration({days:e.clone().stripTime().diff(n.clone().stripTime(),"days"),ms:e.time()-n.time()})}function S(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function x(t,n,r){t.unbind("mouseover").mouseover(function(t){var i=t.target,s,o,u;while(i!=this)s=i,i=i.parentNode;(o=s._fci)!==undefined&&(s._fci=undefined,u=n[o],r(u.event,u.element,u),e(t.target).trigger(t)),t.stopPropagation()})}function T(t,n,r){for(var i=0,s;i<t.length;i++)s=e(t[i]),s.width(Math.max(0,n-C(s,r)))}function N(t,n,r){for(var i=0,s;i<t.length;i++)s=e(t[i]),s.height(Math.max(0,n-O(s,r)))}function C(e,t){return k(e)+A(e)+(t?L(e):0)}function k(t){return(parseFloat(e.css(t[0],"paddingLeft",!0))||0)+(parseFloat(e.css(t[0],"paddingRight",!0))||0)}function L(t){return(parseFloat(e.css(t[0],"marginLeft",!0))||0)+(parseFloat(e.css(t[0],"marginRight",!0))||0)}function A(t){return(parseFloat(e.css(t[0],"borderLeftWidth",!0))||0)+(parseFloat(e.css(t[0],"borderRightWidth",!0))||0)}function O(e,t){return M(e)+D(e)+(t?_(e):0)}function M(t){return(parseFloat(e.css(t[0],"paddingTop",!0))||0)+(parseFloat(e.css(t[0],"paddingBottom",!0))||0)}function _(t){return(parseFloat(e.css(t[0],"marginTop",!0))||0)+(parseFloat(e.css(t[0],"marginBottom",!0))||0)}function D(t){return(parseFloat(e.css(t[0],"borderTopWidth",!0))||0)+(parseFloat(e.css(t[0],"borderBottomWidth",!0))||0)}function P(){}function H(e,t){return e-t}function B(e){return Math.max.apply(Math,e)}function j(e,t){e=e||{};if(e[t]!==undefined)return e[t];var n=t.split(/(?=[A-Z])/),r=n.length-1,i;for(;r>=0;r--){i=e[n[r].toLowerCase()];if(i!==undefined)return i}return e["default"]}function F(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function I(e){return e.replace(/&.*?;/g,"")}function q(e){e.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function R(e){e.children().removeClass("fc-first fc-last").filter(":first-child").addClass("fc-first").end().filter(":last-child").addClass("fc-last")}function U(e,t){var n=e.source||{},r=e.color,i=n.color,s=t("eventColor"),o=e.backgroundColor||r||n.backgroundColor||i||t("eventBackgroundColor")||s,u=e.borderColor||r||n.borderColor||i||t("eventBorderColor")||s,a=e.textColor||n.textColor||t("eventTextColor"),f=[];return o&&f.push("background-color:"+o),u&&f.push("border-color:"+u),a&&f.push("color:"+a),f.join(";")}function z(t,n,r){e.isFunction(t)&&(t=[t]);if(t){var i,s;for(i=0;i<t.length;i++)s=t[i].apply(n,r)||s;return s}}function W(){for(var e=0;e<arguments.length;e++)if(arguments[e]!==undefined)return arguments[e]}function $(n,r,i){var s=n[0],o=n.length==1&&typeof s=="string",u,a,f,l;if(t.isMoment(s))l=t.apply(null,n),s._ambigTime&&(l._ambigTime=!0),s._ambigZone&&(l._ambigZone=!0);else if(S(s)||s===undefined)l=t.apply(null,n);else{u=!1,a=!1;if(o){if(X.test(s))s+="-01",n=[s],u=!0,a=!0;else if(f=V.exec(s))u=!f[5],a=!0}else e.isArray(s)&&(a=!0);r?l=t.utc.apply(t,n):l=t.apply(null,n),u?(l._ambigTime=!0,l._ambigZone=!0):i&&(a?l._ambigZone=!0:o&&l.zone(s))}return new J(l)}function J(e){b(this,e)}function K(e){var t=[],n=!1,r=!1,i;for(i=0;i<e.length;i++)t.push(u.moment(e[i])),n=n||t[i]._ambigTime,r=r||t[i]._ambigZone;for(i=0;i<t.length;i++)n?t[i].stripTime():r&&t[i].stripZone();return t}function Q(e,n){return t.fn.format.call(e,n)}function G(e,t){return Y(e,ot(t))}function Y(e,t){var n="",r;for(r=0;r<t.length;r++)n+=et(e,t[r]);return n}function et(e,t){var n,r;if(typeof t=="string")return t;if(n=t.token)return Z[n]?Z[n](e):Q(e,n);if(t.maybe){r=Y(e,t.maybe);if(r.match(/[1-9]/))return r}return""}function tt(e,t,n,r,i){return e=u.moment.parseZone(e),t=u.moment.parseZone(t),n=e.lang().longDateFormat(n)||n,r=r||" - ",nt(e,t,ot(n),r,i)}function nt(e,t,n,r,i){var s,o,u="",a,f="",l,c="",h="",p="";for(o=0;o<n.length;o++){s=it(e,t,n[o]);if(s===!1)break;u+=s}for(a=n.length-1;a>o;a--){s=it(e,t,n[a]);if(s===!1)break;f=s+f}for(l=o;l<=a;l++)c+=et(e,n[l]),h+=et(t,n[l]);if(c||h)i?p=h+r+c:p=c+r+h;return u+p+f}function it(e,t,n){var r,i;if(typeof n=="string")return n;if(r=n.token){i=rt[r.charAt(0)];if(i&&e.isSame(t,i))return Q(e,r)}return!1}function ot(e){return e in st?st[e]:st[e]=ut(e)}function ut(e){var t=[],n=/\[([^\]]*)\]|\(([^\)]*)\)|(LT|(\w)\4*o?)|([^\w\[\(]+)/g,r;while(r=n.exec(e))r[1]?t.push(r[1]):r[2]?t.push({maybe:ut(r[2])}):r[3]?t.push({token:r[3]}):r[5]&&t.push(r[5]);return t}function at(e,t){function r(e,t){return e.clone().stripTime().add("months",t).startOf("month")}function i(e){n.intervalStart=e.clone().stripTime().startOf("month"),n.intervalEnd=n.intervalStart.clone().add("months",1),n.start=n.intervalStart.clone().startOf("week"),n.start=n.skipHiddenDays(n.start),n.end=n.intervalEnd.clone().add("days",(7-n.intervalEnd.weekday())%7),n.end=n.skipHiddenDays(n.end,-1,!0);var r=Math.ceil(n.end.diff(n.start,"weeks",!0));n.opt("weekMode")=="fixed"&&(n.end.add("weeks",6-r),r=6),n.title=t.formatDate(n.intervalStart,n.opt("titleFormat")),n.renderBasic(r,n.getCellsPerWeek(),!0)}var n=this;n.incrementDate=r,n.render=i,ct.call(n,e,t,"month")}function ft(e,t){function r(e,t){return e.clone().stripTime().add("weeks",t).startOf("week")}function i(e){n.intervalStart=e.clone().stripTime().startOf("week"),n.intervalEnd=n.intervalStart.clone().add("weeks",1),n.start=n.skipHiddenDays(n.intervalStart),n.end=n.skipHiddenDays(n.intervalEnd,-1,!0),n.title=t.formatRange(n.start,n.end.clone().subtract(1),n.opt("titleFormat")," — "),n.renderBasic(1,n.getCellsPerWeek(),!1)}var n=this;n.incrementDate=r,n.render=i,ct.call(n,e,t,"basicWeek")}function lt(e,t){function r(e,t){var r=e.clone().stripTime().add("days",t);return r=n.skipHiddenDays(r,t<0?-1:1),r}function i(e){n.start=n.intervalStart=e.clone().stripTime(),n.end=n.intervalEnd=n.start.clone().add("days",1),n.title=t.formatDate(n.start,n.opt("titleFormat")),n.renderBasic(1,1,!1)}var n=this;n.incrementDate=r,n.render=i,ct.call(n,e,t,"basicDay")}function ct(t,n,r){function X(e,t,n){_=e,D=t,P=n,V(),y||$(),J()}function V(){U=s("theme")?"ui":"fc",z=s("columnFormat"),W=s("weekNumbers")}function $(){C=e("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(t)}function J(){var n=K();v&&v.remove(),v=e(n).appendTo(t),m=v.find("thead"),g=m.find(".fc-day-header"),y=v.find("tbody"),b=y.find("tr"),E=y.find(".fc-day"),S=b.find("td:first-child"),x=b.eq(0).find(".fc-day > div"),N=b.eq(0).find(".fc-day-content > div"),R(m.add(m.find("tr"))),R(b),b.eq(0).addClass("fc-first"),b.filter(":last").addClass("fc-last"),E.each(function(t,n){var r=l(Math.floor(t/D),t%D);o("dayRender",i,r,e(n))}),tt(E)}function K(){var e="<table class='fc-border-separate' style='width:100%' cellspacing='0'>"+Q()+G()+"</table>";return e}function Q(){var e=U+"-widget-header",t="",n,r;t+="<thead><tr>",W&&(t+="<th class='fc-week-number "+e+"'>"+F(s("weekNumberTitle"))+"</th>");for(n=0;n<D;n++)r=l(0,n),t+="<th class='fc-day-header fc-"+w[r.day()]+" "+e+"'>"+F(p(r,z))+"</th>";return t+="</tr></thead>",t}function G(){var e=U+"-widget-content",t="",n,r,i;t+="<tbody>";for(n=0;n<_;n++){t+="<tr class='fc-week'>",W&&(i=l(n,0),t+="<td class='fc-week-number "+e+"'>"+"<div>"+F(d(i))+"</div>"+"</td>");for(r=0;r<D;r++)i=l(n,r),t+=Y(i);t+="</tr>"}return t+="</tbody>",t}function Y(e){var t=i.intervalStart.month(),r=n.getNow().stripTime(),s="",o=U+"-widget-content",u=["fc-day","fc-"+w[e.day()],o];return e.month()!=t&&u.push("fc-other-month"),e.isSame(r,"day")?u.push("fc-today",U+"-state-highlight"):e<r?u.push("fc-past"):u.push("fc-future"),s+="<td class='"+u.join(" ")+"'"+" data-date='"+e.format()+"'"+">"+"<div>",P&&(s+="<div class='fc-day-number'>"+e.date()+"</div>"),s+="<div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></div></td>",s}function Z(t){L=t;var n=Math.max(L-m.height(),0),r,i,o;s("weekMode")=="variable"?r=i=Math.floor(n/(_==1?2:6)):(r=Math.floor(n/_),i=n-r*(_-1)),S.each(function(t,n){t<_&&(o=e(n),o.find("> div").css("min-height",(t==_-1?i:r)-O(o)))})}function et(e){k=e,j.clear(),I.clear(),M=0,W&&(M=m.find("th.fc-week-number").outerWidth()),A=Math.floor((k-M)/D),T(g.slice(0,-1),A)}function tt(e){e.click(nt).mousedown(f)}function nt(t){if(!s("selectable")){var r=n.moment(e(this).data("date"));o("dayClick",this,r,t)}}function rt(e,t,n){n&&H.build();var r=h(e,t);for(var i=0;i<r.length;i++){var s=r[i];tt(it(s.row,s.leftCol,s.row,s.rightCol))}}function it(e,n,r,i){var s=H.rect(e,n,r,i,t);return u(s,t)}function st(e){return e.clone().stripTime().add("days",1)}function ot(e,t){rt(e,t,!0)}function ut(){a()}function at(e,t){var n=c(e),r=E[n.row*D+n.col];o("dayClick",r,e,t)}function ft(e,t,r){B.start(function(e){a();if(e){var t=l(e),r=t.clone().add(n.defaultAllDayEventDuration);rt(t,r)}},t)}function lt(e,t,n){var r=B.stop();a(),r&&o("drop",e,l(r),t,n)}function ct(e){return j.left(e)}function pt(e){return j.right(e)}function dt(e){return I.left(e)}function vt(e){return I.right(e)}function mt(e){return b.eq(e)}var i=this;i.renderBasic=X,i.setHeight=Z,i.setWidth=et,i.renderDayOverlay=rt,i.defaultSelectionEnd=st,i.renderSelection=ot,i.clearSelection=ut,i.reportDayClick=at,i.dragStart=ft,i.dragStop=lt,i.getHoverListener=function(){return B},i.colLeft=ct,i.colRight=pt,i.colContentLeft=dt,i.colContentRight=vt,i.getIsCellAllDay=function(){return!0},i.allDayRow=mt,i.getRowCnt=function(){return _},i.getColCnt=function(){return D},i.getColWidth=function(){return A},i.getDaySegmentContainer=function(){return C},At.call(i,t,n,r),Ht.call(i),Pt.call(i),ht.call(i);var s=i.opt,o=i.trigger,u=i.renderOverlay,a=i.clearOverlays,f=i.daySelectionMousedown,l=i.cellToDate,c=i.dateToCell,h=i.rangeToSegments,p=n.formatDate,d=n.calculateWeekNumber,v,m,g,y,b,E,S,x,N,C,k,L,A,M,_,D,P,H,B,j,I,U,z,W;q(t.addClass("fc-grid")),H=new Bt(function(t,n){var r,i,s;g.each(function(t,o){r=e(o),i=r.offset().left,t&&(s[1]=i),s=[i],n[t]=s}),s[1]=i+r.outerWidth(),b.each(function(n,o){n<_&&(r=e(o),i=r.offset().top,n&&(s[1]=i),s=[i],t[n]=s)}),s[1]=i+r.outerHeight()}),B=new jt(H),j=new It(function(e){return x.eq(e)}),I=new It(function(e){return N.eq(e)})}function ht(){function t(t,n){e.renderDayEvents(t,n)}function n(){e.getDaySegmentContainer().empty()}var e=this;e.renderEvents=t,e.clearEvents=n,Ot.call(e)}function pt(e,t){function r(e,t){return e.clone().stripTime().add("weeks",t).startOf("week")}function i(e){n.intervalStart=e.clone().stripTime().startOf("week"),n.intervalEnd=n.intervalStart.clone().add("weeks",1),n.start=n.skipHiddenDays(n.intervalStart),n.end=n.skipHiddenDays(n.intervalEnd,-1,!0),n.title=t.formatRange(n.start,n.end.clone().subtract(1),n.opt("titleFormat")," — "),n.renderAgenda(n.getCellsPerWeek())}var n=this;n.incrementDate=r,n.render=i,gt.call(n,e,t,"agendaWeek")}function dt(e,t){function r(e,t){var r=e.clone().stripTime().add("days",t);return r=n.skipHiddenDays(r,t<0?-1:1),r}function i(e){n.start=n.intervalStart=e.clone().stripTime(),n.end=n.intervalEnd=n.start.clone().add("days",1),n.title=t.formatDate(n.start,n.opt("titleFormat")),n.renderAgenda(1)}var n=this;n.incrementDate=r,n.render=i,gt.call(n,e,t,"agendaDay")}function vt(e,t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")}function mt(e,t){return t.longDateFormat("LT").replace(/\s*a$/i,"")}function gt(n,r,i){function pt(e){tt=e,dt(),b?mt():vt()}function dt(){at=o("theme")?"ui":"fc",ft=o("isRTL"),ht=o("columnFormat"),lt=t.duration(o("minTime")),ct=t.duration(o("maxTime")),Q=t.duration(o("slotDuration")),Y=o("snapDuration"),Y=Y?t.duration(Y):Q}function vt(){var r,i=at+"-widget-header",u=at+"-widget-content",a,f,l,c=Q.asMinutes()%15===0;mt(),_=e("<div style='position:absolute;z-index:2;left:0;width:100%'/>").appendTo(n),o("allDaySlot")?(D=e("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(_),r="<table style='width:100%' class='fc-agenda-allday' cellspacing='0'><tr><th class='"+i+" fc-agenda-axis'>"+(o("allDayHTML")||F(o("allDayText")))+"</th>"+"<td>"+"<div class='fc-day-content'><div style='position:relative'/></div>"+"</td>"+"<th class='"+i+" fc-agenda-gutter'>&nbsp;</th>"+"</tr>"+"</table>",P=e(r).appendTo(_),B=P.find("tr"),Nt(B.find("td")),_.append("<div class='fc-agenda-divider "+i+"'>"+"<div class='fc-agenda-divider-inner'/>"+"</div>")):D=e([]),j=e("<div style='position:absolute;width:100%;overflow-x:hidden;overflow-y:auto'/>").appendTo(_),I=e("<div style='position:relative;width:100%;overflow:hidden'/>").appendTo(j),U=e("<div class='fc-event-container' style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(I),r="<table class='fc-agenda-slots' style='width:100%' cellspacing='0'><tbody>",a=t.duration(+lt),nt=0;while(a<ct)f=s.start.clone().time(a),l=f.minutes(),r+="<tr class='fc-slot"+nt+" "+(l?"fc-minor":"")+"'>"+"<th class='fc-agenda-axis "+i+"'>"+(!c||!l?F(g(f,o("axisFormat"))):"&nbsp;")+"</th>"+"<td class='"+u+"'>"+"<div style='position:relative'>&nbsp;</div>"+"</td>"+"</tr>",a.add(Q),nt++;r+="</tbody></table>",z=e(r).appendTo(I),Ct(z.find("td"))}function mt(){var t=gt();b&&b.remove(),b=e(t).appendTo(n),E=b.find("thead"),S=E.find("th").slice(1,-1),x=b.find("tbody"),C=x.find("td").slice(0,-1),k=C.find("> div"),L=C.find(".fc-day-content > div"),A=C.eq(0),M=k.eq(0),R(E.add(E.find("tr"))),R(x.add(x.find("tr")))}function gt(){var e="<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>"+bt()+wt()+"</table>";return e}function bt(){var e=at+"-widget-header",t,n="",r,i;n+="<thead><tr>",o("weekNumbers")?(t=d(0,0),r=y(t),ft?r+=o("weekNumberTitle"):r=o("weekNumberTitle")+r,n+="<th class='fc-agenda-axis fc-week-number "+e+"'>"+F(r)+"</th>"):n+="<th class='fc-agenda-axis "+e+"'>&nbsp;</th>";for(i=0;i<tt;i++)t=d(0,i),n+="<th class='fc-"+w[t.day()]+" fc-col"+i+" "+e+"'>"+F(g(t,ht))+"</th>";return n+="<th class='fc-agenda-gutter "+e+"'>&nbsp;</th>"+"</tr>"+"</thead>",n}function wt(){var e=at+"-widget-header",t=at+"-widget-content",n,i=r.getNow().stripTime(),s,o,u,a,f="";f+="<tbody><tr><th class='fc-agenda-axis "+e+"'>&nbsp;</th>",o="";for(s=0;s<tt;s++)n=d(0,s),a=["fc-col"+s,"fc-"+w[n.day()],t],n.isSame(i,"day")?a.push(at+"-state-highlight","fc-today"):n<i?a.push("fc-past"):a.push("fc-future"),u="<td class='"+a.join(" ")+"'>"+"<div>"+"<div class='fc-day-content'>"+"<div style='position:relative'>&nbsp;</div>"+"</div>"+"</div>"+"</td>",o+=u;return f+=o,f+="<td class='fc-agenda-gutter "+t+"'>&nbsp;</td>"+"</tr>"+"</tbody>",f}function Et(e){e===undefined&&(e=V),V=e,ut={};var t=x.position().top,n=j.position().top,r=Math.min(e-t,z.height()+n+1);M.height(r-O(A)),_.css("top",t),j.height(r-n-1);var i=z.find("tr:first").height()+1,s=z.find("tr:eq(1)").height();G=(i+s)/2,Z=Q/Y,et=G/Z}function St(t){X=t,st.clear(),ot.clear();var n=E.find("th:first");P&&(n=n.add(P.find("th:first"))),n=n.add(z.find("th:first")),$=0,T(n.width("").each(function(t,n){$=Math.max($,e(n).outerWidth())}),$);var r=b.find(".fc-agenda-gutter");P&&(r=r.add(P.find("th.fc-agenda-gutter")));var i=j[0].clientWidth;K=j.width()-i,K?(T(r,K),r.show().prev().removeClass("fc-last")):r.hide().prev().addClass("fc-last"),J=Math.floor((i-$)/tt),T(S.slice(0,-1),J)}function xt(){function n(){j.scrollTop(e)}var e=Wt(t.duration(o("scrollTime")))+1;n(),setTimeout(n,0)}function Tt(){xt()}function Nt(e){e.click(kt).mousedown(h)}function Ct(e){e.click(kt).mousedown(Kt)}function kt(e){if(!o("selectable")){var t=Math.min(tt-1,Math.floor((e.pageX-b.offset().left-$)/J)),n=d(0,t),i=this.parentNode.className.match(/fc-slot(\d+)/);if(i){var s=parseInt(i[1],10);n.add(lt+s*Q),n=r.rezoneDate(n),u("dayClick",C[t],n,e)}else u("dayClick",C[t],n,e)}}function Lt(e,t,n){n&&rt.build();var r=m(e,t);for(var i=0;i<r.length;i++){var s=r[i];Nt(Ot(s.row,s.leftCol,s.row,s.rightCol))}}function Ot(e,t,n,r){var i=rt.rect(e,t,n,r,_);return a(i,_)}function Mt(e,t){e=e.clone().stripZone(),t=t.clone().stripZone();for(var n=0;n<tt;n++){var r=d(0,n),i=r.clone().add("days",1),s=r<e?e:r,o=i<t?i:t;if(s<o){var u=rt.rect(0,n,0,n,I),f=zt(s,r),l=zt(o,r);u.top=f,u.height=l-f,Ct(a(u,I))}}}function _t(e){return st.left(e)}function Dt(e){return ot.left(e)}function Ft(e){return st.right(e)}function qt(e){return ot.right(e)}function Rt(e){return o("allDaySlot")&&!e.row}function Ut(e){var n=d(0,e.col),i=e.row;return o("allDaySlot")&&i--,i>=0&&(n.time(t.duration(lt+i*Y)),n=r.rezoneDate(n)),n}function zt(e,n){return Wt(t.duration(e.clone().stripZone()-n.clone().stripTime()))}function Wt(e){if(e<lt)return 0;if(e>=ct)return z.height();var t=(e-lt)/Q,n=Math.floor(t),r=t-n,i=ut[n];i===undefined&&(i=ut[n]=z.find("tr").eq(n).find("td div")[0].offsetTop);var s=i-1+r*G;return s=Math.max(s,0),s}function Xt(e){return e.hasTime()?e.clone().add(Q):e.clone().add("days",1)}function Vt(e,t){e.hasTime()||t.hasTime()?$t(e,t):o("allDaySlot")&&Lt(e,t,!0)}function $t(t,n){var r=o("selectHelper");rt.build();if(r){var i=v(t).col;if(i>=0&&i<tt){var s=rt.rect(0,i,0,i,I),u=zt(t,t),a=zt(n,t);if(a>u){s.top=u,s.height=a-u,s.left+=2,s.width-=5;if(e.isFunction(r)){var f=r(t,n);f&&(s.position="absolute",W=e(f).css(s).appendTo(I))}else s.isStart=!0,s.isEnd=!0,W=e(p({title:"",start:t,end:n,className:["fc-select-helper"],editable:!1},s)),W.css("opacity",o("dragOpacity"));W&&(Ct(W),I.append(W),T(W,s.width,!0),N(W,s.height,!0))}}}else Mt(t,n)}function Jt(){f(),W&&(W.remove(),W=null)}function Kt(t){if(t.which==1&&o("selectable")){c(t);var n;it.start(function(e,t){Jt();if(e&&e.col==t.col&&!Rt(e)){var r=Ut(t),i=Ut(e);n=[r,r.clone().add(Y),i,i.clone().add(Y)].sort(H),$t(n[0],n[3])}else n=null},t),e(document).one("mouseup",function(e){it.stop(),n&&(+n[0]==+n[1]&&Qt(n[0],e),l(n[0],n[3],e))})}}function Qt(e,t){u("dayClick",C[v(e).col],e,t)}function Gt(e,t,n){it.start(function(e){f();if(e){var t=Ut(e),n=t.clone();t.hasTime()?(n.add(r.defaultTimedEventDuration),Mt(t,n)):(n.add(r.defaultAllDayEventDuration),Lt(t,n))}},t)}function Yt(e,t,n){var r=it.stop();f(),r&&u("drop",e,Ut(r),t,n)}var s=this;s.renderAgenda=pt,s.setWidth=St,s.setHeight=Et,s.afterRender=Tt,s.computeDateTop=zt,s.getIsCellAllDay=Rt,s.allDayRow=function(){return B},s.getCoordinateGrid=function(){return rt},s.getHoverListener=function(){return it},s.colLeft=_t,s.colRight=Ft,s.colContentLeft=Dt,s.colContentRight=qt,s.getDaySegmentContainer=function(){return D},s.getSlotSegmentContainer=function(){return U},s.getSlotContainer=function(){return I},s.getRowCnt=function(){return 1},s.getColCnt=function(){return tt},s.getColWidth=function(){return J},s.getSnapHeight=function(){return et},s.getSnapDuration=function(){return Y},s.getSlotHeight=function(){return G},s.getSlotDuration=function(){return Q},s.getMinTime=function(){return lt},s.getMaxTime=function(){return ct},s.defaultSelectionEnd=Xt,s.renderDayOverlay=Lt,s.renderSelection=Vt,s.clearSelection=Jt,s.reportDayClick=Qt,s.dragStart=Gt,s.dragStop=Yt,At.call(s,n,r,i),Ht.call(s),Pt.call(s),yt.call(s);var o=s.opt,u=s.trigger,a=s.renderOverlay,f=s.clearOverlays,l=s.reportSelection,c=s.unselect,h=s.daySelectionMousedown,p=s.slotSegHtml,d=s.cellToDate,v=s.dateToCell,m=s.rangeToSegments,g=r.formatDate,y=r.calculateWeekNumber,b,E,S,x,C,k,L,A,M,_,D,P,B,j,I,U,z,W,X,V,$,J,K,Q,G,Y,Z,et,tt,nt,rt,it,st,ot,ut={},at,ft,lt,ct,ht;q(n.addClass("fc-agenda")),rt=new Bt(function(t,n){function l(e){return Math.max(a,Math.min(f,e))}var r,i,s;S.each(function(t,o){r=e(o),i=r.offset().left,t&&(s[1]=i),s=[i],n[t]=s}),s[1]=i+r.outerWidth(),o("allDaySlot")&&(r=B,i=r.offset().top,t[0]=[i,i+r.outerHeight()]);var u=I.offset().top,a=j.offset().top,f=a+j.outerHeight();for(var c=0;c<nt*Z;c++)t.push([l(u+et*c),l(u+et*(c+1))])}),it=new jt(rt),st=new It(function(e){return k.eq(e)}),ot=new It(function(e){return L.eq(e)})}function yt(){function W(e,t){var n,i=e.length,s=[],o=[];for(n=0;n<i;n++)e[n].allDay?s.push(e[n]):o.push(e[n]);r("allDaySlot")&&(H(s,t),a()),J(V(o),t)}function X(){f().empty(),l().empty()}function V(e){var t=g(),n=B(),r=j(),i,s,o,u,a,f=[];for(s=0;s<t;s++){i=m(0,s),a=$(e,i.clone().time(n),i.clone().time(r)),a=bt(a);for(o=0;o<a.length;o++)u=a[o],u.col=s,f.push(u)}return f}function $(e,t,n){t=t.clone().stripZone(),n=n.clone().stripZone();var r=[],i,s=e.length,o,u,a,f,l,c,h;for(i=0;i<s;i++)o=e[i],u=o.start.clone().stripZone(),a=z(o).stripZone(),a>t&&u<n&&(u<t?(f=t.clone(),c=!1):(f=u,c=!0),a>n?(l=n.clone(),h=!1):(l=a,h=!0),r.push({event:o,start:f,end:l,isStart:c,isEnd:h}));return r.sort(Lt)}function J(t,n){var s,o=t.length,u,a,f,c,p,m,g,y,b,w,E="",S,T,N,L,A,M=l(),_=r("isRTL");for(s=0;s<o;s++)u=t[s],a=u.event,f=h(u.start,u.start),c=h(u.end,u.start),p=d(u.col),m=v(u.col),g=m-p,m-=g*.025,g=m-p,y=g*(u.forwardCoord-u.backwardCoord),r("slotEventOverlap")&&(y=Math.max((y-10)*2,y)),_?(w=m-u.backwardCoord*g,b=w-y):(b=p+u.backwardCoord*g,w=b+y),b=Math.max(b,p),w=Math.min(w,m),y=w-b,u.top=f,u.left=b,u.outerWidth=y,u.outerHeight=c-f,E+=K(a,u);M[0].innerHTML=E,S=M.children();for(s=0;s<o;s++)u=t[s],a=u.event,T=e(S[s]),N=i("eventRender",a,a,T),N===!1?T.remove():(N&&N!==!0&&(T.remove(),T=e(N).css({position:"absolute",top:u.top,left:u.left}).appendTo(M)),u.element=T,a._id===n?Q(a,T,u):T[0]._fci=s,k(a,T));x(M,t,Q);for(s=0;s<o;s++){u=t[s];if(T=u.element)u.vsides=O(T,!0),u.hsides=C(T,!0),L=T.find(".fc-event-title"),L.length&&(u.contentTop=L[0].offsetTop)}for(s=0;s<o;s++){u=t[s];if(T=u.element)T[0].style.width=Math.max(0,u.outerWidth-u.hsides)+"px",A=Math.max(0,u.outerHeight-u.vsides),T[0].style.height=A+"px",a=u.event,u.contentTop!==undefined&&A-u.contentTop<10&&(T.find("div.fc-event-time").text(q(a.start,r("timeFormat"))+" - "+a.title),T.find("div.fc-event-title").remove()),i("eventAfterRender",a,a,T)}}function K(e,t){var n="<",i=e.url,u=U(e,r),a=["fc-event","fc-event-vert"];return s(e)&&a.push("fc-event-draggable"),t.isStart&&a.push("fc-event-start"),t.isEnd&&a.push("fc-event-end"),a=a.concat(e.className),e.source&&(a=a.concat(e.source.className||[])),i?n+="a href='"+F(e.url)+"'":n+="div",n+=" class='"+a.join(" ")+"'"+" style="+"'"+"position:absolute;"+"top:"+t.top+"px;"+"left:"+t.left+"px;"+u+"'"+">"+"<div class='fc-event-inner'>"+"<div class='fc-event-time'>",e.end?n+=F(R(e.start,e.end,r("timeFormat"))):n+=F(q(e.start,r("timeFormat"))),n+="</div><div class='fc-event-title'>"+F(e.title||"")+"</div>"+"</div>"+"<div class='fc-event-bg'></div>",t.isEnd&&o(e)&&(n+="<div class='ui-resizable-handle ui-resizable-s'>=</div>"),n+="</"+(i?"a":"div")+">",n}function Q(e,t,n){var r=t.find("div.fc-event-time");s(e)&&Y(e,t,r),n.isEnd&&o(e)&&Z(e,t,r),u(e,t)}function G(e,n,s){function k(){f||(n.width(u).height("").draggable("option","grid",null),f=!0)}var o=s.isStart,u,a,f=!0,l,h=c(),p=y(),d=B(),v=S(),g=E(),x=w(),C=b();n.draggable({opacity:r("dragOpacity","month"),revertDuration:r("dragRevertDuration"),start:function(t,r){i("eventDragStart",n,e,t,r),A(e,n),u=n.width(),h.start(function(t,r){P();if(t){a=!1;var i=m(0,r.col),s=m(0,t.col);l=s.diff(i,"days"),t.row?o?f&&(n.width(p-10),N(n,I.defaultTimedEventDuration/v*g),n.draggable("option","grid",[p,1]),f=!1):a=!0:(D(e.start.clone().add("days",l),z(e).add("days",l)),k()),a=a||f&&!l}else k(),a=!0;n.draggable("option","revert",a)},t,"drag")},stop:function(r,s){h.stop(),P(),i("eventDragStop",n,e,r,s);if(a)k(),n.css("filter",""),L(e,n);else{var o=e.start.clone().add("days",l),u,c;f||(c=Math.round((n.offset().top-T().offset().top)/C),u=t.duration(d+c*x),o=I.rezoneDate(o.clone().time(u))),M(this,e,o,r,s)}}})}function Y(e,t,s){function H(){P(),d&&(E?(s.hide(),t.draggable("option","grid",null),D(O,_)):(B(),s.css("display",""),t.draggable("option","grid",[a,f])))}function B(){var t;O&&(e.end?t=R(O,_,r("timeFormat")):t=q(O,r("timeFormat")),s.text(t))}var o=n.getCoordinateGrid(),u=g(),a=y(),f=b(),l=w(),c,h,d,v,E,S,x,T,N,C,k,O,_;t.draggable({scroll:!1,grid:[a,f],axis:u==1?"y":!1,opacity:r("dragOpacity"),revertDuration:r("dragRevertDuration"),start:function(n,r){i("eventDragStart",t,e,n,r),A(e,t),o.build(),c=t.position(),h=o.cell(n.pageX,n.pageY),d=v=!0,E=S=p(h),x=T=0,N=0,C=k=0,O=null,_=null},drag:function(n,r){var i=o.cell(n.pageX,n.pageY);d=!!i;if(d){E=p(i),x=Math.round((r.position.left-c.left)/a);if(x!=T){var s=m(0,h.col),g=h.col+x;g=Math.max(0,g),g=Math.min(u-1,g);var y=m(0,g);N=y.diff(s,"days")}E||(C=Math.round((r.position.top-c.top)/f))}if(d!=v||E!=S||x!=T||C!=k)E?(O=e.start.clone().stripTime().add("days",N),_=O.clone().add(I.defaultAllDayEventDuration)):(O=e.start.clone().add(C*l).add("days",N),_=z(e).add(C*l).add("days",N)),H(),v=d,S=E,T=x,k=C;t.draggable("option","revert",!d)},stop:function(n,r){P(),i("eventDragStop",t,e,n,r),d&&(E||N||C)?M(this,e,O,n,r):(d=!0,E=!1,x=0,N=0,C=0,H(),t.css("filter",""),t.css(c),L(e,t))}})}function Z(e,t,n){var s,o,u=b(),a=w(),f;t.resizable({handles:{s:".ui-resizable-handle"},grid:u,start:function(n,r){s=o=0,A(e,t),i("eventResizeStart",this,e,n,r)},resize:function(i,l){s=Math.round((Math.max(u,t.height())-l.originalSize.height)/u);if(s!=o){f=z(e).add(a*s);var c;s||e.end?c=R(e.start,f,r("timeFormat")):c=q(e.start,r("timeFormat")),n.text(c),o=s}},stop:function(n,r){i("eventResizeStop",this,e,n,r),s?_(this,e,f,n,r):L(e,t)}})}var n=this;n.renderEvents=W,n.clearEvents=X,n.slotSegHtml=K,Ot.call(n);var r=n.opt,i=n.trigger,s=n.isEventDraggable,o=n.isEventResizable,u=n.eventElementHandlers,a=n.setHeight,f=n.getDaySegmentContainer,l=n.getSlotSegmentContainer,c=n.getHoverListener,h=n.computeDateTop,p=n.getIsCellAllDay,d=n.colContentLeft,v=n.colContentRight,m=n.cellToDate,g=n.getColCnt,y=n.getColWidth,b=n.getSnapHeight,w=n.getSnapDuration,E=n.getSlotHeight,S=n.getSlotDuration,T=n.getSlotContainer,k=n.reportEventElement,L=n.showEvents,A=n.hideEvents,M=n.eventDrop,_=n.eventResize,D=n.renderDayOverlay,P=n.clearOverlays,H=n.renderDayEvents,B=n.getMinTime,j=n.getMaxTime,I=n.calendar,q=I.formatDate,R=I.formatRange,z=I.getEventEnd;n.draggableDayEvent=G}function bt(e){var t=wt(e),n=t[0],r;Et(t);if(n){for(r=0;r<n.length;r++)St(n[r]);for(r=0;r<n.length;r++)xt(n[r],0,0)}return Tt(t)}function wt(e){var t=[],n,r,i;for(n=0;n<e.length;n++){r=e[n];for(i=0;i<t.length;i++)if(!Nt(r,t[i]).length)break;(t[i]||(t[i]=[])).push(r)}return t}function Et(e){var t,n,r,i,s;for(t=0;t<e.length;t++){n=e[t];for(r=0;r<n.length;r++){i=n[r],i.forwardSegs=[];for(s=t+1;s<e.length;s++)Nt(i,e[s],i.forwardSegs)}}}function St(e){var t=e.forwardSegs,n=0,r,i;if(e.forwardPressure===undefined){for(r=0;r<t.length;r++)i=t[r],St(i),n=Math.max(n,1+i.forwardPressure);e.forwardPressure=n}}function xt(e,t,n){var r=e.forwardSegs,i;if(e.forwardCoord===undefined){r.length?(r.sort(kt),xt(r[0],t+1,n),e.forwardCoord=r[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1);for(i=0;i<r.length;i++)xt(r[i],0,e.forwardCoord)}}function Tt(e){var t=[],n,r,i;for(n=0;n<e.length;n++){r=e[n];for(i=0;i<r.length;i++)t.push(r[i])}return t}function Nt(e,t,n){n=n||[];for(var r=0;r<t.length;r++)Ct(e,t[r])&&n.push(t[r]);return n}function Ct(e,t){return e.end>t.start&&e.start<t.end}function kt(e,t){return t.forwardPressure-e.forwardPressure||(e.backwardCoord||0)-(t.backwardCoord||0)||Lt(e,t)}function Lt(e,t){return e.start-t.start||t.end-t.start-(e.end-e.start)||(e.event.title||"").localeCompare(t.event.title)}function At(n,r,i){function h(t,n){var r=f[t];return e.isPlainObject(r)&&!c(t)?j(r,n||i):r}function p(e,t){return r.trigger.apply(r,[e,t||s].concat(Array.prototype.slice.call(arguments,2),[s]))}function d(e){var t=e.source||{};return W(e.startEditable,t.startEditable,h("eventStartEditable"),e.editable,t.editable,h("editable"))}function v(e){var t=e.source||{};return W(e.durationEditable,t.durationEditable,h("eventDurationEditable"),e.editable,t.editable,h("editable"))}function m(){u={},a=[]}function g(e,t){a.push({event:e,element:t}),u[e._id]?u[e._id].push(t):u[e._id]=[t]}function y(){e.each(a,function(e,t){s.trigger("eventDestroy",t.event,t.event,t.element)})}function b(e,t){t.click(function(n){if(!t.hasClass("ui-draggable-dragging")&&!t.hasClass("ui-resizable-resizing"))return p("eventClick",this,e,n)}).hover(function(t){p("eventMouseover",this,e,t)},function(t){p("eventMouseout",this,e,t)})}function w(e,t){S(e,t,"show")}function E(e,t){S(e,t,"hide")}function S(e,t,n){var r=u[e._id],i,s=r.length;for(i=0;i<s;i++)(!t||r[i][0]!=t[0])&&r[i][n]()}function x(e,t,n,i,s){var u=r.mutateEvent(t,n,null);p("eventDrop",e,t,function(){u(),o(t._id)},i,s),o(t._id)}function T(e,t,n,i,s){var u=r.mutateEvent(t,null,n);p("eventResize",e,t,function(){u(),o(t._id)},i,s),o(t._id)}function M(e){return t.isMoment(e)&&(e=e.day()),C[e]}function _(){return k}function D(e,t,n){var r=e.clone();t=t||1;while(C[(r.day()+(n?t:0)+7)%7])r.add("days",t);return r}function P(){var e=H.apply(null,arguments),t=B(e),n=F(t);return n}function H(e,t){var n=s.getColCnt(),r=O?-1:1,i=O?n-1:0;typeof e=="object"&&(t=e.col,e=e.row);var o=e*n+(t*r+i);return o}function B(e){var t=s.start.day();return e+=L[t],Math.floor(e/k)*7+A[(e%k+k)%k]-t}function F(e){return s.start.clone().add("days",e)}function I(e){var t=q(e),n=R(t),r=U(n);return r}function q(e){return e.clone().stripTime().diff(s.start,"days")}function R(e){var t=s.start.day();return e+=t,Math.floor(e/7)*k+L[(e%7+7)%7]-L[t]}function U(e){var t=s.getColCnt(),n=O?-1:1,r=O?t-1:0,i=Math.floor(e/t),o=(e%t+t)%t*n+r;return{row:i,col:o}}function z(e,t){var n=s.getRowCnt(),r=s.getColCnt(),i=[],o=q(e),u=q(t),a=+t.time();a&&a>=l&&u++,u=Math.max(u,o+1);var f=R(o),c=R(u)-1;for(var h=0;h<n;h++){var p=h*r,d=p+r-1,v=Math.max(f,p),m=Math.min(c,d);if(v<=m){var g=U(v),y=U(m),b=[g.col,y.col].sort(),w=B(v)==o,E=B(m)+1==u;i.push({row:h,leftCol:b[0],rightCol:b[1],isStart:w,isEnd:E})}}return i}var s=this;s.element=n,s.calendar=r,s.name=i,s.opt=h,s.trigger=p,s.isEventDraggable=d,s.isEventResizable=v,s.clearEventData=m,s.reportEventElement=g,s.triggerEventDestroy=y,s.eventElementHandlers=b,s.showEvents=w,s.hideEvents=E,s.eventDrop=x,s.eventResize=T;var o=r.reportEventChange,u={},a=[],f=r.options,l=t.duration(f.nextDayThreshold);s.isHiddenDay=M,s.skipHiddenDays=D,s.getCellsPerWeek=_,s.dateToCell=I,s.dateToDayOffset=q,s.dayOffsetToCellOffset=R,s.cellOffsetToCell=U,s.cellToDate=P,s.cellToCellOffset=H,s.cellOffsetToDayOffset=B,s.dayOffsetToDate=F,s.rangeToSegments=z;var N=h("hiddenDays")||[],C=[],k,L=[],A=[],O=h("isRTL");(function(){h("weekends")===!1&&N.push(0,6);for(var t=0,n=0;t<7;t++)L[t]=n,C[t]=e.inArray(t,N)!=-1,C[t]||(A[n]=t,n++);k=n;if(!k)throw"invalid hiddenDays"})()}function Ot(){function H(e,t){var n=I(e,!1,!0);_t(n,function(e,t){o(e.event,t)}),et(n,t),_t(n,function(e,t){r("eventAfterRender",e.event,e.event,t)})}function j(e,t,n){var r=I([e],!0,!1),i=[];return _t(r,function(e,r){e.row===t&&r.css("top",n),i.push(r[0])}),i}function I(t,n,r){var i=b(),s=n?e("<div/>"):i,o=R(t),u,a;return W(o),u=X(o),s[0].innerHTML=u,a=s.children(),n&&i.append(a),$(o,a),_t(o,function(e,t){e.hsides=C(t,!0)}),_t(o,function(e,t){t.width(Math.max(0,e.outerWidth-e.hsides))}),_t(o,function(e,t){e.outerHeight=t.outerHeight(!0)}),J(o,r),o}function R(e){var t=[];for(var n=0;n<e.length;n++){var r=z(e[n]);t.push.apply(t,r)}return t}function z(e){var t=N(e.start,D(e));for(var n=0;n<t.length;n++)t[n].event=e;return t}function W(e){var t=n("isRTL");for(var r=0;r<e.length;r++){var i=e[r],s=(t?i.isEnd:i.isStart)?g:v,o=(t?i.isStart:i.isEnd)?y:m,u=s(i.leftCol),a=o(i.rightCol);i.left=u,i.outerWidth=a-u}}function X(e){var t="";for(var n=0;n<e.length;n++)t+=V(e[n]);return t}function V(e){var t="",r=n("isRTL"),o=e.event,u=o.url,a=["fc-event","fc-event-hori"];i(o)&&a.push("fc-event-draggable"),e.isStart&&a.push("fc-event-start"),e.isEnd&&a.push("fc-event-end"),a=a.concat(o.className),o.source&&(a=a.concat(o.source.className||[]));var f=U(o,n);return u?t+="<a href='"+F(u)+"'":t+="<div",t+=" class='"+a.join(" ")+"'"+" style="+"'"+"position:absolute;"+"left:"+e.left+"px;"+f+"'"+">"+"<div class='fc-event-inner'>",!o.allDay&&e.isStart&&(t+="<span class='fc-event-time'>"+F(P(o.start,n("timeFormat")))+"</span>"),t+="<span class='fc-event-title'>"+F(o.title||"")+"</span>"+"</div>",o.allDay&&e.isEnd&&s(o)&&(t+="<div class='ui-resizable-handle ui-resizable-"+(r?"w":"e")+"'>"+"&nbsp;&nbsp;&nbsp;"+"</div>"),t+="</"+(u?"a":"div")+">",t}function $(t,n){for(var i=0;i<t.length;i++){var s=t[i],o=s.event,u=n.eq(i),a=r("eventRender",o,o,u);a===!1?u.remove():(a&&a!==!0&&(a=e(a).css({position:"absolute",left:s.left}),u.replaceWith(a),u=a),s.element=u)}}function J(e,t){var n=K(e),r=Z(),i=[],s;if(t)for(s=0;s<r.length;s++)r[s].height(n[s]);for(s=0;s<r.length;s++)i.push(r[s].position().top);_t(e,function(e,t){t.css("top",i[e.row]+e.top)})}function K(e){var t=h(),n=p(),r=[],i=Q(e),s;for(var o=0;o<t;o++){var u=i[o],a=[];for(s=0;s<n;s++)a.push(0);for(var f=0;f<u.length;f++){var l=u[f];l.top=B(a.slice(l.leftCol,l.rightCol+1));for(s=l.leftCol;s<=l.rightCol;s++)a[s]=l.top+l.outerHeight}r.push(B(a))}return r}function Q(e){var t=h(),n=[],r,i,s;for(r=0;r<e.length;r++)i=e[r],s=i.row,i.element&&(n[s]?n[s].push(i):n[s]=[i]);for(s=0;s<t;s++)n[s]=G(n[s]||[]);return n}function G(e){var t=[],n=Y(e);for(var r=0;r<n.length;r++)t.push.apply(t,n[r]);return t}function Y(e){e.sort(Dt);var t=[];for(var n=0;n<e.length;n++){var r=e[n];for(var i=0;i<t.length;i++)if(!Mt(r,t[i]))break;t[i]?t[i].push(r):t[i]=[r]}return t}function Z(){var e,t=h(),n=[];for(e=0;e<t;e++)n[e]=d(e).find("div.fc-day-content > div");return n}function et(e,t){var n=b();_t(e,function(e,n,r){var i=e.event;i._id===t?tt(i,n,e):n[0]._fci=r}),x(n,e,tt)}function tt(e,n,r){i(e)&&t.draggableDayEvent(e,n,r),e.allDay&&r.isEnd&&s(e)&&t.resizableDayEvent(e,n,r),u(e,n)}function nt(e,t){var i=T(),s,o;t.draggable({delay:50,opacity:n("dragOpacity"),revertDuration:n("dragRevertDuration"),start:function(n,u){r("eventDragStart",t,e,n,u),f(e,t),i.start(function(n,r,i,u){t.draggable("option","revert",!n||!i&&!u),E();if(n){var a=k(r),f=k(n);s=f.diff(a,"days"),o=e.start.clone().add("days",s),w(o,D(e).add("days",s))}else s=0},n,"drag")},stop:function(n,u){i.stop(),E(),r("eventDragStop",t,e,n,u),s?l(this,e,o,n,u):(t.css("filter",""),a(e,t))}})}function rt(t,i,s){var o=n("isRTL"),u=o?"w":"e",l=i.find(".ui-resizable-"+u),h=!1;q(i),i.mousedown(function(e){e.preventDefault()}).click(function(e){h&&(e.preventDefault(),e.stopImmediatePropagation())}),l.mousedown(function(n){function y(n){r("eventResizeStop",this,t,n),e("body").css("cursor",""),o.stop(),E(),p&&c(this,t,d,n),setTimeout(function(){h=!1},0)}if(n.which!=1)return;h=!0;var o=T(),l=i.css("top"),p,d,v,m=e.extend({},t),g=M(O(t.start));S(),e("body").css("cursor",u+"-resize").one("mouseup",y),r("eventResizeStart",this,t,n),o.start(function(n,r){if(n){var i=L(r),o=L(n);o=Math.max(o,g),p=A(o)-A(i),d=D(t).add("days",p);if(p){m.end=d;var c=v;v=j(m,s.row,l),v=e(v),v.find("*").css("cursor",u+"-resize"),c&&c.remove(),f(t)}else v&&(a(t),v.remove(),v=null);E(),w(t.start,d)}},n)})}var t=this;t.renderDayEvents=H,t.draggableDayEvent=nt,t.resizableDayEvent=rt;var n=t.opt,r=t.trigger,i=t.isEventDraggable,s=t.isEventResizable,o=t.reportEventElement,u=t.eventElementHandlers,a=t.showEvents,f=t.hideEvents,l=t.eventDrop,c=t.eventResize,h=t.getRowCnt,p=t.getColCnt,d=t.allDayRow,v=t.colLeft,m=t.colRight,g=t.colContentLeft,y=t.colContentRight,b=t.getDaySegmentContainer,w=t.renderDayOverlay,E=t.clearOverlays,S=t.clearSelection,T=t.getHoverListener,N=t.rangeToSegments,k=t.cellToDate,L=t.cellToCellOffset,A=t.cellOffsetToDayOffset,O=t.dateToDayOffset,M=t.dayOffsetToCellOffset,_=t.calendar,D=_.getEventEnd,P=_.formatDate}function Mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r.leftCol<=e.rightCol&&r.rightCol>=e.leftCol)return!0}return!1}function _t(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=r.element;i&&t(r,i,n)}}function Dt(e,t){return t.rightCol-t.leftCol-(e.rightCol-e.leftCol)||t.event.allDay-e.event.allDay||e.event.start-t.event.start||(e.event.title||"").localeCompare(t.event.title)}function Pt(){function f(e,t){l(),e=n.moment(e),t?t=n.moment(t):t=s(e),o(e,t),c(e,t)}function l(e){a&&(a=!1,u(),i("unselect",null,e))}function c(e,t,n){a=!0,i("select",null,e,t,n)}function h(n){var i=t.cellToDate,s=t.getIsCellAllDay,a=t.getHoverListener(),f=t.reportDayClick;if(n.which==1&&r("selectable")){l(n);var h;a.start(function(e,t){u(),e&&s(e)?(h=[i(t),i(e)].sort(H),o(h[0],h[1].clone().add("days",1))):h=null},n),e(document).one("mouseup",function(e){a.stop(),h&&(+h[0]==+h[1]&&f(h[0],e),c(h[0],h[1].clone().add("days",1),e))})}}var t=this;t.select=f,t.unselect=l,t.reportSelection=c,t.daySelectionMousedown=h;var n=t.calendar,r=t.opt,i=t.trigger,s=t.defaultSelectionEnd,o=t.renderSelection,u=t.clearSelection,a=!1;r("selectable")&&r("unselectAuto")&&e(document).mousedown(function(t){var n=r("unselectCancel");if(n&&e(t.target).parents(n).length)return;l(t)})}function Ht(){function i(t,i){var s=r.shift();return s||(s=e("<div class='fc-cell-overlay' style='position:absolute;z-index:3'/>")),s[0].parentNode!=i[0]&&s.appendTo(i),n.push(s.css(t).show()),s}function s(){var e;while(e=n.shift())r.push(e.hide().unbind())}var t=this;t.renderOverlay=i,t.clearOverlays=s;var n=[],r=[]}function Bt(e){var t=this,n,r;t.build=function(){n=[],r=[],e(n,r)},t.cell=function(e,t){var i=n.length,s=r.length,o,u=-1,a=-1;for(o=0;o<i;o++)if(t>=n[o][0]&&t<n[o][1]){u=o;break}for(o=0;o<s;o++)if(e>=r[o][0]&&e<r[o][1]){a=o;break}return u>=0&&a>=0?{row:u,col:a}:null},t.rect=function(e,t,i,s,o){var u=o.offset();return{top:n[e][0]-u.top,left:r[t][0]-u.left,width:r[s][1]-r[t][0],height:n[i][1]-n[e][0]}}}function jt(t){function u(e){Ft(e);var n=t.cell(e.pageX,e.pageY);if(Boolean(n)!==Boolean(o)||n&&(n.row!=o.row||n.col!=o.col))n?(s||(s=n),i(n,s,n.row-s.row,n.col-s.col)):i(n,s),o=n}var n=this,r,i,s,o;n.start=function(n,a,f){i=n,s=o=null,t.build(),u(a),r=f||"mousemove",e(document).bind(r,u)},n.stop=function(){return e(document).unbind(r,u),o}}function Ft(e){e.pageX===undefined&&(e.pageX=e.originalEvent.pageX,e.pageY=e.originalEvent.pageY)}function It(e){function s(t){return n[t]=n[t]||e(t)}var t=this,n={},r={},i={};t.left=function(e){return r[e]=r[e]===undefined?s(e).position().left:r[e]},t.right=function(e){return i[e]=i[e]===undefined?t.left(e)+s(e).width():i[e]},t.clear=function(){n={},r={},i={}}}var n={lang:"en",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,titleFormat:{month:"MMMM YYYY",week:"ll",day:"LL"},columnFormat:{month:"ddd",week:i,day:"dddd"},timeFormat:{"default":r},isRTL:!1,defaultButtonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",today:"today",month:"month",week:"week",day:"day"},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},theme:!1,themeButtonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e",prevYear:"seek-prev",nextYear:"seek-next"},unselectAuto:!0,dropAccept:"*",handleWindowResize:!0},s={en:{columnFormat:{week:"ddd M/D"}}},o={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",nextYear:"seek-prev",prevYear:"seek-next"}},u=e.fullCalendar={version:"2.0.0"},a=u.views={};e.fn.fullCalendar=function(t){var n=Array.prototype.slice.call(arguments,1),r=this;return this.each(function(i,s){var o=e(s),u=o.data("fullCalendar"),a;typeof t=="string"?u&&e.isFunction(u[t])&&(a=u[t].apply(u,n),i||(r=a),t==="destroy"&&o.removeData("fullCalendar")):u||(u=new h(o,t),o.data("fullCalendar",u),u.render())}),r},u.langs=s,u.datepickerLang=function(t,n,r){var i=s[t];i||(i=s[t]={}),l(i,{isRTL:r.isRTL,weekNumberTitle:r.weekHeader,titleFormat:{month:r.showMonthAfterYear?"YYYY["+r.yearSuffix+"] MMMM":"MMMM YYYY["+r.yearSuffix+"]"},defaultButtonText:{prev:I(r.prevText),next:I(r.nextText),today:I(r.currentText)}}),e.datepicker&&(e.datepicker.regional[n]=e.datepicker.regional[t]=r,e.datepicker.regional.en=e.datepicker.regional[""],e.datepicker.setDefaults(r))},u.lang=function(e,t){var r;t&&(r=s[e],r||(r=s[e]={}),l(r,t||{})),n.lang=e},u.sourceNormalizers=[],u.sourceFetchers=[];var d={dataType:"json",cache:!1},v=1;u.applyAll=z;var w=["sun","mon","tue","wed","thu","fri","sat"],X=/^\s*\d{4}-\d\d$/,V=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/;u.moment=function(){return $(arguments)},u.moment.utc=function(){var e=$(arguments,!0);return e.hasTime()&&e.utc(),e},u.moment.parseZone=function(){return $(arguments,!0,!0)},J.prototype=y(t.fn),J.prototype.clone=function(){return $([this])},J.prototype.time=function(e){return e==null?t.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}):(delete this._ambigTime,!t.isDuration(e)&&!t.isMoment(e)&&(e=t.duration(e)),this.hours(e.hours()+e.days()*24).minutes(e.minutes()).seconds(e.seconds()).milliseconds(e.milliseconds()))},J.prototype.stripTime=function(){var e=this.toArray();return t.fn.utc.call(this),this._ambigTime=!0,this._ambigZone=!0,this.year(e[0]).month(e[1]).date(e[2]).hours(0).minutes(0).seconds(0).milliseconds(0),this},J.prototype.hasTime=function(){return!this._ambigTime},J.prototype.stripZone=function(){var e=this.toArray(),n=this._ambigTime;return t.fn.utc.call(this),this.year(e[0]).month(e[1]).date(e[2]).hours(e[3]).minutes(e[4]).seconds(e[5]).milliseconds(e[6]),n&&(this._ambigTime=!0),this._ambigZone=!0,this},J.prototype.hasZone=function(){return!this._ambigZone},J.prototype.zone=function(e){return e!=null&&(delete this._ambigTime,delete this._ambigZone),t.fn.zone.apply(this,arguments)},J.prototype.local=function(){var e=this.toArray(),n=this._ambigZone;return delete this._ambigTime,delete this._ambigZone,t.fn.local.apply(this,arguments),n&&this.year(e[0]).month(e[1]).date(e[2]).hours(e[3]).minutes(e[4]).seconds(e[5]).milliseconds(e[6]),this},J.prototype.utc=function(){return delete this._ambigTime,delete this._ambigZone,t.fn.utc.apply(this,arguments)},J.prototype.format=function(){return arguments[0]?G(this,arguments[0]):this._ambigTime?Q(this,"YYYY-MM-DD"):this._ambigZone?Q(this,"YYYY-MM-DD[T]HH:mm:ss"):Q(this)},J.prototype.toISOString=function(){return this._ambigTime?Q(this,"YYYY-MM-DD"):this._ambigZone?Q(this,"YYYY-MM-DD[T]HH:mm:ss"):t.fn.toISOString.apply(this,arguments)},J.prototype.isWithin=function(e,t){var n=K([this,e,t]);return n[0]>=n[1]&&n[0]<n[2]},e.each(["isBefore","isAfter","isSame"],function(e,n){J.prototype[n]=function(e,r){var i=K([this,e]);return t.fn[n].call(i[0],i[1],r)}});var Z={t:function(e){return Q(e,"a").charAt(0)},T:function(e){return Q(e,"A").charAt(0)}};u.formatRange=tt;var rt={Y:"year",M:"month",D:"day",d:"day",A:"second",a:"second",T:"second",t:"second",H:"second",h:"second",m:"second",s:"second"},st={};a.month=at,a.basicWeek=ft,a.basicDay=lt,f({weekMode:"fixed"}),a.agendaWeek=pt,a.agendaDay=dt,f({allDaySlot:!0,allDayText:"all-day",scrollTime:"06:00:00",slotDuration:"00:30:00",axisFormat:vt,timeFormat:{agenda:mt},dragOpacity:{agenda:.5},minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0})}),define("app/setup",["require","jquery","jock/jock","jock/view/view-manager","./views/home/Home","./views/customer/CustomerSearch","./views/customer/CustomerEdit","./views/product/ProductSearch","./views/product/ProductEdit","./views/calendar/CalendarEdit","./plugins/jquery.placeholder","./plugins/radios-to-slider","bootstrap","./util/validation-setup","./plugins/fullcalendar"],function(e){function p(){t("#navbar [data-menu]").each(function(e,n){c.push(t(n).attr("data-menu"))}),t(n).on("global.before.attach",function(e,r){if(!r.isMainView)return;var i=n.getRoutesByPath(),s=i[r.newView.id];if(s==null)return;var o=t("#menu-"+s).parent();if(o.length===0)for(var u=0;u<c.length;u++){var a=c[u];s.indexOf(a)===0&&(o=t("#navbar [data-menu="+a+"]").parent())}t("#navbar li.active").removeClass("active"),m(o)}),t(n).on("ajax.success",function(){console.log("ajax.success",arguments)}),t(n).on("ajax.error",function(){console.log("ajax.error",arguments)}),t(n).on("ajax.complete",function(){console.log("ajax.complete",arguments)}),t(n).on("ajax.start",function(e,n){var r="Loading...";n=n||{},n.msg!=null&&(r=n.msg),t(document.body).append('<div id="loading" class="loader">'+r+"</div>"),t("#loading").stop(!0,!0).animate({top:0})}),t(n).on("ajax.stop",function(e,n){t("#loading").stop(!0,!0).animate({top:-45},function(){t("#loading").remove()})}),t(n).on("global.visible",function(e,t){}),t(n).on("global.attached",function(e,n){(!t.fn.placeholder.input||!t.fn.placeholder.textarea)&&t("input, textarea").placeholder()})}function d(e){if(e==null)return;var r=n.getRoutesByPath(),i=r[e.id];t("#navbar li.active").removeClass("active");if(i==null)return;var s=t("#menu-"+i).parent(),o=g(s);s.addClass("active"),t("#nav-ind").css(o)}function v(e){var n=t("#menu-"+e).parent();n.addClass("active");var r=g(n);t("#nav-ind").css(r)}function m(e){e.addClass("active");var n=g(e);t("#nav-ind").animate(n,"fast","linear")}function g(e){var n=57,r=t(e),i=0;if(r.length)var i=r.offset().left-t("#navbar").offset().left;var s={top:n,left:i,right:t("#navbar").width()-t(e).width()-i,bottom:t("#navbar").height()-t(e).height()-n};return s}var t=e("jquery");e("jock/jock");var n=e("jock/view/view-manager"),r=e("./views/home/Home"),i=e("./views/customer/CustomerSearch"),s=e("./views/customer/CustomerEdit"),o=e("./views/product/ProductSearch"),u=e("./views/product/ProductEdit"),a=e("./views/calendar/CalendarEdit");e("./plugins/jquery.placeholder"),e("./plugins/radios-to-slider"),e("bootstrap");var f=e("./util/validation-setup");e("./plugins/fullcalendar");var l={};l.routes={home:r.id,customers:i.id,customerEdit:s.id,products:o.id,productEdit:u.id,calendarEdit:a.id};var c=[];p(),f.setupValidation(),l.defaultView=r,l.globalOnAttached=function(e){},n.init(l);var h=n.getCurrentRoute();v(h)}),define("hb!app/views/footer/footer.htm",["handlebars"],function(e){return e.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'<div class="footer" id="footer">\r\n\r\n    <div id="footer-hint" class="footer-hint">\r\n        <i class="icon-circle-arrow-up icon-2x"></i>\r\n        More\r\n    </div>\r\n\r\n    <div class="footer-content" id="footer-content">\r\n        Yes, this site is powered by Jock!\r\n    </div>\r\n</div>\r\n'},useData:!0})}),define("app/main",["require","jquery","app/setup","./views/home/Home","./views/customer/CustomerSearch","./views/product/ProductSearch","./views/calendar/CalendarEdit","hb!./views/footer/footer.htm","jock/view/view-manager"],function(e){var t=e("jquery");e("app/setup");var n=e("./views/home/Home"),r=e("./views/customer/CustomerSearch"),i=e("./views/product/ProductSearch"),s=e("./views/calendar/CalendarEdit"),o=e("hb!./views/footer/footer.htm"),u=e("jock/view/view-manager");t("#menu-home").click(function(e){e.preventDefault(),u.showView({view:n})}),t("#menu-customers").click(function(e){e.preventDefault(),u.showView({view:r,animate:!0})}),t("#menu-products").click(function(e){e.preventDefault(),u.showView({view:i})}),t("#menu-calendar").click(function(e){e.preventDefault(),u.showView({view:s})}),u.showHTML({animate:!1,html:o,target:"#footer-holder"}).then(function(){function u(n){var u=this;setTimeout(function(){if(o){o=!1;return}t("#footer-hint").addClass("active");var n=t("#toc");e.stop(),n.stop(),u=r-i;if(f())var u=r;e.animate({height:r},s),n.animate({bottom:u},s)},0)}function a(n){var r=this;setTimeout(function(){if(t("#footer-content:hover").length>0){o=!0;return}t("#footer-hint:hover").length===0&&t("#footer-hint").removeClass("active");var n=t("#toc");e.stop(),n.stop();var r=0;f()&&(r=i),e.animate({height:i},s),n.animate({bottom:r},s)},0)}function f(){var e=t("#toc");if(!e.length)return;var n=t("#footer-hint");if(!n.length)return;var r=n.offset().left,i=n.outerWidth(),s=r+i,o=e.position().left;return s>o?!0:!1}function l(){e.css({visibility:"none",display:"block",position:"absolute"}),r=e.height(),i=n.height(),e.css({visibility:"visible",height:i,position:"static"})}var e=t("#footer"),n=t("#footer-hint"),r,i;l();var s="fast",o=!1;t("#footer-hint, #footer-content").on("mouseenter",u),t("#footer-hint, #footer-content").on("mouseleave",a)})}),requirejs.config({baseUrl:"js/lib",paths:{app:"../app",hb:"jock/hb",moment:"moment",numeral:"numeral",bootstrap:"../app/plugins/bootstrap",select2:"../app/plugins/select2"},shim:{bootstrap:{deps:["jquery"]},select2:{deps:["jquery"],exports:"Select2"}}}),requirejs.onResourceLoad=function(e,t,n){var r=e.defined[t.name];r&&(r.prototype?r.prototype.id||(r.prototype.id=t.id,r.id=t.id):r.id||(r.id=t.id))},requirejs(["app/main"]),define("config",function(){}),function(e,t){typeof define=="function"&&define.amd?define("handlebars",[],t):typeof exports=="object"?module.exports=t():e.Handlebars=e.Handlebars||t()}(this,function(){var e=function(){function t(e){this.string=e}var e;return t.prototype.toString=function(){return""+this.string},e=t,e}(),t=function(e){function o(e){return r[e]}function u(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}function c(e){return e instanceof n?e.toString():e==null?"":e?(e=""+e,s.test(e)?e.replace(i,o):e):e+""}function h(e){return!e&&e!==0?!0:l(e)&&e.length===0?!0:!1}function p(e,t){return(e?e+".":"")+t}var t={},n=e,r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},i=/[&<>"'`]/g,s=/[&<>"'`]/;t.extend=u;var a=Object.prototype.toString;t.toString=a;var f=function(e){return typeof e=="function"};f(/x/)&&(f=function(e){return typeof e=="function"&&a.call(e)==="[object Function]"});var f;t.isFunction=f;var l=Array.isArray||function(e){return e&&typeof e=="object"?a.call(e)==="[object Array]":!1};return t.isArray=l,t.escapeExpression=c,t.isEmpty=h,t.appendContextPath=p,t}(e),n=function(){function n(e,n){var r;n&&n.firstLine&&(r=n.firstLine,e+=" - "+r+":"+n.firstColumn);var i=Error.prototype.constructor.call(this,e);for(var s=0;s<t.length;s++)this[t[s]]=i[t[s]];r&&(this.lineNumber=r,this.column=n.firstColumn)}var e,t=["description","fileName","lineNumber","message","name","number","stack"];return n.prototype=new Error,e=n,e}(),r=function(e,t){function h(e,t){this.helpers=e||{},this.partials=t||{},p(this)}function p(e){e.registerHelper("helperMissing",function(){if(arguments.length===1)return undefined;throw new i("Missing helper: '"+arguments[arguments.length-1].name+"'")}),e.registerHelper("blockHelperMissing",function(t,n){var i=n.inverse,s=n.fn;if(t===!0)return s(this);if(t===!1||t==null)return i(this);if(a(t))return t.length>0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):i(this);if(n.data&&n.ids){var o=m(n.data);o.contextPath=r.appendContextPath(n.data.contextPath,n.name),n={data:o}}return s(t,n)}),e.registerHelper("each",function(e,t){if(!t)throw new i("Must pass iterator to #each");var n=t.fn,s=t.inverse,o=0,u="",l,c;t.data&&t.ids&&(c=r.appendContextPath(t.data.contextPath,t.ids[0])+"."),f(e)&&(e=e.call(this)),t.data&&(l=m(t.data));if(e&&typeof e=="object")if(a(e))for(var h=e.length;o<h;o++)l&&(l.index=o,l.first=o===0,l.last=o===e.length-1,c&&(l.contextPath=c+o)),u+=n(e[o],{data:l});else for(var p in e)e.hasOwnProperty(p)&&(l&&(l.key=p,l.index=o,l.first=o===0,c&&(l.contextPath=c+p)),u+=n(e[p],{data:l}),o++);return o===0&&(u=s(this)),u}),e.registerHelper("if",function(e,t){return f(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||r.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers["if"].call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}),e.registerHelper("with",function(e,t){f(e)&&(e=e.call(this));var n=t.fn;if(!r.isEmpty(e)){if(t.data&&t.ids){var i=m(t.data);i.contextPath=r.appendContextPath(t.data.contextPath,t.ids[0]),t={data:i}}return n(e,t)}return t.inverse(this)}),e.registerHelper("log",function(t,n){var r=n.data&&n.data.level!=null?parseInt(n.data.level,10):1;e.log(r,t)}),e.registerHelper("lookup",function(e,t){return e&&e[t]})}var n={},r=e,i=t,s="2.0.0";n.VERSION=s;var o=6;n.COMPILER_REVISION=o;var u={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};n.REVISION_CHANGES=u;var a=r.isArray,f=r.isFunction,l=r.toString,c="[object Object]";n.HandlebarsEnvironment=h,h.prototype={constructor:h,logger:d,log:v,registerHelper:function(e,t){if(l.call(e)===c){if(t)throw new i("Arg not supported with multiple helpers");r.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){l.call(e)===c?r.extend(this.partials,e):this.partials[e]=t},unregisterPartial:function(e){delete this.partials[e]}};var d={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){if(d.level<=e){var n=d.methodMap[e];typeof console!="undefined"&&console[n]&&console[n].call(console,t)}}};n.logger=d;var v=d.log;n.log=v;var m=function(e){var t=r.extend({},e);return t._parent=e,t};return n.createFrame=m,n}(t,n),i=function(e,t,n){function f(e){var t=e&&e[0]||1,n=o;if(t!==n){if(t<n){var r=u[n],i=u[t];throw new s("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+i+").")}throw new s("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function l(e,t){if(!t)throw new s("No environment passed to template");if(!e||!e.main)throw new s("Unknown template object: "+typeof e);t.VM.checkRevision(e.compiler);var n=function(n,r,o,u,a,f,l,c,h){a&&(u=i.extend({},u,a));var p=t.VM.invokePartial.call(this,n,o,u,f,l,c,h);if(p==null&&t.compile){var d={helpers:f,partials:l,data:c,depths:h};l[o]=t.compile(n,{data:c!==undefined,compat:e.compat},t),p=l[o](u,d)}if(p!=null){if(r){var v=p.split("\n");for(var m=0,g=v.length;m<g;m++){if(!v[m]&&m+1===g)break;v[m]=r+v[m]}p=v.join("\n")}return p}throw new s("The partial "+o+" could not be compiled when running in runtime-only mode")},r={lookup:function(e,t){var n=e.length;for(var r=0;r<n;r++)if(e[r]&&e[r][t]!=null)return e[r][t]},lambda:function(e,t){return typeof e=="function"?e.call(t):e},escapeExpression:i.escapeExpression,invokePartial:n,fn:function(t){return e[t]},programs:[],program:function(e,t,n){var r=this.programs[e],i=this.fn(e);return t||n?r=c(this,e,i,t,n):r||(r=this.programs[e]=c(this,e,i)),r},data:function(e,t){while(e&&t--)e=e._parent;return e},merge:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=i.extend({},t,e)),n},noop:t.VM.noop,compilerInfo:e.compiler},o=function(t,n){n=n||{};var i=n.data;o._setup(n),!n.partial&&e.useData&&(i=d(t,i));var s;return e.useDepths&&(s=n.depths?[t].concat(n.depths):[t]),e.main.call(r,t,r.helpers,r.partials,i,s)};return o.isTop=!0,o._setup=function(n){n.partial?(r.helpers=n.helpers,r.partials=n.partials):(r.helpers=r.merge(n.helpers,t.helpers),e.usePartial&&(r.partials=r.merge(n.partials,t.partials)))},o._child=function(t,n,i){if(e.useDepths&&!i)throw new s("must pass parent depths");return c(r,t,e[t],n,i)},o}function c(e,t,n,r,i){var s=function(t,s){return s=s||{},n.call(e,t,e.helpers,e.partials,s.data||r,i&&[t].concat(i))};return s.program=t,s.depth=i?i.length:0,s}function h(e,t,n,r,i,o,u){var a={partial:!0,helpers:r,partials:i,data:o,depths:u};if(e===undefined)throw new s("The partial "+t+" could not be found");if(e instanceof Function)return e(n,a)}function p(){return""}function d(e,t){if(!t||!("root"in t))t=t?a(t):{},t.root=e;return t}var r={},i=e,s=t,o=n.COMPILER_REVISION,u=n.REVISION_CHANGES,a=n.createFrame;return r.checkRevision=f,r.template=l,r.program=c,r.invokePartial=h,r.noop=p,r}(t,n,r),s=function(e,t,n,r,i){var s,o=e,u=t,a=n,f=r,l=i,c=function(){var e=new o.HandlebarsEnvironment;return f.extend(e,o),e.SafeString=u,e.Exception=a,e.Utils=f,e.escapeExpression=f.escapeExpression,e.VM=l,e.template=function(t){return l.template(t,e)},e},h=c();return h.create=c,h["default"]=h,s=h,s}(r,e,n,t,i);return s});