made with requirebin
Created
April 25, 2014 15:00
-
-
Save roberttod/11292543 to your computer and use it in GitHub Desktop.
requirebin sketch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $ = require("jquery"); | |
var Router = require("cherrytree"); | |
var Route = require("cherrytree/route"); | |
var HistoryLocation = require("cherrytree/location/history_location"); | |
// for router to keep the app's state in sync with the url | |
// we need to use a custom location, the default `none` location | |
// doesn't touch the URL. This allows you implementing your own | |
// URL manager say if you want to save some space, or you already | |
// use a framework that can manage URLs like Backbone. | |
// The default HistoryLocation is a powerful url manager based on | |
// backbone's router - it supports pushState, hashState and | |
// can automatically fallback to hashState for browsers that don't | |
// support pushState | |
var Post = function () {}; | |
Post.prototype.fetch = function () {}; | |
Post.prototype.get = function () { return "Hello cherrytree"; }; | |
// create the router | |
var router = new Router({ | |
location: new HistoryLocation({ | |
pushState: false | |
}) | |
}); | |
// your route map | |
router.map(function () { | |
this.resource("post", {path: "/post/:postId"}, function () { | |
this.route("show", {path: "/"}); | |
this.route("edit") | |
}); | |
}); | |
// your routes | |
// application route is always the root route | |
router.addRoute("application", Route.extend({ | |
activate: function () { | |
this.view = $("<div><h1>My Blog</h1><div class='outlet'></div></div>"); | |
$(document.body).html(this.view); | |
} | |
})); | |
// let's load in the model | |
router.addRoute("post", Route.extend({ | |
model: function (params) { | |
this.post = new Post({ | |
id: params.postId | |
}); | |
return this.post.fetch(); | |
}, | |
activate: function () { | |
this.outlet = this.parent.view.find(".outlet"); | |
} | |
})); | |
// and display it | |
router.addRoute("post.show", Route.extend({ | |
activate: function () { | |
this.view = $("<p>" + this.get("post").get("content") + "</p>"); | |
this.parent.outlet.html(this.view); | |
}, | |
deactivate: function () { | |
this.view.remove(); | |
} | |
})); | |
// let's do this! | |
router.startRouting(); | |
// programatically navigate to the `posts.show` page. | |
router.transitionTo('post.show', 42); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);throw Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;r.length>a;a++)i(r[a]);return i}({H1ZcUq:[function(e,t){(function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(e){if(!e.document)throw Error("jQuery requires a window with a document");return n(e)}:n(e)})("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=et.type(e);return"function"===n||et.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(et.isFunction(t))return et.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return et.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return et.filter(t,e,n);t=et.filter(t,e)}return et.grep(e,function(e){return X.call(t,e)>=0!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=dt[e]={};return et.each(e.match(pt)||[],function(e,n){t[n]=!0}),t}function a(){J.removeEventListener("DOMContentLoaded",a,!1),e.removeEventListener("load",a,!1),et.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=et.expando+Math.random()}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(bt,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:xt.test(n)?et.parseJSON(n):n}catch(i){}yt.set(e,t,n)}else n=void 0;return n}function c(){return!0}function l(){return!1}function f(){try{return J.activeElement}catch(e){}}function h(e,t){return et.nodeName(e,"table")&&et.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function d(e){var t=_t.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function v(e,t){for(var n=0,r=e.length;r>n;n++)mt.set(e[n],"globalEval",!t||mt.get(t[n],"globalEval"))}function g(e,t){var n,r,i,o,a,s,u,c;if(1===t.nodeType){if(mt.hasData(e)&&(o=mt.access(e),a=mt.set(t,o),c=o.events)){delete a.handle,a.events={};for(i in c)for(n=0,r=c[i].length;r>n;n++)et.event.add(t,i,c[i][n])}yt.hasData(e)&&(s=yt.access(e),u=et.extend({},s),yt.set(t,u))}}function m(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&et.nodeName(e,t)?et.merge([e],n):n}function y(e,t){var n=t.nodeName.toLowerCase();"input"===n&&kt.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function x(t,n){var r=et(n.createElement(t)).appendTo(n.body),i=e.getDefaultComputedStyle?e.getDefaultComputedStyle(r[0]).display:et.css(r[0],"display");return r.detach(),i}function b(e){var t=J,n=Ft[e];return n||(n=x(e,t),"none"!==n&&n||(Mt=(Mt||et("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Mt[0].contentDocument,t.write(),t.close(),n=x(e,t),Mt.detach()),Ft[e]=n),n}function w(e,t,n){var r,i,o,a,s=e.style;return n=n||$t(e),n&&(a=n.getPropertyValue(t)||n[t]),n&&(""!==a||et.contains(e.ownerDocument,e)||(a=et.style(e,t)),Bt.test(a)&&Ut.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function T(e,t){return{get:function(){return e()?(delete this.get,void 0):(this.get=t).apply(this,arguments)}}}function C(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),r=t,i=Vt.length;i--;)if(t=Vt[i]+n,t in e)return t;return r}function k(e,t,n){var r=zt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function E(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=et.css(e,n+Tt[o],!0,i)),r?("content"===n&&(a-=et.css(e,"padding"+Tt[o],!0,i)),"margin"!==n&&(a-=et.css(e,"border"+Tt[o]+"Width",!0,i))):(a+=et.css(e,"padding"+Tt[o],!0,i),"padding"!==n&&(a+=et.css(e,"border"+Tt[o]+"Width",!0,i)));return a}function S(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=$t(e),a="border-box"===et.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=w(e,t,o),(0>i||null==i)&&(i=e.style[t]),Bt.test(i))return i;r=a&&(G.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+E(e,t,n||(a?"border":"content"),r,o)+"px"}function A(e,t){for(var n,r,i,o=[],a=0,s=e.length;s>a;a++)r=e[a],r.style&&(o[a]=mt.get(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&Ct(r)&&(o[a]=mt.access(r,"olddisplay",b(r.nodeName)))):o[a]||(i=Ct(r),(n&&"none"!==n||!i)&&mt.set(r,"olddisplay",i?n:et.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function j(e,t,n,r,i){return new j.prototype.init(e,t,n,r,i)}function N(){return setTimeout(function(){Kt=void 0}),Kt=et.now()}function L(e,t){var n,r=0,i={height:e};for(t=t?1:0;4>r;r+=2-t)n=Tt[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function R(e,t,n){for(var r,i=(nn[t]||[]).concat(nn["*"]),o=0,a=i.length;a>o;o++)if(r=i[o].call(n,t,e))return r}function q(e,t,n){var r,i,o,a,s,u,c,l=this,f={},h=e.style,p=e.nodeType&&Ct(e),d=mt.get(e,"fxshow");n.queue||(s=et._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,u=s.empty.fire,s.empty.fire=function(){s.unqueued||u()}),s.unqueued++,l.always(function(){l.always(function(){s.unqueued--,et.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],c=et.css(e,"display"),"none"===c&&(c=b(e.nodeName)),"inline"===c&&"none"===et.css(e,"float")&&(h.display="inline-block")),n.overflow&&(h.overflow="hidden",l.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Jt.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!d||void 0===d[r])continue;p=!0}f[r]=d&&d[r]||et.style(e,r)}if(!et.isEmptyObject(f)){d?"hidden"in d&&(p=d.hidden):d=mt.access(e,"fxshow",{}),o&&(d.hidden=!p),p?et(e).show():l.done(function(){et(e).hide()}),l.done(function(){var t;mt.remove(e,"fxshow");for(t in f)et.style(e,t,f[t])});for(r in f)a=R(p?d[r]:0,r,l),r in d||(d[r]=a.start,p&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function P(e,t){var n,r,i,o,a;for(n in e)if(r=et.camelCase(n),i=t[r],o=e[n],et.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=et.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function H(e,t,n){var r,i,o=0,a=tn.length,s=et.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Kt||N(),n=Math.max(0,c.startTime+c.duration-t),r=n/c.duration||0,o=1-r,a=0,u=c.tweens.length;u>a;a++)c.tweens[a].run(o);return s.notifyWith(e,[c,o,n]),1>o&&u?n:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:et.extend({},t),opts:et.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Kt||N(),duration:n.duration,tweens:[],createTween:function(t,n){var r=et.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)c.tweens[n].run(1);return t?s.resolveWith(e,[c,t]):s.rejectWith(e,[c,t]),this}}),l=c.props;for(P(l,c.opts.specialEasing);a>o;o++)if(r=tn[o].call(c,e,l,c.opts))return r;return et.map(l,R,c),et.isFunction(c.opts.start)&&c.opts.start.call(e,c),et.fx.timer(et.extend(u,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function I(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(pt)||[];if(et.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _(e,t,n,r){function i(s){var u;return o[s]=!0,et.each(e[s]||[],function(e,s){var c=s(t,n,r);return"string"!=typeof c||a||o[c]?a?!(u=c):void 0:(t.dataTypes.unshift(c),i(c),!1)}),u}var o={},a=e===Tn;return i(t.dataTypes[0])||!o["*"]&&i("*")}function D(e,t){var n,r,i=et.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&et.extend(!0,e,r),e}function O(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}return o?(o!==u[0]&&u.unshift(o),n[o]):void 0}function M(e,t,n,r){var i,o,a,s,u,c={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(a=c[u+" "+o]||c["* "+o],!a)for(i in c)if(s=i.split(" "),s[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[i]:c[i]!==!0&&(o=s[0],l.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(f){return{state:"parsererror",error:a?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function F(e,t,n,r){var i;if(et.isArray(t))et.each(t,function(t,i){n||Sn.test(e)?r(e,i):F(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==et.type(t))r(e,t);else for(i in t)F(e+"["+i+"]",t[i],n,r)}function U(e){return et.isWindow(e)?e:9===e.nodeType&&e.defaultView}var B=[],$=B.slice,W=B.concat,z=B.push,X=B.indexOf,Q={},Y=Q.toString,V=Q.hasOwnProperty,K="".trim,G={},J=e.document,Z="2.1.0",et=function(e,t){return new et.fn.init(e,t)},tt=/^-ms-/,nt=/-([\da-z])/gi,rt=function(e,t){return t.toUpperCase()};et.fn=et.prototype={jquery:Z,constructor:et,selector:"",length:0,toArray:function(){return $.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:$.call(this)},pushStack:function(e){var t=et.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return et.each(this,e,t)},map:function(e){return this.pushStack(et.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack($.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:z,sort:B.sort,splice:B.splice},et.extend=et.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||et.isFunction(a)||(a={}),s===u&&(a=this,s--);u>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],r=e[t],a!==r&&(c&&r&&(et.isPlainObject(r)||(i=et.isArray(r)))?(i?(i=!1,o=n&&et.isArray(n)?n:[]):o=n&&et.isPlainObject(n)?n:{},a[t]=et.extend(c,o,r)):void 0!==r&&(a[t]=r));return a},et.extend({expando:"jQuery"+(Z+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw Error(e)},noop:function(){},isFunction:function(e){return"function"===et.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return e-parseFloat(e)>=0},isPlainObject:function(e){if("object"!==et.type(e)||e.nodeType||et.isWindow(e))return!1;try{if(e.constructor&&!V.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Q[Y.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=et.trim(e),e&&(1===e.indexOf("use strict")?(t=J.createElement("script"),t.text=e,J.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(tt,"ms-").replace(nt,rt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,a=e.length,s=n(e);if(r){if(s)for(;a>o&&(i=t.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=t.apply(e[o],r),i===!1)break}else if(s)for(;a>o&&(i=t.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=t.call(e[o],o,e[o]),i===!1)break;return e},trim:function(e){return null==e?"":K.call(e)},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?et.merge(r,"string"==typeof e?[e]:e):z.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:X.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;a>o;o++)r=!t(e[o],o),r!==s&&i.push(e[o]);return i},map:function(e,t,r){var i,o=0,a=e.length,s=n(e),u=[];if(s)for(;a>o;o++)i=t(e[o],o,r),null!=i&&u.push(i);else for(o in e)i=t(e[o],o,r),null!=i&&u.push(i);return W.apply([],u)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),et.isFunction(e)?(r=$.call(arguments,2),i=function(){return e.apply(t||this,r.concat($.call(arguments)))},i.guid=e.guid=e.guid||et.guid++,i):void 0},now:Date.now,support:G}),et.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Q["[object "+t+"]"]=t.toLowerCase()});var it=function(e){function t(e,t,n,r){var i,o,a,s,u,c,f,d,v,g;if((t?t.ownerDocument||t:F)!==q&&R(t),t=t||q,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(H&&!r){if(i=yt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&O(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&C.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(C.qsa&&(!I||!I.test(e))){if(d=f=M,v=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=h(e),(f=t.getAttribute("id"))?d=f.replace(bt,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",u=c.length;u--;)c[u]=d+p(c[u]);v=xt.test(e)&&l(t.parentNode)||t,g=c.join(",")}if(g)try{return Z.apply(n,v.querySelectorAll(g)),n}catch(m){}finally{f||t.removeAttribute("id")}}}return w(e.replace(ut,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>k.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[M]=!0,e}function i(e){var t=q.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)k.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&typeof e.getElementsByTagName!==Q&&e}function f(){}function h(e,n){var r,i,o,a,s,u,c,l=W[e+" "];if(l)return n?0:l.slice(0);for(s=e,u=[],c=k.preFilter;s;){(!r||(i=ct.exec(s)))&&(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=lt.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(ut," ")}),s=s.slice(r.length));for(a in k.filter)!(i=dt[a].exec(s))||c[a]&&!(i=c[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):W(e,u).slice(0)}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=B++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,u,c=[U,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(u=t[M]||(t[M]={}),(s=u[r])&&s[0]===U&&s[1]===o)return c[2]=s[2];if(u[r]=c,c[2]=e(t,n,a))return!0}}}function v(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,c=null!=t;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),c&&t.push(s));return a}function m(e,t,n,i,o,a){return i&&!i[M]&&(i=m(i)),o&&!o[M]&&(o=m(o,a)),r(function(r,a,s,u){var c,l,f,h=[],p=[],d=a.length,v=r||b(t||"*",s.nodeType?[s]:s,[]),m=!e||!r&&t?v:g(v,h,e,s,u),y=n?o||(r?e:d||i)?[]:a:m;if(n&&n(m,y,s,u),i)for(c=g(y,p),i(c,[],s,u),l=c.length;l--;)(f=c[l])&&(y[p[l]]=!(m[p[l]]=f));if(r){if(o||e){if(o){for(c=[],l=y.length;l--;)(f=y[l])&&c.push(m[l]=f);o(null,y=[],c,u)}for(l=y.length;l--;)(f=y[l])&&(c=o?tt.call(r,f):h[l])>-1&&(r[c]=!(a[c]=f))}}else y=g(y===a?y.splice(d,y.length):y),o?o(null,a,y,u):Z.apply(a,y)})}function y(e){for(var t,n,r,i=e.length,o=k.relative[e[0].type],a=o||k.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),c=d(function(e){return tt.call(t,e)>-1},a,!0),l=[function(e,n,r){return!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):c(e,n,r))}];i>s;s++)if(n=k.relative[e[s].type])l=[d(v(l),n)];else{if(n=k.filter[e[s].type].apply(null,e[s].matches),n[M]){for(r=++s;i>r&&!k.relative[e[r].type];r++);return m(s>1&&v(l),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ut,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&p(e))}l.push(n)}return v(l)}function x(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,c){var l,f,h,p=0,d="0",v=r&&[],m=[],y=j,x=r||o&&k.find.TAG("*",c),b=U+=null==y?1:Math.random()||.1,w=x.length;for(c&&(j=a!==q&&a);d!==w&&null!=(l=x[d]);d++){if(o&&l){for(f=0;h=e[f++];)if(h(l,a,s)){u.push(l);break}c&&(U=b)}i&&((l=!h&&l)&&p--,r&&v.push(l))}if(p+=d,i&&d!==p){for(f=0;h=n[f++];)h(v,m,a,s);if(r){if(p>0)for(;d--;)v[d]||m[d]||(m[d]=G.call(u));m=g(m)}Z.apply(u,m),c&&!r&&m.length>0&&p+n.length>1&&t.uniqueSort(u)}return c&&(U=b,j=y),v};return i?r(a):a}function b(e,n,r){for(var i=0,o=n.length;o>i;i++)t(e,n[i],r);return r}function w(e,t,n,r){var i,o,a,s,u,c=h(e);if(!r&&1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&C.getById&&9===t.nodeType&&H&&k.relative[o[1].type]){if(t=(k.find.ID(a.matches[0].replace(wt,Tt),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=dt.needsContext.test(e)?0:o.length;i--&&(a=o[i],!k.relative[s=a.type]);)if((u=k.find[s])&&(r=u(a.matches[0].replace(wt,Tt),xt.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return Z.apply(n,r),n;break}}return A(e,c)(r,t,!H,n,xt.test(e)&&l(t.parentNode)||t),n}var T,C,k,E,S,A,j,N,L,R,q,P,H,I,_,D,O,M="sizzle"+-new Date,F=e.document,U=0,B=0,$=n(),W=n(),z=n(),X=function(e,t){return e===t&&(L=!0),0},Q="undefined",Y=1<<31,V={}.hasOwnProperty,K=[],G=K.pop,J=K.push,Z=K.push,et=K.slice,tt=K.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},nt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",rt="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot=it.replace("w","w#"),at="\\["+rt+"*("+it+")"+rt+"*(?:([*^$|!~]?=)"+rt+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ot+")|)|)"+rt+"*\\]",st=":("+it+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+at.replace(3,8)+")*)|.*)\\)|)",ut=RegExp("^"+rt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+rt+"+$","g"),ct=RegExp("^"+rt+"*,"+rt+"*"),lt=RegExp("^"+rt+"*([>+~]|"+rt+")"+rt+"*"),ft=RegExp("="+rt+"*([^\\]'\"]*?)"+rt+"*\\]","g"),ht=RegExp(st),pt=RegExp("^"+ot+"$"),dt={ID:RegExp("^#("+it+")"),CLASS:RegExp("^\\.("+it+")"),TAG:RegExp("^("+it.replace("w","w*")+")"),ATTR:RegExp("^"+at),PSEUDO:RegExp("^"+st),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+rt+"*(even|odd|(([+-]|)(\\d*)n|)"+rt+"*(?:([+-]|)"+rt+"*(\\d+)|))"+rt+"*\\)|)","i"),bool:RegExp("^(?:"+nt+")$","i"),needsContext:RegExp("^"+rt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+rt+"*((?:-\\d)?\\d*)"+rt+"*\\)|)(?=[^-]|$)","i")},vt=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,yt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xt=/[+~]/,bt=/'|\\/g,wt=RegExp("\\\\([\\da-f]{1,6}"+rt+"?|("+rt+")|.)","ig"),Tt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{Z.apply(K=et.call(F.childNodes),F.childNodes),K[F.childNodes.length].nodeType}catch(Ct){Z={apply:K.length?function(e,t){J.apply(e,et.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}C=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},R=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:F,r=n.defaultView;return n!==q&&9===n.nodeType&&n.documentElement?(q=n,P=n.documentElement,H=!S(n),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){R()},!1):r.attachEvent&&r.attachEvent("onunload",function(){R()})),C.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),C.getElementsByTagName=i(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),C.getElementsByClassName=mt.test(n.getElementsByClassName)&&i(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),C.getById=i(function(e){return P.appendChild(e).id=M,!n.getElementsByName||!n.getElementsByName(M).length}),C.getById?(k.find.ID=function(e,t){if(typeof t.getElementById!==Q&&H){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},k.filter.ID=function(e){var t=e.replace(wt,Tt);return function(e){return e.getAttribute("id")===t}}):(delete k.find.ID,k.filter.ID=function(e){var t=e.replace(wt,Tt);return function(e){var n=typeof e.getAttributeNode!==Q&&e.getAttributeNode("id");return n&&n.value===t}}),k.find.TAG=C.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Q?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},k.find.CLASS=C.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==Q&&H?t.getElementsByClassName(e):void 0},_=[],I=[],(C.qsa=mt.test(n.querySelectorAll))&&(i(function(e){e.innerHTML="<select t=''><option selected=''></option></select>",e.querySelectorAll("[t^='']").length&&I.push("[*^$]="+rt+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||I.push("\\["+rt+"*(?:value|"+nt+")"),e.querySelectorAll(":checked").length||I.push(":checked")}),i(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&I.push("name"+rt+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),I.push(",.*:")})),(C.matchesSelector=mt.test(D=P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&i(function(e){C.disconnectedMatch=D.call(e,"div"),D.call(e,"[s!='']:x"),_.push("!=",st)}),I=I.length&&RegExp(I.join("|")),_=_.length&&RegExp(_.join("|")),t=mt.test(P.compareDocumentPosition),O=t||mt.test(P.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return L=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!C.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===F&&O(F,e)?-1:t===n||t.ownerDocument===F&&O(F,t)?1:N?tt.call(N,e)-tt.call(N,t):0:4&r?-1:1)}:function(e,t){if(e===t)return L=!0,0;var r,i=0,o=e.parentNode,s=t.parentNode,u=[e],c=[t];if(!o||!s)return e===n?-1:t===n?1:o?-1:s?1:N?tt.call(N,e)-tt.call(N,t):0;if(o===s)return a(e,t);for(r=e;r=r.parentNode;)u.unshift(r);for(r=t;r=r.parentNode;)c.unshift(r);for(;u[i]===c[i];)i++;return i?a(u[i],c[i]):u[i]===F?-1:c[i]===F?1:0},n):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&R(e),n=n.replace(ft,"='$1']"),!(!C.matchesSelector||!H||_&&_.test(n)||I&&I.test(n)))try{var r=D.call(e,n);if(r||C.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&R(e),O(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&R(e);var n=k.attrHandle[t.toLowerCase()],r=n&&V.call(k.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:C.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(L=!C.detectDuplicates,N=!C.sortStable&&e.slice(0),e.sort(X),L){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return N=null,e},E=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=E(t);return n},k=t.selectors={cacheLength:50,createPseudo:r,match:dt,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(wt,Tt),e[3]=(e[4]||e[5]||"").replace(wt,Tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return dt.CHILD.test(e[0])?null:(e[3]&&void 0!==e[4]?e[2]=e[4]:n&&ht.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(wt,Tt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=RegExp("(^|"+rt+")"+e+"("+rt+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Q&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,h,p,d,v=o!==a?"nextSibling":"previousSibling",g=t.parentNode,m=s&&t.nodeName.toLowerCase(),y=!u&&!s;if(g){if(o){for(;v;){for(f=t;f=f[v];)if(s?f.nodeName.toLowerCase()===m:1===f.nodeType)return!1;d=v="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?g.firstChild:g.lastChild],a&&y){for(l=g[M]||(g[M]={}),c=l[e]||[],p=c[0]===U&&c[1],h=c[0]===U&&c[2],f=p&&g.childNodes[p];f=++p&&f&&f[v]||(h=p=0)||d.pop();)if(1===f.nodeType&&++h&&f===t){l[e]=[U,p,h];break}}else if(y&&(c=(t[M]||(t[M]={}))[e])&&c[0]===U)h=c[1];else for(;(f=++p&&f&&f[v]||(h=p=0)||d.pop())&&((s?f.nodeName.toLowerCase()!==m:1!==f.nodeType)||!++h||(y&&((f[M]||(f[M]={}))[e]=[U,h]),f!==t)););return h-=i,h===r||0===h%r&&h/r>=0}}},PSEUDO:function(e,n){var i,o=k.pseudos[e]||k.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[M]?o(n):o.length>1?(i=[e,e,"",n],k.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=tt.call(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=A(e.replace(ut,"$1"));return i[M]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:r(function(e){return pt.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(wt,Tt).toLowerCase(),function(t){var n;do if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);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===q.activeElement&&(!q.hasFocus||q.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"input"===t&&!!e.checked||"option"===t&&!!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(6>e.nodeType)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return gt.test(e.nodeName)},input:function(e){return vt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}},k.pseudos.nth=k.pseudos.eq;for(T in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[T]=s(T);for(T in{submit:!0,reset:!0})k.pseudos[T]=u(T);return f.prototype=k.filters=k.pseudos,k.setFilters=new f,A=t.compile=function(e,t){var n,r=[],i=[],o=z[e+" "];if(!o){for(t||(t=h(e)),n=t.length;n--;)o=y(t[n]),o[M]?r.push(o):i.push(o);o=z(e,x(i,r))}return o},C.sortStable=M.split("").sort(X).join("")===M,C.detectDuplicates=!!L,R(),C.sortDetached=i(function(e){return 1&e.compareDocumentPosition(q.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),C.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(nt,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);et.find=it,et.expr=it.selectors,et.expr[":"]=et.expr.pseudos,et.unique=it.uniqueSort,et.text=it.getText,et.isXMLDoc=it.isXML,et.contains=it.contains;var ot=et.expr.match.needsContext,at=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,st=/^.[^:#\[\.,]*$/;et.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?et.find.matchesSelector(r,e)?[r]:[]:et.find.matches(e,et.grep(t,function(e){return 1===e.nodeType | |
}))},et.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(et(e).filter(function(){for(t=0;n>t;t++)if(et.contains(i[t],this))return!0}));for(t=0;n>t;t++)et.find(e,i[t],r);return r=this.pushStack(n>1?et.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&ot.test(e)?et(e):e||[],!1).length}});var ut,ct=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,lt=et.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ct.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||ut).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof et?t[0]:t,et.merge(this,et.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:J,!0)),at.test(n[1])&&et.isPlainObject(t))for(n in t)et.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=J.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=J,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):et.isFunction(e)?ut.ready!==void 0?ut.ready(e):e(et):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),et.makeArray(e,this))};lt.prototype=et.fn,ut=et(J);var ft=/^(?:parents|prev(?:Until|All))/,ht={children:!0,contents:!0,next:!0,prev:!0};et.extend({dir:function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&et(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),et.fn.extend({has:function(e){var t=et(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(et.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=ot.test(e)||"string"!=typeof e?et(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&et.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?et.unique(o):o)},index:function(e){return e?"string"==typeof e?X.call(et(e),this[0]):X.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(et.unique(et.merge(this.get(),et(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),et.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return et.dir(e,"parentNode")},parentsUntil:function(e,t,n){return et.dir(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return et.dir(e,"nextSibling")},prevAll:function(e){return et.dir(e,"previousSibling")},nextUntil:function(e,t,n){return et.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return et.dir(e,"previousSibling",n)},siblings:function(e){return et.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return et.sibling(e.firstChild)},contents:function(e){return e.contentDocument||et.merge([],e.childNodes)}},function(e,t){et.fn[e]=function(n,r){var i=et.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=et.filter(r,i)),this.length>1&&(ht[e]||et.unique(i),ft.test(e)&&i.reverse()),this.pushStack(i)}});var pt=/\S+/g,dt={};et.Callbacks=function(e){e="string"==typeof e?dt[e]||o(e):et.extend({},e);var t,n,r,i,a,s,u=[],c=!e.once&&[],l=function(o){for(t=e.memory&&o,n=!0,s=i||0,i=0,a=u.length,r=!0;u&&a>s;s++)if(u[s].apply(o[0],o[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,u&&(c?c.length&&l(c.shift()):t?u=[]:f.disable())},f={add:function(){if(u){var n=u.length;(function o(t){et.each(t,function(t,n){var r=et.type(n);"function"===r?e.unique&&f.has(n)||u.push(n):n&&n.length&&"string"!==r&&o(n)})})(arguments),r?a=u.length:t&&(i=n,l(t))}return this},remove:function(){return u&&et.each(arguments,function(e,t){for(var n;(n=et.inArray(t,u,n))>-1;)u.splice(n,1),r&&(a>=n&&a--,s>=n&&s--)}),this},has:function(e){return e?et.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],a=0,this},disable:function(){return u=c=t=void 0,this},disabled:function(){return!u},lock:function(){return c=void 0,t||f.disable(),this},locked:function(){return!c},fireWith:function(e,t){return!u||n&&!c||(t=t||[],t=[e,t.slice?t.slice():t],r?c.push(t):l(t)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!n}};return f},et.extend({Deferred:function(e){var t=[["resolve","done",et.Callbacks("once memory"),"resolved"],["reject","fail",et.Callbacks("once memory"),"rejected"],["notify","progress",et.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return et.Deferred(function(n){et.each(t,function(t,o){var a=et.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&et.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?et.extend(e,r):r}},i={};return r.pipe=r.then,et.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=$.call(arguments),a=o.length,s=1!==a||e&&et.isFunction(e.promise)?a:0,u=1===s?e:et.Deferred(),c=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?$.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=Array(a),n=Array(a),r=Array(a);a>i;i++)o[i]&&et.isFunction(o[i].promise)?o[i].promise().done(c(i,r,o)).fail(u.reject).progress(c(i,n,t)):--s;return s||u.resolveWith(r,o),u.promise()}});var vt;et.fn.ready=function(e){return et.ready.promise().done(e),this},et.extend({isReady:!1,readyWait:1,holdReady:function(e){e?et.readyWait++:et.ready(!0)},ready:function(e){(e===!0?--et.readyWait:et.isReady)||(et.isReady=!0,e!==!0&&--et.readyWait>0||(vt.resolveWith(J,[et]),et.fn.trigger&&et(J).trigger("ready").off("ready")))}}),et.ready.promise=function(t){return vt||(vt=et.Deferred(),"complete"===J.readyState?setTimeout(et.ready):(J.addEventListener("DOMContentLoaded",a,!1),e.addEventListener("load",a,!1))),vt.promise(t)},et.ready.promise();var gt=et.access=function(e,t,n,r,i,o,a){var s=0,u=e.length,c=null==n;if("object"===et.type(n)){i=!0;for(s in n)et.access(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,et.isFunction(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(et(e),n)})),t))for(;u>s;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:c?t.call(e):u?t(e[0],n):o};et.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},s.uid=1,s.accepts=et.acceptData,s.prototype={key:function(e){if(!s.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=s.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,et.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(et.isEmptyObject(o))et.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?(r=this.get(e,t),void 0!==r?r:this.get(e,et.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),a=this.cache[o];if(void 0===t)this.cache[o]={};else{et.isArray(t)?r=t.concat(t.map(et.camelCase)):(i=et.camelCase(t),t in a?r=[t,i]:(r=i,r=r in a?[r]:r.match(pt)||[])),n=r.length;for(;n--;)delete a[r[n]]}},hasData:function(e){return!et.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var mt=new s,yt=new s,xt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,bt=/([A-Z])/g;et.extend({hasData:function(e){return yt.hasData(e)||mt.hasData(e)},data:function(e,t,n){return yt.access(e,t,n)},removeData:function(e,t){yt.remove(e,t)},_data:function(e,t,n){return mt.access(e,t,n)},_removeData:function(e,t){mt.remove(e,t)}}),et.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=yt.get(o),1===o.nodeType&&!mt.get(o,"hasDataAttrs"))){for(n=a.length;n--;)r=a[n].name,0===r.indexOf("data-")&&(r=et.camelCase(r.slice(5)),u(o,r,i[r]));mt.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){yt.set(this,e)}):gt(this,function(t){var n,r=et.camelCase(e);if(o&&void 0===t){if(n=yt.get(o,e),void 0!==n)return n;if(n=yt.get(o,r),void 0!==n)return n;if(n=u(o,r,void 0),void 0!==n)return n}else this.each(function(){var n=yt.get(this,r);yt.set(this,r,t),-1!==e.indexOf("-")&&void 0!==n&&yt.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){yt.remove(this,e)})}}),et.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=mt.get(e,t),n&&(!r||et.isArray(n)?r=mt.access(e,t,et.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=et.queue(e,t),r=n.length,i=n.shift(),o=et._queueHooks(e,t),a=function(){et.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return mt.get(e,n)||mt.access(e,n,{empty:et.Callbacks("once memory").add(function(){mt.remove(e,[t+"queue",n])})})}}),et.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),n>arguments.length?et.queue(this[0],e):void 0===t?this:this.each(function(){var n=et.queue(this,e,t);et._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&et.dequeue(this,e)})},dequeue:function(e){return this.each(function(){et.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=et.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=mt.get(o[a],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var wt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Tt=["Top","Right","Bottom","Left"],Ct=function(e,t){return e=t||e,"none"===et.css(e,"display")||!et.contains(e.ownerDocument,e)},kt=/^(?:checkbox|radio)$/i;(function(){var e=J.createDocumentFragment(),t=e.appendChild(J.createElement("div"));t.innerHTML="<input type='radio' checked='checked' name='t'/>",G.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",G.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue})();var Et="undefined";G.focusinBubbles="onfocusin"in e;var St=/^key/,At=/^(?:mouse|contextmenu)|click/,jt=/^(?:focusinfocus|focusoutblur)$/,Nt=/^([^.]*)(?:\.(.+)|)$/;et.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,c,l,f,h,p,d,v,g=mt.get(e);if(g)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=et.guid++),(u=g.events)||(u=g.events={}),(a=g.handle)||(a=g.handle=function(t){return typeof et!==Et&&et.event.triggered!==t.type?et.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(pt)||[""],c=t.length;c--;)s=Nt.exec(t[c])||[],p=v=s[1],d=(s[2]||"").split(".").sort(),p&&(f=et.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=et.event.special[p]||{},l=et.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&et.expr.match.needsContext.test(i),namespace:d.join(".")},o),(h=u[p])||(h=u[p]=[],h.delegateCount=0,f.setup&&f.setup.call(e,r,d,a)!==!1||e.addEventListener&&e.addEventListener(p,a,!1)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,l):h.push(l),et.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,c,l,f,h,p,d,v,g=mt.hasData(e)&&mt.get(e);if(g&&(u=g.events)){for(t=(t||"").match(pt)||[""],c=t.length;c--;)if(s=Nt.exec(t[c])||[],p=v=s[1],d=(s[2]||"").split(".").sort(),p){for(f=et.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,h=u[p]||[],s=s[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)l=h[o],!i&&v!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(h.splice(o,1),l.selector&&h.delegateCount--,f.remove&&f.remove.call(e,l));a&&!h.length&&(f.teardown&&f.teardown.call(e,d,g.handle)!==!1||et.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)et.event.remove(e,p+t[c],n,r,!0);et.isEmptyObject(u)&&(delete g.handle,mt.remove(e,"events"))}},trigger:function(t,n,r,i){var o,a,s,u,c,l,f,h=[r||J],p=V.call(t,"type")?t.type:t,d=V.call(t,"namespace")?t.namespace.split("."):[];if(a=s=r=r||J,3!==r.nodeType&&8!==r.nodeType&&!jt.test(p+et.event.triggered)&&(p.indexOf(".")>=0&&(d=p.split("."),p=d.shift(),d.sort()),c=0>p.indexOf(":")&&"on"+p,t=t[et.expando]?t:new et.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=d.join("."),t.namespace_re=t.namespace?RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:et.makeArray(n,[t]),f=et.event.special[p]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!et.isWindow(r)){for(u=f.delegateType||p,jt.test(u+p)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(r.ownerDocument||J)&&h.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=h[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||p,l=(mt.get(a,"events")||{})[t.type]&&mt.get(a,"handle"),l&&l.apply(a,n),l=c&&a[c],l&&l.apply&&et.acceptData(a)&&(t.result=l.apply(a,n),t.result===!1&&t.preventDefault());return t.type=p,i||t.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!et.acceptData(r)||c&&et.isFunction(r[p])&&!et.isWindow(r)&&(s=r[c],s&&(r[c]=null),et.event.triggered=p,r[p](),et.event.triggered=void 0,s&&(r[c]=s)),t.result}},dispatch:function(e){e=et.event.fix(e);var t,n,r,i,o,a=[],s=$.call(arguments),u=(mt.get(this,"events")||{})[e.type]||[],c=et.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(a=et.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((et.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;s>n;n++)o=t[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?et(i,this).index(u)>=0:et.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return t.length>s&&a.push({elem:this,handlers:t.slice(s)}),a},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 null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||J,r=n.documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[et.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=At.test(i)?this.mouseHooks:St.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new et.Event(o),t=r.length;t--;)n=r[t],e[n]=o[n];return e.target||(e.target=J),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==f()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&et.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return et.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=et.extend(new et.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?et.event.trigger(i,null,t):et.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},et.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)},et.Event=function(e,t){return this instanceof et.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.getPreventDefault&&e.getPreventDefault()?c:l):this.type=e,t&&et.extend(this,t),this.timeStamp=e&&e.timeStamp||et.now(),this[et.expando]=!0,void 0):new et.Event(e,t)},et.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=c,e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=c,e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=c,this.stopPropagation()}},et.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){et.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!et.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),G.focusinBubbles||et.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){et.event.simulate(t,e.target,et.event.fix(e),!0)};et.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=mt.access(r,t);i||r.addEventListener(e,n,!0),mt.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=mt.access(r,t)-1;i?mt.access(r,t,i):(r.removeEventListener(e,n,!0),mt.remove(r,t))}}}),et.fn.extend({on:function(e,t,n,r,i){var o,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(a in e)this.on(a,t,n,e[a],i);return this}if(null==n&&null==r?(r=t,n=t=void 0):null==r&&("string"==typeof t?(r=n,n=void 0):(r=n,n=t,t=void 0)),r===!1)r=l;else if(!r)return this;return 1===i&&(o=r,r=function(e){return et().off(e),o.apply(this,arguments)},r.guid=o.guid||(o.guid=et.guid++)),this.each(function(){et.event.add(this,e,r,n,t)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,et(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=l),this.each(function(){et.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){et.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?et.event.trigger(e,t,n,!0):void 0}});var Lt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Rt=/<([\w:]+)/,qt=/<|&#?\w+;/,Pt=/<(?:script|style|link)/i,Ht=/checked\s*(?:[^=]|=\s*.checked.)/i,It=/^$|\/(?:java|ecma)script/i,_t=/^true\/(.*)/,Dt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ot={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ot.optgroup=Ot.option,Ot.tbody=Ot.tfoot=Ot.colgroup=Ot.caption=Ot.thead,Ot.th=Ot.td,et.extend({clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=et.contains(e.ownerDocument,e);if(!(G.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||et.isXMLDoc(e)))for(a=m(s),o=m(e),r=0,i=o.length;i>r;r++)y(o[r],a[r]);if(t)if(n)for(o=o||m(e),a=a||m(s),r=0,i=o.length;i>r;r++)g(o[r],a[r]);else g(e,s);return a=m(s,"script"),a.length>0&&v(a,!u&&m(e,"script")),s},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,c,l=t.createDocumentFragment(),f=[],h=0,p=e.length;p>h;h++)if(i=e[h],i||0===i)if("object"===et.type(i))et.merge(f,i.nodeType?[i]:i);else if(qt.test(i)){for(o=o||l.appendChild(t.createElement("div")),a=(Rt.exec(i)||["",""])[1].toLowerCase(),s=Ot[a]||Ot._default,o.innerHTML=s[1]+i.replace(Lt,"<$1></$2>")+s[2],c=s[0];c--;)o=o.lastChild;et.merge(f,o.childNodes),o=l.firstChild,o.textContent=""}else f.push(t.createTextNode(i));for(l.textContent="",h=0;i=f[h++];)if((!r||-1===et.inArray(i,r))&&(u=et.contains(i.ownerDocument,i),o=m(l.appendChild(i),"script"),u&&v(o),n))for(c=0;i=o[c++];)It.test(i.type||"")&&n.push(i);return l},cleanData:function(e){for(var t,n,r,i,o,a,s=et.event.special,u=0;void 0!==(n=e[u]);u++){if(et.acceptData(n)&&(o=n[mt.expando],o&&(t=mt.cache[o]))){if(r=Object.keys(t.events||{}),r.length)for(a=0;void 0!==(i=r[a]);a++)s[i]?et.event.remove(n,i):et.removeEvent(n,i,t.handle);mt.cache[o]&&delete mt.cache[o]}delete yt.cache[n[yt.expando]]}}}),et.fn.extend({text:function(e){return gt(this,function(e){return void 0===e?et.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=h(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=h(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){for(var n,r=e?et.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||et.cleanData(m(n)),n.parentNode&&(t&&et.contains(n.ownerDocument,n)&&v(m(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(et.cleanData(m(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return et.clone(this,e,t)})},html:function(e){return gt(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Pt.test(e)&&!Ot[(Rt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Lt,"<$1></$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(et.cleanData(m(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,et.cleanData(m(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=W.apply([],e);var n,r,i,o,a,s,u=0,c=this.length,l=this,f=c-1,h=e[0],v=et.isFunction(h);if(v||c>1&&"string"==typeof h&&!G.checkClone&&Ht.test(h))return this.each(function(n){var r=l.eq(n);v&&(e[0]=h.call(this,n,r.html())),r.domManip(e,t)});if(c&&(n=et.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,1===n.childNodes.length&&(n=r),r)){for(i=et.map(m(n,"script"),p),o=i.length;c>u;u++)a=n,u!==f&&(a=et.clone(a,!0,!0),o&&et.merge(i,m(a,"script"))),t.call(this[u],a,u);if(o)for(s=i[i.length-1].ownerDocument,et.map(i,d),u=0;o>u;u++)a=i[u],It.test(a.type||"")&&!mt.access(a,"globalEval")&&et.contains(s,a)&&(a.src?et._evalUrl&&et._evalUrl(a.src):et.globalEval(a.textContent.replace(Dt,"")))}return this}}),et.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){et.fn[e]=function(e){for(var n,r=[],i=et(e),o=i.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),et(i[a])[t](n),z.apply(r,n.get());return this.pushStack(r)}});var Mt,Ft={},Ut=/^margin/,Bt=RegExp("^("+wt+")(?!px)[a-z%]+$","i"),$t=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};(function(){function t(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",o.appendChild(a);var t=e.getComputedStyle(s,null);n="1%"!==t.top,r="4px"===t.width,o.removeChild(a)}var n,r,i="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",o=J.documentElement,a=J.createElement("div"),s=J.createElement("div");s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",G.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(s),e.getComputedStyle&&et.extend(G,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==r&&t(),r},reliableMarginRight:function(){var t,n=s.appendChild(J.createElement("div"));return n.style.cssText=s.style.cssText=i,n.style.marginRight=n.style.width="0",s.style.width="1px",o.appendChild(a),t=!parseFloat(e.getComputedStyle(n,null).marginRight),o.removeChild(a),s.innerHTML="",t}})})(),et.swap=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};var Wt=/^(none|table(?!-c[ea]).+)/,zt=RegExp("^("+wt+")(.*)$","i"),Xt=RegExp("^([+-])=("+wt+")","i"),Qt={position:"absolute",visibility:"hidden",display:"block"},Yt={letterSpacing:0,fontWeight:400},Vt=["Webkit","O","Moz","ms"];et.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=w(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":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=et.camelCase(t),u=e.style;return t=et.cssProps[s]||(et.cssProps[s]=C(u,s)),a=et.cssHooks[t]||et.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t]:(o=typeof n,"string"===o&&(i=Xt.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(et.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||et.cssNumber[s]||(n+="px"),G.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u[t]="",u[t]=n)),void 0)}},css:function(e,t,n,r){var i,o,a,s=et.camelCase(t);return t=et.cssProps[s]||(et.cssProps[s]=C(e.style,s)),a=et.cssHooks[t]||et.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=w(e,t,r)),"normal"===i&&t in Yt&&(i=Yt[t]),""===n||n?(o=parseFloat(i),n===!0||et.isNumeric(o)?o||0:i):i}}),et.each(["height","width"],function(e,t){et.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&Wt.test(et.css(e,"display"))?et.swap(e,Qt,function(){return S(e,t,r)}):S(e,t,r):void 0},set:function(e,n,r){var i=r&&$t(e);return k(e,n,r?E(e,t,r,"border-box"===et.css(e,"boxSizing",!1,i),i):0)}}}),et.cssHooks.marginRight=T(G.reliableMarginRight,function(e,t){return t?et.swap(e,{display:"inline-block"},w,[e,"marginRight"]):void 0}),et.each({margin:"",padding:"",border:"Width"},function(e,t){et.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+Tt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(et.cssHooks[e+t].set=k)}),et.fn.extend({css:function(e,t){return gt(this,function(e,t,n){var r,i,o={},a=0;if(et.isArray(t)){for(r=$t(e),i=t.length;i>a;a++)o[t[a]]=et.css(e,t[a],!1,r);return o}return void 0!==n?et.style(e,t,n):et.css(e,t)},e,t,arguments.length>1)},show:function(){return A(this,!0)},hide:function(){return A(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ct(this)?et(this).show():et(this).hide()})}}),et.Tween=j,j.prototype={constructor:j,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(et.cssNumber[n]?"":"px")},cur:function(){var e=j.propHooks[this.prop];return e&&e.get?e.get(this):j.propHooks._default.get(this)},run:function(e){var t,n=j.propHooks[this.prop];return this.pos=t=this.options.duration?et.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):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):j.propHooks._default.set(this),this}},j.prototype.init.prototype=j.prototype,j.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=et.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){et.fx.step[e.prop]?et.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[et.cssProps[e.prop]]||et.cssHooks[e.prop])?et.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},j.propHooks.scrollTop=j.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},et.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},et.fx=j.prototype.init,et.fx.step={};var Kt,Gt,Jt=/^(?:toggle|show|hide)$/,Zt=RegExp("^(?:([+-])=|)("+wt+")([a-z%]*)$","i"),en=/queueHooks$/,tn=[q],nn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Zt.exec(t),o=i&&i[3]||(et.cssNumber[e]?"":"px"),a=(et.cssNumber[e]||"px"!==o&&+r)&&Zt.exec(et.css(n.elem,e)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,et.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--u)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};et.Animation=et.extend(H,{tweener:function(e,t){et.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],nn[n]=nn[n]||[],nn[n].unshift(t)},prefilter:function(e,t){t?tn.unshift(e):tn.push(e)}}),et.speed=function(e,t,n){var r=e&&"object"==typeof e?et.extend({},e):{complete:n||!n&&t||et.isFunction(e)&&e,duration:e,easing:n&&t||t&&!et.isFunction(t)&&t};return r.duration=et.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in et.fx.speeds?et.fx.speeds[r.duration]:et.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){et.isFunction(r.old)&&r.old.call(this),r.queue&&et.dequeue(this,r.queue)},r},et.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ct).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=et.isEmptyObject(e),o=et.speed(t,n,r),a=function(){var t=H(this,et.extend({},e),o);(i||mt.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=et.timers,a=mt.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&en.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&et.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=mt.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=et.timers,a=r?r.length:0;for(n.finish=!0,et.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1)); | |
for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),et.each(["toggle","show","hide"],function(e,t){var n=et.fn[t];et.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(L(t,!0),e,r,i)}}),et.each({slideDown:L("show"),slideUp:L("hide"),slideToggle:L("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){et.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),et.timers=[],et.fx.tick=function(){var e,t=0,n=et.timers;for(Kt=et.now();n.length>t;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||et.fx.stop(),Kt=void 0},et.fx.timer=function(e){et.timers.push(e),e()?et.fx.start():et.timers.pop()},et.fx.interval=13,et.fx.start=function(){Gt||(Gt=setInterval(et.fx.tick,et.fx.interval))},et.fx.stop=function(){clearInterval(Gt),Gt=null},et.fx.speeds={slow:600,fast:200,_default:400},et.fn.delay=function(e,t){return e=et.fx?et.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},function(){var e=J.createElement("input"),t=J.createElement("select"),n=t.appendChild(J.createElement("option"));e.type="checkbox",G.checkOn=""!==e.value,G.optSelected=n.selected,t.disabled=!0,G.optDisabled=!n.disabled,e=J.createElement("input"),e.value="t",e.type="radio",G.radioValue="t"===e.value}();var rn,on,an=et.expr.attrHandle;et.fn.extend({attr:function(e,t){return gt(this,et.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){et.removeAttr(this,e)})}}),et.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===Et?et.prop(e,t,n):(1===o&&et.isXMLDoc(e)||(t=t.toLowerCase(),r=et.attrHooks[t]||(et.expr.match.bool.test(t)?on:rn)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=et.find.attr(e,t),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):(et.removeAttr(e,t),void 0))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(pt);if(o&&1===e.nodeType)for(;n=o[i++];)r=et.propFix[n]||n,et.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!G.radioValue&&"radio"===t&&et.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),on={set:function(e,t,n){return t===!1?et.removeAttr(e,n):e.setAttribute(n,n),n}},et.each(et.expr.match.bool.source.match(/\w+/g),function(e,t){var n=an[t]||et.find.attr;an[t]=function(e,t,r){var i,o;return r||(o=an[t],an[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,an[t]=o),i}});var sn=/^(?:input|select|textarea|button)$/i;et.fn.extend({prop:function(e,t){return gt(this,et.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[et.propFix[e]||e]})}}),et.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!et.isXMLDoc(e),o&&(t=et.propFix[t]||t,i=et.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||sn.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),G.optSelected||(et.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),et.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){et.propFix[this.toLowerCase()]=this});var un=/[\t\r\n\f]/g;et.fn.extend({addClass:function(e){var t,n,r,i,o,a,s="string"==typeof e&&e,u=0,c=this.length;if(et.isFunction(e))return this.each(function(t){et(this).addClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(pt)||[];c>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(un," "):" ")){for(o=0;i=t[o++];)0>r.indexOf(" "+i+" ")&&(r+=i+" ");a=et.trim(r),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,r,i,o,a,s=0===arguments.length||"string"==typeof e&&e,u=0,c=this.length;if(et.isFunction(e))return this.each(function(t){et(this).removeClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(pt)||[];c>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(un," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");a=e?et.trim(r):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):et.isFunction(e)?this.each(function(n){et(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,r=0,i=et(this),o=e.match(pt)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(n===Et||"boolean"===n)&&(this.className&&mt.set(this,"__className__",this.className),this.className=this.className||e===!1?"":mt.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(un," ").indexOf(t)>=0)return!0;return!1}});var cn=/\r/g;et.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=et.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,et(this).val()):e,null==i?i="":"number"==typeof i?i+="":et.isArray(i)&&(i=et.map(i,function(e){return null==e?"":e+""})),t=et.valHooks[this.type]||et.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=et.valHooks[i.type]||et.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(cn,""):null==n?"":n)}}}),et.extend({valHooks:{select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(G.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&et.nodeName(n.parentNode,"optgroup"))){if(t=et(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=et.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=et.inArray(et(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),et.each(["radio","checkbox"],function(){et.valHooks[this]={set:function(e,t){return et.isArray(t)?e.checked=et.inArray(et(e).val(),t)>=0:void 0}},G.checkOn||(et.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),et.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){et.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),et.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 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var ln=et.now(),fn=/\?/;et.parseJSON=function(e){return JSON.parse(e+"")},et.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&et.error("Invalid XML: "+e),t};var hn,pn,dn=/#.*$/,vn=/([?&])_=[^&]*/,gn=/^(.*?):[ \t]*([^\r\n]*)$/gm,mn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,yn=/^(?:GET|HEAD)$/,xn=/^\/\//,bn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,wn={},Tn={},Cn="*/".concat("*");try{pn=location.href}catch(kn){pn=J.createElement("a"),pn.href="",pn=pn.href}hn=bn.exec(pn.toLowerCase())||[],et.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:pn,type:"GET",isLocal:mn.test(hn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Cn,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":et.parseJSON,"text xml":et.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?D(D(e,et.ajaxSettings),t):D(et.ajaxSettings,e)},ajaxPrefilter:I(wn),ajaxTransport:I(Tn),ajax:function(e,t){function n(e,t,n,a){var u,l,m,y,b,T=t;2!==x&&(x=2,s&&clearTimeout(s),r=void 0,o=a||"",w.readyState=e>0?4:0,u=e>=200&&300>e||304===e,n&&(y=O(f,w,n)),y=M(f,y,w,u),u?(f.ifModified&&(b=w.getResponseHeader("Last-Modified"),b&&(et.lastModified[i]=b),b=w.getResponseHeader("etag"),b&&(et.etag[i]=b)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=y.state,l=y.data,m=y.error,u=!m)):(m=T,(e||!T)&&(T="error",0>e&&(e=0))),w.status=e,w.statusText=(t||T)+"",u?d.resolveWith(h,[l,T,w]):d.rejectWith(h,[w,T,m]),w.statusCode(g),g=void 0,c&&p.trigger(u?"ajaxSuccess":"ajaxError",[w,f,u?l:m]),v.fireWith(h,[w,T]),c&&(p.trigger("ajaxComplete",[w,f]),--et.active||et.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,s,u,c,l,f=et.ajaxSetup({},t),h=f.context||f,p=f.context&&(h.nodeType||h.jquery)?et(h):et.event,d=et.Deferred(),v=et.Callbacks("once memory"),g=f.statusCode||{},m={},y={},x=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!a)for(a={};t=gn.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=y[n]=y[n]||e,m[e]=t),this},overrideMimeType:function(e){return x||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)g[t]=[g[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return r&&r.abort(t),n(0,t),this}};if(d.promise(w).complete=v.add,w.success=w.done,w.error=w.fail,f.url=((e||f.url||pn)+"").replace(dn,"").replace(xn,hn[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=et.trim(f.dataType||"*").toLowerCase().match(pt)||[""],null==f.crossDomain&&(u=bn.exec(f.url.toLowerCase()),f.crossDomain=!(!u||u[1]===hn[1]&&u[2]===hn[2]&&(u[3]||("http:"===u[1]?"80":"443"))===(hn[3]||("http:"===hn[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=et.param(f.data,f.traditional)),_(wn,f,t,w),2===x)return w;c=f.global,c&&0===et.active++&&et.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!yn.test(f.type),i=f.url,f.hasContent||(f.data&&(i=f.url+=(fn.test(i)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=vn.test(i)?i.replace(vn,"$1_="+ln++):i+(fn.test(i)?"&":"?")+"_="+ln++)),f.ifModified&&(et.lastModified[i]&&w.setRequestHeader("If-Modified-Since",et.lastModified[i]),et.etag[i]&&w.setRequestHeader("If-None-Match",et.etag[i])),(f.data&&f.hasContent&&f.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Cn+"; q=0.01":""):f.accepts["*"]);for(l in f.headers)w.setRequestHeader(l,f.headers[l]);if(f.beforeSend&&(f.beforeSend.call(h,w,f)===!1||2===x))return w.abort();b="abort";for(l in{success:1,error:1,complete:1})w[l](f[l]);if(r=_(Tn,f,t,w)){w.readyState=1,c&&p.trigger("ajaxSend",[w,f]),f.async&&f.timeout>0&&(s=setTimeout(function(){w.abort("timeout")},f.timeout));try{x=1,r.send(m,n)}catch(T){if(!(2>x))throw T;n(-1,T)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return et.get(e,t,n,"json")},getScript:function(e,t){return et.get(e,void 0,t,"script")}}),et.each(["get","post"],function(e,t){et[t]=function(e,n,r,i){return et.isFunction(n)&&(i=i||r,r=n,n=void 0),et.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),et.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){et.fn[t]=function(e){return this.on(t,e)}}),et._evalUrl=function(e){return et.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},et.fn.extend({wrapAll:function(e){var t;return et.isFunction(e)?this.each(function(t){et(this).wrapAll(e.call(this,t))}):(this[0]&&(t=et(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return et.isFunction(e)?this.each(function(t){et(this).wrapInner(e.call(this,t))}):this.each(function(){var t=et(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=et.isFunction(e);return this.each(function(n){et(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){et.nodeName(this,"body")||et(this).replaceWith(this.childNodes)}).end()}}),et.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight},et.expr.filters.visible=function(e){return!et.expr.filters.hidden(e)};var En=/%20/g,Sn=/\[\]$/,An=/\r?\n/g,jn=/^(?:submit|button|image|reset|file)$/i,Nn=/^(?:input|select|textarea|keygen)/i;et.param=function(e,t){var n,r=[],i=function(e,t){t=et.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=et.ajaxSettings&&et.ajaxSettings.traditional),et.isArray(e)||e.jquery&&!et.isPlainObject(e))et.each(e,function(){i(this.name,this.value)});else for(n in e)F(n,e[n],t,i);return r.join("&").replace(En,"+")},et.fn.extend({serialize:function(){return et.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=et.prop(this,"elements");return e?et.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!et(this).is(":disabled")&&Nn.test(this.nodeName)&&!jn.test(e)&&(this.checked||!kt.test(e))}).map(function(e,t){var n=et(this).val();return null==n?null:et.isArray(n)?et.map(n,function(e){return{name:t.name,value:e.replace(An,"\r\n")}}):{name:t.name,value:n.replace(An,"\r\n")}}).get()}}),et.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Ln=0,Rn={},qn={0:200,1223:204},Pn=et.ajaxSettings.xhr();e.ActiveXObject&&et(e).on("unload",function(){for(var e in Rn)Rn[e]()}),G.cors=!!Pn&&"withCredentials"in Pn,G.ajax=Pn=!!Pn,et.ajaxTransport(function(e){var t;return G.cors||Pn&&!e.crossDomain?{send:function(n,r){var i,o=e.xhr(),a=++Ln;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)o.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete Rn[a],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?r(o.status,o.statusText):r(qn[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=Rn[a]=t("abort"),o.send(e.hasContent&&e.data||null)},abort:function(){t&&t()}}:void 0}),et.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return et.globalEval(e),e}}}),et.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),et.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=et("<script>").prop({async:!0,charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),J.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Hn=[],In=/(=)\?(?=&|$)|\?\?/;et.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Hn.pop()||et.expando+"_"+ln++;return this[e]=!0,e}}),et.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(In.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&In.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(i=t.jsonpCallback=et.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(In,"$1"+i):t.jsonp!==!1&&(t.url+=(fn.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||et.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Hn.push(i)),a&&et.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),et.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||J;var r=at.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=et.buildFragment([e],t,i),i&&i.length&&et(i).remove(),et.merge([],r.childNodes))};var _n=et.fn.load;et.fn.load=function(e,t,n){if("string"!=typeof e&&_n)return _n.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>=0&&(r=e.slice(s),e=e.slice(0,s)),et.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&et.ajax({url:e,type:i,dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?et("<div>").append(et.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){a.each(n,o||[e.responseText,t,e])}),this},et.expr.filters.animated=function(e){return et.grep(et.timers,function(t){return e===t.elem}).length};var Dn=e.document.documentElement;et.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,c,l=et.css(e,"position"),f=et(e),h={};"static"===l&&(e.style.position="relative"),s=f.offset(),o=et.css(e,"top"),u=et.css(e,"left"),c=("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1,c?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),et.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(h.top=t.top-s.top+a),null!=t.left&&(h.left=t.left-s.left+i),"using"in t?t.using.call(e,h):f.css(h)}},et.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){et.offset.setOffset(this,e,t)});var t,n,r=this[0],i={top:0,left:0},o=r&&r.ownerDocument;if(o)return t=o.documentElement,et.contains(t,r)?(typeof r.getBoundingClientRect!==Et&&(i=r.getBoundingClientRect()),n=U(o),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===et.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),et.nodeName(e[0],"html")||(r=e.offset()),r.top+=et.css(e[0],"borderTopWidth",!0),r.left+=et.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-et.css(n,"marginTop",!0),left:t.left-r.left-et.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Dn;e&&!et.nodeName(e,"html")&&"static"===et.css(e,"position");)e=e.offsetParent;return e||Dn})}}),et.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var r="pageYOffset"===n;et.fn[t]=function(i){return gt(this,function(t,i,o){var a=U(t);return void 0===o?a?a[n]:t[i]:(a?a.scrollTo(r?e.pageXOffset:o,r?o:e.pageYOffset):t[i]=o,void 0)},t,i,arguments.length,null)}}),et.each(["top","left"],function(e,t){et.cssHooks[t]=T(G.pixelPosition,function(e,n){return n?(n=w(e,t),Bt.test(n)?et(e).position()[t]+"px":n):void 0})}),et.each({Height:"height",Width:"width"},function(e,t){et.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){et.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return gt(this,function(t,n,r){var i;return et.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?et.css(t,n,a):et.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),et.fn.size=function(){return this.length},et.fn.andSelf=et.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return et});var On=e.jQuery,Mn=e.$;return et.noConflict=function(t){return e.$===et&&(e.$=Mn),t&&e.jQuery===et&&(e.jQuery=On),et},typeof t===Et&&(e.jQuery=e.$=et),et})},{}],jquery:[function(e,t){t.exports=e("H1ZcUq")},{}]},{},[]),require=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);throw Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;r.length>a;a++)i(r[a]);return i}({1:[function(e,t){var n=t.exports={};n.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.binding=function(){throw Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw Error("process.chdir is not supported")}},{}],2:[function(e,t){(function(e){"use strict";e(function(e){function t(e,t){this.parent=e,this.router=t,this.matches=[],this.prepares={},this.state=this.addRoute,this.states=this.addRoutes}var n=e("./util");return t.prototype={resource:function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r={}),1===arguments.length&&(r={}),"string"!=typeof r.path&&(r.path="/"+e),r.prepare&&(this.prepares[e]=r.prepare),i){var o=new t(e,this.router);i.call(o),this.push(r.path,e,o.generate(),r.queryParams),n.extend(this.prepares,o.prepares)}else this.push(r.path,e,null,r.queryParams)},push:function(e,t,n,r){var i=t.split(".");(""===e||"/"===e||"index"===i[i.length-1])&&(this.explicitIndex=!0),this.matches.push([e,t,n,r])},route:function(e,t){t=t||{},"string"!=typeof t.path&&(t.path="/"+e),this.parent&&"application"!==this.parent&&(e=this.parent+"."+e),t.prepare&&(this.prepares[e]=t.prepare),this.push(t.path,e,null,t.queryParams)},generate:function(){var e=this.matches;return this.explicitIndex||this.route("index",{path:"/"}),function(t){for(var n=0,r=e.length;r>n;n++){var i=e[n];t(i[0]).to(i[1],i[2])}}},addRoute:function(){this.router.addRoute.apply(this.router,arguments)},addRoutes:function(){this.router.addRoutes.apply(this.router,arguments)}},t.map=function(e,n){var r=new t(null,e);return n.call(r),r},t})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{"./util":6}],3:[function(e,t){(function(e){"use strict";e(function(e){function t(e){return function(){return u("cherrytree:",this.route.name+"#"+e),this.route[e].apply(this.route,arguments)}}function n(e){return function(){return this.route&&this.route[e]?(u("cherrytree:",this.route.name+"#"+e),this.route[e].apply(this.route,arguments)):!0}}function r(e,r,a){return{serialize:function(){return this.params},beforeModel:function(t){var n=this;return o.resolve(n.route||r(a)).then(function(r){if(n.route=r,r.needsReactivation=!1,r.refresh=function(){e.router.refresh(n)},"application"!==a&&"loading"!==a){for(var i=t.state.handlerInfos[0],o=1,s=t.state.handlerInfos.length;s>o&&t.state.handlerInfos[o].name!==a;o++)i=t.state.handlerInfos[o];n.route.setParent(i.handler.route)}return u("cherrytree:",n.route.name+"#"+"beforeModel"),n.route.beforeModel.apply(n.route,arguments)})},model:function(e){e=e||{},this.params=JSON.parse(JSON.stringify(e||{})),this.route.needsReactivation=!0,u("cherrytree:",this.route.name+"#"+"model");var t=this.route.model.apply(this.route,arguments),n=this.route;return o.resolve(t).then(function(e){return e=e||{},n.getContext=function(){return e},e})},afterModel:t("afterModel"),enter:t("enter"),setup:t("setup"),exit:t("exit"),events:{willTransition:n("willTransition"),error:n("error"),queryParamsDidChange:n("queryParamsDidChange"),finalizeQueryParamChange:function(e,t){return i.each(e,function(e,n){t.push({value:e,visible:!!e,key:n})}),!0}},refresh:function(){e.router.refresh(this)}}}var i=e("./util"),o=e("../vendor/promise"),a=e("./route_creator"),s=!1,u=function(){s&&console.log.apply(console,arguments)};return function(e){var t={},n=e.routeClasses,i=a(e);return n.loading?(t.loading=r(e,i,"loading"),t.loading.beforeModel()):t.loading={},function(n){return t[n]||(t[n]=r(e,i,n)),t[n]}}})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{"../vendor/promise":11,"./route_creator":5,"./util":6}],4:[function(e,t){(function(e){"use strict";e(function(e){var t=e("./util"),n=function(){},r=function(e,r,i){var o;return o=r&&r.hasOwnProperty("constructor")?r.constructor:function(){return e.apply(this,arguments)},t.extend(o,e),n.prototype=e.prototype,o.prototype=new n,r&&t.extend(o.prototype,r),i&&t.extend(o,i),o.prototype.constructor=o,o.__super__=e.prototype,o};return function(e,t){var n=r(this,e,t);return n.extend=this.extend,n}})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{"./util":6}],5:[function(e,t){(function(e){"use strict";e(function(e){var t=e("../vendor/promise");return function(e){function n(t){var n=r[t]||e.options.BaseRoute;return new n({name:t,router:e})}var r=e.routeClasses,i=e.prepares,o={};return function(r){return!i[r]||o[r]?new t(function(e){return e(n(r))}):new t(function(t){i[r](e,function(){return o[r]=!0,t(n(r))})})}}})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{"../vendor/promise":11}],6:[function(e,t){(function(e){"use strict";e(function(){var e={},t={},n=Array.prototype,r=n.slice,i=n.map,o=n.forEach,a=Object.keys;e.keys=a||function(t){if(t!==Object(t))throw new TypeError("Invalid object");var n=[];for(var r in t)e.has(t,r)&&n.push(r);return n};var s=e.each=function(n,r,i){if(null!==n){var a,s;if(o&&n.forEach===o)n.forEach(r,i);else if(n.length===+n.length){for(a=0,s=n.length;s>a;a++)if(r.call(i,n[a],a,n)===t)return}else{var u=e.keys(n);for(a=0,s=u.length;s>a;a++)if(r.call(i,n[u[a]],u[a],n)===t)return}}};e.map=function(e,t,n){var r=[];return null===e?r:i&&e.map===i?e.map(t,n):(s(e,function(e,i,o){r.push(t.call(n,e,i,o))}),r)},e.extend=function(e){return s(r.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},e.pluck=function(t,n){return e.map(t,function(e){return e[n]})};var u=0;return e.uniqueId=function(e){var t=++u+"";return e?e+t:t},e})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{}],7:[function(e,t){(function(e){"use strict";e(function(){return function(){return{path:"",getURL:function(){return this.path},setURL:function(e){this.path=e},replaceURL:function(e){this.setURL(e)},onChange:function(e){this.changeCallback=e},handleURL:function(e){this.path=e,this.changeCallback&&this.changeCallback(e)},formatURL:function(e){return e}}}})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{}],8:[function(e,t){(function(e){"use strict";e(function(e){var t=e("./lib/util"),n=e("./lib/inherit"),r=function(){},i=function(e){this.name=e.name,this.router=e.router,this.id=t.uniqueId(),this.initialize()};return t.extend(i.prototype,{initialize:r,beforeModel:r,model:r,afterModel:r,activate:r,update:r,deactivate:r,enter:function(){this._setup=0,this.needsReactivation=!1},exit:function(){this.deactivate.apply(this,arguments)},setup:function(){function e(){r.activate.apply(r,i)}function t(){r.exit(),r.activate.apply(r,i)}function n(){return r.parent&&!r.parent.needsReactivation}this._setup+=1;var r=this,i=arguments;return 1===this._setup?e():n()&&this.update&&this.update.apply(this,i)===!1?(r.needsReactivation=!1,void 0):(t(),void 0)},setParent:function(e){this.parent=e},getContext:r,transitionTo:function(){var e=this.router;return e.transitionTo.apply(e,arguments)},replaceWith:function(){var e=this.router;return e.replaceWith.apply(e,arguments)},get:function(e){for(var t,n=this;n;){if(t=n.getContext(),t&&t[e])return t[e];if(n[e])return n[e];n=n.parent}}}),i.extend=n,i})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{"./lib/inherit":4,"./lib/util":6}],cherrytree:[function(e,t){t.exports=e("6CuyLE")},{}],"6CuyLE":[function(e,t){(function(e){"use strict";e(function(e){function t(e,t){if(!t)throw Error("assertion failed: "+e)}function n(e){for(var t=[],n=1,r=e.length;r>n;n++){var i=e[n].name,o=i.split(".");t.push(o[o.length-1])}return t.join(".")}function r(e,t,n){t.getHandler=d(e),t.updateURL=function(e){n.setURL(e)},t.replaceURL=function(e){n.replaceURL(e)},t.didTransition=function(t){e.didTransition(t)}}function i(e,n,r){r=[].slice.call(r),r[0]=r[0]||"/";var i,a=r[0];"/"===a.charAt(0)?i=a:(i=e.router.hasRoute(a)?a:r[0]=a+".index",t("The route "+a+" was not found",e.router.hasRoute(i))),o(e);var s=e.router[n].apply(e.router,r);return s.then(function(){u(e)},function(t){return c(t,e),t}),s}function o(e){e._loadingRouteActive||(e._shouldEnterLoadingRoute=!0,setTimeout(function(){a(e)},1))}function a(e){if(!e._loadingRouteActive&&e._shouldEnterLoadingRoute){var t=e.router.getHandler("loading");t&&(t.model&&t.model(),t.enter&&t.enter(),t.setup&&t.setup(),e._loadingRouteActive=!0)}}function s(e){if(e._shouldEnterLoadingRoute=!1,e._loadingRouteActive){var t=e.router.getHandler("loading");t&&t.exit&&t.exit(),e._loadingRouteActive=!1}}function u(e){s(e),e.options.onURLChanged&&e.options.onURLChanged(e.location.getURL())}function c(e,t){u(t),"TransitionAborted"!==e.name&&console.error(e.stack?e.stack:e)}var l=e("./lib/util"),f=e("./vendor/router"),h=e("./route"),p=e("./lib/dsl"),d=e("./lib/handler_creator"),v=e("./location/none_location"),g=function(e){this.options=l.extend({location:v(),logging:!1,onDidTransition:null,onURLChanged:null,BaseRoute:h},e),this.routeClasses={},this.prepares={},this.options.logging&&(this.log=function(){console&&console.log.apply(console,arguments)}),this.router=new f,this.router.log=this.log};return l.extend(g.prototype,{map:function(e){var t=this.router,n=p.map(this,function(){this.resource("application",{path:"/"},function(){e.call(this)})});return t.map(n.generate()),this.prepares=n.prepares,this},addRoute:function(e,t){this.routeClasses[e]=t},addRoutes:function(e){l.each(e,function(e,t){this.addRoute(t,e)},this)},startRouting:function(){var e=this,t=this.router,n=this.location=this.options.location||v();return r(this,t,n),n.onChange(function(t){e.handleURL(t)}),this.handleURL(n.getURL())},transitionTo:function(){var e=[].slice.call(arguments);return i(this,"transitionTo",e)},replaceWith:function(){var e=[].slice.call(arguments);return i(this,"replaceWith",e)},generate:function(){var e=this.router.generate.apply(this.router,arguments);return this.location.formatURL(e)},isActive:function(){var e=this.router;return e.isActive.apply(e,arguments)},send:function(){this.router.trigger.apply(this.router,arguments)},hasRoute:function(e){return this.router.hasRoute(e)},activeRoutes:function(e){var t=l.pluck(l.pluck(this.router.currentHandlerInfos,"handler"),"route");if(!e)return t;for(var n=0,r=t.length;r>n;n++)if(t[n].name===e)return t[n]},activeRouteNames:function(){return l.pluck(l.pluck(l.pluck(this.router.currentHandlerInfos,"handler"),"route"),"name")},destroy:function(){this.location.destroy&&this.location.destroy()},log:function(){},didTransition:function(e){this.options.onDidTransition&&this.options.onDidTransition(n(e))},handleURL:function(e){o(this);var t=this;return this.router.handleURL(e).then(function(){u(t)},function(e){return c(e,t),e})},reset:function(){this.router.reset()}}),g})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{"./lib/dsl":2,"./lib/handler_creator":3,"./lib/util":6,"./location/none_location":7,"./route":8,"./vendor/router":13}],11:[function(e,t){(function(n){(function(e){"use strict"; | |
var t={};(function(e){var t,r,i,o;(function(){var e={},n={};t=function(t,n,r){e[t]={deps:n,callback:r}},o=i=r=function(t){function i(e){if("."!==e.charAt(0))return e;for(var n=e.split("/"),r=t.split("/").slice(0,-1),i=0,o=n.length;o>i;i++){var a=n[i];if(".."===a)r.pop();else{if("."===a)continue;r.push(a)}}return r.join("/")}if(o._eak_seen=e,n[t])return n[t];if(n[t]={},!e[t])throw Error("Could not find module "+t);for(var a,s=e[t],u=s.deps,c=s.callback,l=[],f=0,h=u.length;h>f;f++)"exports"===u[f]?l.push(a={}):l.push(r(i(u[f])));var p=c.apply(this,l);return n[t]=a||p}})(),t("rsvp/all",["./promise","exports"],function(e,t){var n=e["default"];t["default"]=function(e,t){return n.all(e,t)}}),t("rsvp/all_settled",["./promise","./utils","exports"],function(e,t,n){function r(e){return{state:"fulfilled",value:e}}function i(e){return{state:"rejected",reason:e}}var o=e["default"],a=t.isArray,s=t.isNonThenable;n["default"]=function(e,t){return new o(function(t){function n(e){return function(t){c(e,r(t))}}function u(e){return function(t){c(e,i(t))}}function c(e,n){h[e]=n,0===--f&&t(h)}if(!a(e))throw new TypeError("You must pass an array to allSettled.");var l,f=e.length;if(0===f)return t([]),void 0;for(var h=Array(f),p=0;e.length>p;p++)l=e[p],s(l)?c(p,r(l)):o.cast(l).then(n(p),u(p))},t)}}),t("rsvp/asap",["exports"],function(e){function t(){return function(){n.nextTick(o)}}function r(){var e=0,t=new u(o),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function i(){return function(){setTimeout(o,1)}}function o(){for(var e=0;c.length>e;e++){var t=c[e],n=t[0],r=t[1];n(r)}c=[]}e["default"]=function(e,t){var n=c.push([e,t]);1===n&&a()};var a,s="undefined"!=typeof window?window:{},u=s.MutationObserver||s.WebKitMutationObserver,c=[];a=n!==void 0&&"[object process]"==={}.toString.call(n)?t():u?r():i()}),t("rsvp/config",["./events","exports"],function(e,t){function n(e,t){return"onerror"===e?(i.on("error",t),void 0):2!==arguments.length?i[e]:(i[e]=t,void 0)}var r=e["default"],i={instrument:!1};r.mixin(i),t.config=i,t.configure=n}),t("rsvp/defer",["./promise","exports"],function(e,t){var n=e["default"];t["default"]=function(e){var t={};return t.promise=new n(function(e,n){t.resolve=e,t.reject=n},e),t}}),t("rsvp/events",["exports"],function(e){var t=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},n=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t};e["default"]={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,r){var i,o=n(this);i=o[e],i||(i=o[e]=[]),-1===t(i,r)&&i.push(r)},off:function(e,r){var i,o,a=n(this);return r?(i=a[e],o=t(i,r),-1!==o&&i.splice(o,1),void 0):(a[e]=[],void 0)},trigger:function(e,t){var r,i,o=n(this);if(r=o[e])for(var a=0;r.length>a;a++)i=r[a],i(t)}}}),t("rsvp/filter",["./all","./map","./utils","exports"],function(e,t,n,r){function i(e,t,n){if(!u(e))throw new TypeError("You must pass an array to filter.");if(!s(t))throw new TypeError("You must pass a function to filter's second argument.");return o(e,n).then(function(r){return a(e,t,n).then(function(e){var t,n=r.length,i=[];for(t=0;n>t;t++)e[t]&&i.push(r[t]);return i})})}var o=e["default"],a=t["default"],s=n.isFunction,u=n.isArray;r["default"]=i}),t("rsvp/hash",["./promise","./utils","exports"],function(e,t,n){var r=e["default"],i=t.isNonThenable,o=t.keysOf;n["default"]=function(e){return new r(function(t,n){function a(e){return function(n){l[e]=n,0===--h&&t(l)}}function s(e){h=0,n(e)}var u,c,l={},f=o(e),h=f.length;if(0===h)return t(l),void 0;for(var p=0;f.length>p;p++)c=f[p],u=e[c],i(u)?(l[c]=u,0===--h&&t(l)):r.cast(u).then(a(c),s)})}}),t("rsvp/instrument",["./config","./utils","exports"],function(e,t,n){var r=e.config,i=t.now;n["default"]=function(e,t,n){try{r.trigger(e,{guid:t._guidKey+t._id,eventName:e,detail:t._detail,childGuid:n&&t._guidKey+n._id,label:t._label,timeStamp:i(),stack:Error(t._label).stack})}catch(o){setTimeout(function(){throw o},0)}}}),t("rsvp/map",["./promise","./all","./utils","exports"],function(e,t,n,r){e["default"];var i=t["default"],o=n.isArray,a=n.isFunction;r["default"]=function(e,t,n){if(!o(e))throw new TypeError("You must pass an array to map.");if(!a(t))throw new TypeError("You must pass a function to map's second argument.");return i(e,n).then(function(e){var r,o=e.length,a=[];for(r=0;o>r;r++)a.push(t(e[r]));return i(a,n)})}}),t("rsvp/node",["./promise","exports"],function(e,t){function n(e,t){return function(n,r){n?t(n):arguments.length>2?e(i.call(arguments,1)):e(r)}}var r=e["default"],i=Array.prototype.slice;t["default"]=function(e,t){return function(){var o=i.call(arguments),a=this||t;return new r(function(t,i){r.all(o).then(function(r){try{r.push(n(t,i)),e.apply(a,r)}catch(o){i(o)}})})}}}),t("rsvp/promise",["./config","./events","./instrument","./utils","./promise/cast","./promise/all","./promise/race","./promise/resolve","./promise/reject","exports"],function(e,t,n,r,i,o,a,s,u,c){function l(){}function f(e,t){if(!E(e))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof f))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._id=P++,this._label=t,this._subscribers=[],T.instrument&&C("created",this),l!==e&&h(e,this)}function h(e,t){function n(e){m(t,e)}function r(e){x(t,e)}try{e(n,r)}catch(i){r(i)}}function p(e,t,n,r){var i=e._subscribers,o=i.length;i[o]=t,i[o+_]=n,i[o+D]=r}function d(e,t){var n,r,i=e._subscribers,o=e._detail;T.instrument&&C(t===_?"fulfilled":"rejected",e);for(var a=0;i.length>a;a+=3)n=i[a],r=i[a+t],v(t,n,r,o);e._subscribers=null}function v(e,t,n,r){var i,o,a,s,u=E(n);if(u)try{i=n(r),a=!0}catch(c){s=!0,o=c}else i=r,a=!0;g(t,i)||(u&&a?m(t,i):s?x(t,o):e===_?m(t,i):e===D&&x(t,i))}function g(e,t){var n,r=null;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(k(t)&&(r=t.then,E(r)))return r.call(t,function(r){return n?!0:(n=!0,t!==r?m(e,r):y(e,r),void 0)},function(t){return n?!0:(n=!0,x(e,t),void 0)},"derived from: "+(e._label||" unknown promise")),!0}catch(i){return n?!0:(x(e,i),!0)}return!1}function m(e,t){e===t?y(e,t):g(e,t)||y(e,t)}function y(e,t){e._state===H&&(e._state=I,e._detail=t,T.async(b,e))}function x(e,t){e._state===H&&(e._state=I,e._detail=t,T.async(w,e))}function b(e){d(e,e._state=_)}function w(e){e._onerror&&e._onerror(e._detail),d(e,e._state=D)}var T=e.config;t["default"];var C=n["default"],k=r.objectOrFunction,E=r.isFunction,S=r.now,A=i["default"],j=o["default"],N=a["default"],L=s["default"],R=u["default"],q="rsvp_"+S()+"-",P=0;c["default"]=f,f.cast=A,f.all=j,f.race=N,f.resolve=L,f.reject=R;var H=void 0,I=0,_=1,D=2;f.prototype={constructor:f,_id:void 0,_guidKey:q,_label:void 0,_state:void 0,_detail:void 0,_subscribers:void 0,_onerror:function(e){T.trigger("error",e)},then:function(e,t,n){var r=this;this._onerror=null;var i=new this.constructor(l,n);if(this._state){var o=arguments;T.async(function(){v(r._state,i,o[r._state-1],r._detail)})}else p(this,i,e,t);return T.instrument&&C("chained",r,i),i},"catch":function(e,t){return this.then(null,e,t)},"finally":function(e,t){var n=this.constructor;return this.then(function(t){return n.cast(e()).then(function(){return t})},function(t){return n.cast(e()).then(function(){throw t})},t)}}}),t("rsvp/promise/all",["../utils","exports"],function(e,t){var n=e.isArray,r=e.isNonThenable;t["default"]=function(e,t){var i=this;return new i(function(t,o){function a(e){return function(n){l[e]=n,0===--c&&t(l)}}function s(e){c=0,o(e)}if(!n(e))throw new TypeError("You must pass an array to all.");var u,c=e.length,l=Array(c);if(0===c)return t(l),void 0;for(var f=0;e.length>f;f++)u=e[f],r(u)?(l[f]=u,0===--c&&t(l)):i.cast(u).then(a(f),s)},t)}}),t("rsvp/promise/cast",["exports"],function(e){e["default"]=function(e,t){var n=this;return e&&"object"==typeof e&&e.constructor===n?e:new n(function(t){t(e)},t)}}),t("rsvp/promise/race",["../utils","exports"],function(e,t){var n=e.isArray;e.isFunction;var r=e.isNonThenable;t["default"]=function(e,t){var i,o=this;return new o(function(t,a){function s(e){c&&(c=!1,t(e))}function u(e){c&&(c=!1,a(e))}if(!n(e))throw new TypeError("You must pass an array to race.");for(var c=!0,l=0;e.length>l;l++){if(i=e[l],r(i))return c=!1,t(i),void 0;o.cast(i).then(s,u)}},t)}}),t("rsvp/promise/reject",["exports"],function(e){e["default"]=function(e,t){var n=this;return new n(function(t,n){n(e)},t)}}),t("rsvp/promise/resolve",["exports"],function(e){e["default"]=function(e,t){var n=this;return new n(function(t){t(e)},t)}}),t("rsvp/race",["./promise","exports"],function(e,t){var n=e["default"];t["default"]=function(e,t){return n.race(e,t)}}),t("rsvp/reject",["./promise","exports"],function(e,t){var n=e["default"];t["default"]=function(e,t){return n.reject(e,t)}}),t("rsvp/resolve",["./promise","exports"],function(e,t){var n=e["default"];t["default"]=function(e,t){return n.resolve(e,t)}}),t("rsvp/rethrow",["exports"],function(e){e["default"]=function(e){throw setTimeout(function(){throw e}),e}}),t("rsvp/utils",["exports"],function(e){function t(e){return"function"==typeof e||"object"==typeof e&&null!==e}function n(e){return"function"==typeof e}function r(e){return!t(e)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}e.objectOrFunction=t,e.isFunction=n,e.isNonThenable=r,e.isArray=i;var o=Date.now||function(){return(new Date).getTime()};e.now=o;var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.keysOf=a}),t("rsvp",["./rsvp/promise","./rsvp/events","./rsvp/node","./rsvp/all","./rsvp/all_settled","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/map","./rsvp/resolve","./rsvp/reject","./rsvp/asap","./rsvp/filter","exports"],function(e,t,n,r,i,o,a,s,u,c,l,f,h,p,d,v){function g(e,t){j.async(e,t)}function m(){j.on.apply(j,arguments)}function y(){j.off.apply(j,arguments)}var x=e["default"],b=t["default"],w=n["default"],T=r["default"],C=i["default"],k=o["default"],E=a["default"],S=s["default"],A=u["default"],j=c.config,N=c.configure,L=l["default"],R=f["default"],q=h["default"],P=p["default"],H=d["default"];if(j.async=P,"undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){var I=window.__PROMISE_INSTRUMENTATION__;N("instrument",!0);for(var _ in I)I.hasOwnProperty(_)&&m(_,I[_])}v.Promise=x,v.EventTarget=b,v.all=T,v.allSettled=C,v.race=k,v.hash=E,v.rethrow=S,v.defer=A,v.denodeify=w,v.configure=N,v.on=m,v.off=y,v.resolve=R,v.reject=q,v.async=g,v.map=L,v.filter=H}),e.RSVP=r("rsvp")})(t),e(function(){return t.RSVP.Promise})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})}).call(this,e("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":1}],12:[function(e,t){(function(e){"use strict";e(function(){return function(){function e(e){return"[object Array]"===Object.prototype.toString.call(e)}function t(e){this.string=e}function n(e){this.name=e}function r(e){this.name=e}function i(){}function o(e,o,a){"/"===e.charAt(0)&&(e=e.substr(1));for(var s=e.split("/"),u=[],c=0,l=s.length;l>c;c++){var f,h=s[c];(f=h.match(/^:([^\/]+)$/))?(u.push(new n(f[1])),o.push(f[1]),a.dynamics++):(f=h.match(/^\*([^\/]+)$/))?(u.push(new r(f[1])),o.push(f[1]),a.stars++):""===h?u.push(new i):(u.push(new t(h)),a.statics++)}return u}function a(e){this.charSpec=e,this.nextStates=[]}function s(e){return e.sort(function(e,t){if(e.types.stars!==t.types.stars)return e.types.stars-t.types.stars;if(e.types.stars){if(e.types.statics!==t.types.statics)return t.types.statics-e.types.statics;if(e.types.dynamics!==t.types.dynamics)return t.types.dynamics-e.types.dynamics}return e.types.dynamics!==t.types.dynamics?e.types.dynamics-t.types.dynamics:e.types.statics!==t.types.statics?t.types.statics-e.types.statics:0})}function u(e,t){for(var n=[],r=0,i=e.length;i>r;r++){var o=e[r];n=n.concat(o.match(t))}return n}function c(e){this.queryParams=e||{}}function l(e,t,n){for(var r=e.handlers,i=e.regex,o=t.match(i),a=1,s=new c(n),u=0,l=r.length;l>u;u++){for(var f=r[u],h=f.names,p={},d=0,v=h.length;v>d;d++)p[h[d]]=o[a++];s.push({handler:f.handler,params:p,isDynamic:!!h.length})}return s}function f(e,t){return t.eachChar(function(t){e=e.put(t)}),e}function h(e,t,n){this.path=e,this.matcher=t,this.delegate=n}function p(e){this.routes={},this.children={},this.target=e}function d(e,t,n){return function(r,i){var o=e+r;return i?(i(d(o,t,n)),void 0):new h(e+r,t,n)}}function v(e,t,n){for(var r=0,i=0,o=e.length;o>i;i++)r+=e[i].path.length;t=t.substr(r);var a={path:t,handler:n};e.push(a)}function g(e,t,n,r){var i=t.routes;for(var o in i)if(i.hasOwnProperty(o)){var a=e.slice();v(a,o,i[o]),t.children[o]?g(a,t.children[o],n,r):n.call(r,a)}}var m=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],y=RegExp("(\\"+m.join("|\\")+")","g");t.prototype={eachChar:function(e){for(var t,n=this.string,r=0,i=n.length;i>r;r++)t=n.charAt(r),e({validChars:t})},regex:function(){return this.string.replace(y,"\\$1")},generate:function(){return this.string}},n.prototype={eachChar:function(e){e({invalidChars:"/",repeat:!0})},regex:function(){return"([^/]+)"},generate:function(e){return e[this.name]}},r.prototype={eachChar:function(e){e({invalidChars:"",repeat:!0})},regex:function(){return"(.+)"},generate:function(e){return e[this.name]}},i.prototype={eachChar:function(){},regex:function(){return""},generate:function(){return""}},a.prototype={get:function(e){for(var t=this.nextStates,n=0,r=t.length;r>n;n++){var i=t[n],o=i.charSpec.validChars===e.validChars;if(o=o&&i.charSpec.invalidChars===e.invalidChars)return i}},put:function(e){var t;return(t=this.get(e))?t:(t=new a(e),this.nextStates.push(t),e.repeat&&t.nextStates.push(t),t)},match:function(e){for(var t,n,r,i=this.nextStates,o=[],a=0,s=i.length;s>a;a++)t=i[a],n=t.charSpec,(r=n.validChars)!==void 0?-1!==r.indexOf(e)&&o.push(t):(r=n.invalidChars)!==void 0&&-1===r.indexOf(e)&&o.push(t);return o}};var x=Object.create||function(e){function t(){}return t.prototype=e,new t};c.prototype=x({splice:Array.prototype.splice,slice:Array.prototype.slice,push:Array.prototype.push,length:0,queryParams:null});var b=function(){this.rootState=new a,this.names={}};return b.prototype={add:function(e,t){for(var n,r=this.rootState,a="^",s={statics:0,dynamics:0,stars:0},u=[],c=[],l=!0,h=0,p=e.length;p>h;h++){var d=e[h],v=[],g=o(d.path,v,s);c=c.concat(g);for(var m=0,y=g.length;y>m;m++){var x=g[m];x instanceof i||(l=!1,r=r.put({validChars:"/"}),a+="/",r=f(r,x),a+=x.regex())}var b={handler:d.handler,names:v};u.push(b)}l&&(r=r.put({validChars:"/"}),a+="/"),r.handlers=u,r.regex=RegExp(a+"$"),r.types=s,(n=t&&t.as)&&(this.names[n]={segments:c,handlers:u})},handlersFor:function(e){var t=this.names[e],n=[];if(!t)throw Error("There is no route named "+e);for(var r=0,i=t.handlers.length;i>r;r++)n.push(t.handlers[r]);return n},hasRoute:function(e){return!!this.names[e]},generate:function(e,t){var n=this.names[e],r="";if(!n)throw Error("There is no route named "+e);for(var o=n.segments,a=0,s=o.length;s>a;a++){var u=o[a];u instanceof i||(r+="/",r+=u.generate(t))}return"/"!==r.charAt(0)&&(r="/"+r),t&&t.queryParams&&(r+=this.generateQueryString(t.queryParams,n.handlers)),r},generateQueryString:function(t){var n=[],r=[];for(var i in t)t.hasOwnProperty(i)&&r.push(i);r.sort();for(var o=0,a=r.length;a>o;o++){i=r[o];var s=t[i];if(null!=s){var u=i;if(e(s))for(var c=0,l=s.length;l>c;c++){var f=i+"[]"+"="+encodeURIComponent(s[c]);n.push(f)}else u+="="+encodeURIComponent(s),n.push(u)}}return 0===n.length?"":"?"+n.join("&")},parseQueryString:function(e){for(var t=e.split("&"),n={},r=0;t.length>r;r++){var i,o=t[r].split("="),a=decodeURIComponent(o[0]),s=a.length,u=!1;1===o.length?i="true":(s>2&&"[]"===a.slice(s-2)&&(u=!0,a=a.slice(0,s-2),n[a]||(n[a]=[])),i=o[1]?decodeURIComponent(o[1]):""),u?n[a].push(i):n[a]=decodeURIComponent(i)}return n},recognize:function(e){var t,n,r,i,o=[this.rootState],a={},c=!1;if(e=decodeURI(e),i=e.indexOf("?"),-1!==i){var f=e.substr(i+1,e.length);e=e.substr(0,i),a=this.parseQueryString(f)}for("/"!==e.charAt(0)&&(e="/"+e),t=e.length,t>1&&"/"===e.charAt(t-1)&&(e=e.substr(0,t-1),c=!0),n=0,r=e.length;r>n&&(o=u(o,e.charAt(n)),o.length);n++);var h=[];for(n=0,r=o.length;r>n;n++)o[n].handlers&&h.push(o[n]);o=s(h);var p=h[0];return p&&p.handlers?(c&&"(.+)$"===p.regex.source.slice(-5)&&(e+="/"),l(p,e,a)):void 0}},h.prototype={to:function(e,t){var n=this.delegate;if(n&&n.willAddRoute&&(e=n.willAddRoute(this.matcher.target,e)),this.matcher.add(this.path,e),t){if(0===t.length)throw Error("You must have an argument in the function passed to `to`");this.matcher.addChild(this.path,e,t,this.delegate)}return this}},p.prototype={add:function(e,t){this.routes[e]=t},addChild:function(e,t,n,r){var i=new p(t);this.children[e]=i;var o=d(e,i,r);r&&r.contextEntered&&r.contextEntered(t,o),n(o)}},b.prototype.map=function(e,t){var n=new p;e(d("",n,this.delegate)),g([],n,function(e){t?t(this,e):this.add(e)},this)},b}(window)})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{}],13:[function(e,t){(function(e){"use strict";e(function(e){return function(e,t,n){var r,i,o,a;return function(){var e={},t={};r=function(t,n,r){e[t]={deps:n,callback:r}},a=o=i=function(n){function r(e){if("."!==e.charAt(0))return e;for(var t=e.split("/"),r=n.split("/").slice(0,-1),i=0,o=t.length;o>i;i++){var a=t[i];if(".."===a)r.pop();else{if("."===a)continue;r.push(a)}}return r.join("/")}if(t[n])return t[n];if(t[n]={},!e[n])throw Error("Could not find module "+n);for(var o,a=e[n],s=a.deps,u=a.callback,c=[],l=0,f=s.length;f>l;l++)"exports"===s[l]?c.push(o={}):c.push(i(r(s[l])));var h=u.apply(this,c);return t[n]=o||h}}(),r("router/handler-info",["./utils","rsvp/promise","exports"],function(e,t,n){function r(e){e&&c(this,e)}function i(e){r.call(this,e)}function o(e){r.call(this,e),this.params=this.params||{}}function a(e){r.call(this,e)}function s(e,t){if(!e^!t)return!1;if(!e)return!0;for(var n in e)if(e.hasOwnProperty(n)&&e[n]!==t[n])return!1;return!0}var u=e.bind,c=e.merge,l=e.oCreate,f=e.serialize,h=e.promiseLabel,p=t["default"];r.prototype={name:null,handler:null,params:null,context:null,log:function(e,t){e.log&&e.log(this.name+": "+t)},promiseLabel:function(e){return h("'"+this.name+"' "+e)},getUnresolved:function(){return this},resolve:function(e,t,n){var r=u(this.checkForAbort,this,t),i=u(this.runBeforeModelHook,this,e,n),o=u(this.getModel,this,e,n),a=u(this.runAfterModelHook,this,e,n),s=u(this.becomeResolved,this,n);return p.resolve(void 0,this.promiseLabel("Start handler")).then(r,null,this.promiseLabel("Check for abort")).then(i,null,this.promiseLabel("Before model")).then(r,null,this.promiseLabel("Check if aborted during 'beforeModel' hook")).then(o,null,this.promiseLabel("Model")).then(r,null,this.promiseLabel("Check if aborted in 'model' hook")).then(a,null,this.promiseLabel("After model")).then(r,null,this.promiseLabel("Check if aborted in 'afterModel' hook")).then(s,null,this.promiseLabel("Become resolved"))},runBeforeModelHook:function(e,t){return t.trigger&&t.trigger(!0,"willResolveModel",t,this.handler),this.runSharedModelHook(e,t,"beforeModel",[])},runAfterModelHook:function(e,t,n){var r=this.name;return this.stashResolvedModel(t,n),this.runSharedModelHook(e,t,"afterModel",[n]).then(function(){return t.resolvedModels[r]},null,this.promiseLabel("Ignore fulfillment value and return model value"))},runSharedModelHook:function(e,t,n,r){this.log(t,"calling "+n+" hook"),this.queryParams&&r.push(this.queryParams),r.push(t);var i=this.handler;return e(function(){return i[n]&&i[n].apply(i,r)},this.promiseLabel("Handle "+n))},getModel:function(){throw Error("This should be overridden by a subclass of HandlerInfo")},checkForAbort:function(e,t){return p.resolve(e(),this.promiseLabel("Check for abort")).then(function(){return t},null,this.promiseLabel("Ignore fulfillment value and continue"))},stashResolvedModel:function(e,t){e.resolvedModels=e.resolvedModels||{},e.resolvedModels[this.name]=t},becomeResolved:function(e,t){var n=this.params||f(this.handler,t,this.names);return e&&(this.stashResolvedModel(e,t),e.params=e.params||{},e.params[this.name]=n),new i({context:t,name:this.name,handler:this.handler,params:n})},shouldSupercede:function(e){if(!e)return!0;var t=e.context===this.context;return e.name!==this.name||this.hasOwnProperty("context")&&!t||this.hasOwnProperty("params")&&!s(this.params,e.params)}},i.prototype=l(r.prototype),i.prototype.resolve=function(e,t,n){return n&&n.resolvedModels&&(n.resolvedModels[this.name]=this.context),p.resolve(this,this.promiseLabel("Resolve"))},i.prototype.getUnresolved=function(){return new o({name:this.name,handler:this.handler,params:this.params})},o.prototype=l(r.prototype),o.prototype.getModel=function(e,t){var n=this.params;t&&t.queryParams&&(n={},c(n,this.params),n.queryParams=t.queryParams);var r="function"==typeof this.handler.deserialize?"deserialize":"model";return this.runSharedModelHook(e,t,r,[n])},a.prototype=l(r.prototype),a.prototype.getModel=function(e,t){return this.log(t,this.name+": resolving provided model"),p.resolve(this.context)},n.HandlerInfo=r,n.ResolvedHandlerInfo=i,n.UnresolvedHandlerInfoByParam=o,n.UnresolvedHandlerInfoByObject=a}),r("router/router",["route-recognizer","rsvp/promise","./utils","./transition-state","./transition","./transition-intent/named-transition-intent","./transition-intent/url-transition-intent","exports"],function(e,t,n,r,i,o,a,s){function u(){this.recognizer=new m,this.reset()}function c(e,t,n){var r=f(e.state,t);T(r.exited,function(e){var t=e.handler;delete t.context,t.exit&&t.exit()});var i=e.oldState=e.state;e.state=t;var o=e.currentHandlerInfos=r.unchanged.slice();try{T(r.updatedContext,function(e){return l(o,e,!1,n)}),T(r.entered,function(e){return l(o,e,!0,n)})}catch(a){throw e.state=i,e.currentHandlerInfos=i.handlerInfos,a}e.state.queryParams=g(e,o,t.queryParams,n)}function l(e,t,n,r){var i=t.handler,o=t.context;if(n&&i.enter&&i.enter(r),r&&r.isAborted)throw new R;if(i.context=o,i.contextDidChange&&i.contextDidChange(),i.setup&&i.setup(o,r),r&&r.isAborted)throw new R;return e.push(t),!0}function f(e,t){var n,r,i,o,a,s=e.handlerInfos,u=t.handlerInfos,c={updatedContext:[],exited:[],entered:[],unchanged:[]};for(o=0,a=u.length;a>o;o++){var l=s[o],f=u[o];l&&l.handler===f.handler||(n=!0),n?(c.entered.push(f),l&&c.exited.unshift(l)):r||l.context!==f.context||i?(r=!0,c.updatedContext.push(f)):c.unchanged.push(l)}for(o=u.length,a=s.length;a>o;o++)c.exited.unshift(s[o]);return c}function h(e,t){var n=e.urlMethod;if(n){for(var r=e.router,i=t.handlerInfos,o=i[i.length-1].name,a={},s=i.length-1;s>=0;--s){var u=i[s];C(a,u.params),u.handler.inaccessibleByURL&&(n=null)}if(n){a.queryParams=e._visibleQueryParams||t.queryParams;var c=r.recognizer.generate(o,a);"replace"===n?r.replaceURL(c):r.updateURL(c)}}}function p(e,t){try{b(e.router,e.sequence,"Resolved all models on destination route; finalizing transition.");var n=e.router,r=t.handlerInfos;return e.sequence,c(n,t,e),e.isAborted?(n.state.handlerInfos=n.currentHandlerInfos,y.reject(N(e))):(h(e,t,e.intent.url),e.isActive=!1,n.activeTransition=null,x(n,n.currentHandlerInfos,!0,["didTransition"]),n.didTransition&&n.didTransition(n.currentHandlerInfos),b(n,e.sequence,"TRANSITION COMPLETE."),r[r.length-1].handler)}catch(i){if(!(i instanceof R)){var o=e.state.handlerInfos;e.trigger(!0,"error",i,e,o[o.length-1].handler),e.abort()}throw i}}function d(e,t,n){var r=t[0]||"/",i=t[t.length-1],o={};i&&i.hasOwnProperty("queryParams")&&(o=H.call(t).queryParams);var a;if(0===t.length){b(e,"Updating query params");var s=e.state.handlerInfos;a=new q({name:s[s.length-1].name,contexts:[],queryParams:o})}else"/"===r.charAt(0)?(b(e,"Attempting URL transition to "+r),a=new P({url:r})):(b(e,"Attempting transition to "+r),a=new q({name:t[0],contexts:w.call(t,1),queryParams:o}));return e.transitionByIntent(a,n)}function v(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;r>n;++n)if(e[n]!==t[n])return!1;return!0}function g(e,t,n,r){for(var i in n)n.hasOwnProperty(i)&&null===n[i]&&delete n[i];var o=[];x(e,t,!0,["finalizeQueryParamChange",n,o,r]),r&&(r._visibleQueryParams={});for(var a={},s=0,u=o.length;u>s;++s){var c=o[s];a[c.key]=c.value,r&&c.visible!==!1&&(r._visibleQueryParams[c.key]=c.value)}return a}var m=e,y=t["default"],x=n.trigger,b=n.log,w=n.slice,T=n.forEach,C=n.merge,k=n.serialize,E=n.extractQueryParams,S=n.getChangelist,A=n.promiseLabel,j=r["default"],N=i.logAbort,L=i.Transition,R=i.TransitionAborted,q=o["default"],P=a["default"],H=Array.prototype.pop;u.prototype={map:function(e){this.recognizer.delegate=this.delegate,this.recognizer.map(e,function(e,t){for(var n=t.length-1,r=!0;n>=0&&r;--n){var i=t[n];e.add(t,{as:i.handler}),r="/"===i.path||""===i.path||".index"===i.handler.slice(-6)}})},hasRoute:function(e){return this.recognizer.hasRoute(e)},transitionByIntent:function(e,t){var n,r=!!this.activeTransition,i=r?this.activeTransition.state:this.state,o=this;try{var a=e.applyToState(i,this.recognizer,this.getHandler,t);if(v(a.handlerInfos,i.handlerInfos)){var s=S(i.queryParams,a.queryParams);if(s){this._changedQueryParams=s.changed;for(var u in s.removed)s.removed.hasOwnProperty(u)&&(this._changedQueryParams[u]=null);return x(this,a.handlerInfos,!0,["queryParamsDidChange",s.changed,s.all,s.removed]),this._changedQueryParams=null,!r&&this.activeTransition?this.activeTransition:(n=new L(this),i.queryParams=g(this,a.handlerInfos,a.queryParams,n),n.promise=n.promise.then(function(e){return h(n,i,!0),o.didTransition&&o.didTransition(o.currentHandlerInfos),e},null,A("Transition complete")),n)}return new L(this)}return t?(c(this,a),void 0):(n=new L(this,e,a),this.activeTransition&&this.activeTransition.abort(),this.activeTransition=n,n.promise=n.promise.then(function(e){return o.async(function(){return p(n,e.state)},"Finalize transition")},null,A("Settle transition promise when transition is finalized")),r||x(this,this.state.handlerInfos,!0,["willTransition",n]),n)}catch(l){return new L(this,e,null,l)}},reset:function(){this.state&&T(this.state.handlerInfos,function(e){var t=e.handler;t.exit&&t.exit()}),this.state=new j,this.currentHandlerInfos=null},activeTransition:null,handleURL:function(e){var t=w.call(arguments);return"/"!==e.charAt(0)&&(t[0]="/"+e),d(this,t).method(null)},updateURL:function(){throw Error("updateURL is not implemented")},replaceURL:function(e){this.updateURL(e)},transitionTo:function(){return d(this,arguments)},intermediateTransitionTo:function(){d(this,arguments,!0)},refresh:function(e){for(var t=this.activeTransition?this.activeTransition.state:this.state,n=t.handlerInfos,r={},i=0,o=n.length;o>i;++i){var a=n[i];r[a.name]=a.params||{}}b(this,"Starting a refresh transition");var s=new q({name:n[n.length-1].name,pivotHandler:e||n[0].handler,contexts:[],queryParams:this._changedQueryParams||t.queryParams||{}});return this.transitionByIntent(s,!1)},replaceWith:function(){return d(this,arguments).method("replace")},generate:function(e){for(var t=E(w.call(arguments,1)),n=t[0],r=t[1],i=new q({name:e,contexts:n}),o=i.applyToState(this.state,this.recognizer,this.getHandler),a={},s=0,u=o.handlerInfos.length;u>s;++s){var c=o.handlerInfos[s],l=c.params||k(c.handler,c.context,c.names);C(a,l)}return a.queryParams=r,this.recognizer.generate(e,a)},isActive:function(e){var t,n,r=E(w.call(arguments,1)),i=r[0],o=r[1],a=this.state.queryParams,s=this.state.handlerInfos;if(!s.length)return!1;var u=s[s.length-1].name,c=this.recognizer.handlersFor(u),l=0;for(n=c.length;n>l&&(t=s[l],t.name!==e);++l);if(l===c.length)return!1;var f=new j;f.handlerInfos=s.slice(0,l+1),c=c.slice(0,l+1);var h=new q({name:u,contexts:i}),p=h.applyToHandlers(f,c,this.getHandler,u,!0,!0),d={};C(d,o);for(var g in a)a.hasOwnProperty(g)&&d.hasOwnProperty(g)&&(d[g]=a[g]);return v(p.handlerInfos,f.handlerInfos)&&!S(d,o)},trigger:function(){var e=w.call(arguments);x(this,this.currentHandlerInfos,!1,e)},async:function(e,t){return new y(function(t){t(e())},t)},log:null},s["default"]=u}),r("router/transition-intent",["./utils","exports"],function(e,t){function n(e){e&&r(this,e),this.data=this.data||{}}var r=e.merge;n.prototype.applyToState=function(e){return e},t["default"]=n}),r("router/transition-intent/named-transition-intent",["../transition-intent","../transition-state","../handler-info","../utils","exports"],function(e,t,n,r,i){function o(e){a.call(this,e)}var a=e["default"],s=t["default"],u=n.UnresolvedHandlerInfoByParam,c=n.UnresolvedHandlerInfoByObject,l=r.isParam;r.forEach;var f=r.extractQueryParams,h=r.oCreate,p=r.merge;o.prototype=h(a.prototype),o.prototype.applyToState=function(e,t,n,r){var i=f([this.name].concat(this.contexts)),o=i[0],a=(i[1],t.handlersFor(o[0])),s=a[a.length-1].handler;return this.applyToHandlers(e,a,n,s,r)},o.prototype.applyToHandlers=function(e,t,n,r,i,o){var a,u=new s,c=this.contexts.slice(0),l=t.length;if(this.pivotHandler)for(a=0;t.length>a;++a)if(n(t[a].handler)===this.pivotHandler){l=a;break}for(!this.pivotHandler,a=t.length-1;a>=0;--a){var f=t[a],h=f.handler,d=n(h),v=e.handlerInfos[a],g=null;if(g=f.names.length>0?a>=l?this.createParamHandlerInfo(h,d,f.names,c,v):this.getHandlerInfoForDynamicSegment(h,d,f.names,c,v,r):this.createParamHandlerInfo(h,d,f.names,c,v),o){g=g.becomeResolved(null,g.context);var m=v&&v.context;f.names.length>0&&g.context===m&&(g.params=v&&v.params),g.context=m}var y=v;(a>=l||g.shouldSupercede(v))&&(l=Math.min(a,l),y=g),i&&!o&&(y=y.becomeResolved(null,y.context)),u.handlerInfos.unshift(y)}if(c.length>0)throw Error("More context objects were passed than there are dynamic segments for the route: "+r);return i||this.invalidateChildren(u.handlerInfos,l),p(u.queryParams,e.queryParams),p(u.queryParams,this.queryParams||{}),u},o.prototype.invalidateChildren=function(e,t){for(var n=t,r=e.length;r>n;++n)e[n],e[n]=e[n].getUnresolved()},o.prototype.getHandlerInfoForDynamicSegment=function(e,t,n,r,i){n.length;var o;return r.length>0?(o=r[r.length-1],l(o)?this.createParamHandlerInfo(e,t,n,r,i):(r.pop(),new c({name:e,handler:t,context:o,names:n}))):i&&i.name===e?i:i},o.prototype.createParamHandlerInfo=function(e,t,n,r,i){for(var o={},a=n.length;a--;){var s=i&&e===i.name&&i.params||{},c=r[r.length-1],f=n[a];if(l(c))o[f]=""+r.pop();else{if(!s.hasOwnProperty(f))throw Error("You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route "+e);o[f]=s[f]}}return new u({name:e,handler:t,params:o})},i["default"]=o}),r("router/transition-intent/url-transition-intent",["../transition-intent","../transition-state","../handler-info","../utils","exports"],function(e,t,n,r,i){function o(e){s.call(this,e)}function a(e){this.message=e||"UnrecognizedURLError",this.name="UnrecognizedURLError"}var s=e["default"],u=t["default"],c=n.UnresolvedHandlerInfoByParam,l=r.oCreate,f=r.merge;o.prototype=l(s.prototype),o.prototype.applyToState=function(e,t,n){var r,i,o=new u,s=t.recognize(this.url);if(!s)throw new a(this.url);var l=!1;for(r=0,i=s.length;i>r;++r){var h=s[r],p=h.handler,d=n(p);if(d.inaccessibleByURL)throw new a(this.url);var v=new c({name:p,handler:d,params:h.params}),g=e.handlerInfos[r];l||v.shouldSupercede(g)?(l=!0,o.handlerInfos[r]=v):o.handlerInfos[r]=g}return f(o.queryParams,s.queryParams),o},i["default"]=o}),r("router/transition-state",["./handler-info","./utils","rsvp/promise","exports"],function(e,t,n,r){function i(){this.handlerInfos=[],this.queryParams={},this.params={}}e.ResolvedHandlerInfo;var o=t.forEach,a=t.promiseLabel,s=n["default"];i.prototype={handlerInfos:null,queryParams:null,params:null,promiseLabel:function(e){var t="";return o(this.handlerInfos,function(e){""!==t&&(t+="."),t+=e.name | |
}),a("'"+t+"': "+e)},resolve:function(e,t,n){function r(){return s.resolve(t(),a("Check if should continue"))["catch"](function(e){return h=!0,s.reject(e)},a("Handle abort"))}function i(e){var t=f.handlerInfos,r=n.resolveIndex>=t.length?t.length-1:n.resolveIndex;return s.reject({error:e,handlerWithError:f.handlerInfos[r].handler,wasAborted:h,state:f})}function u(e){f.handlerInfos[n.resolveIndex++]=e;var t=e.handler;return t&&t.redirect&&t.redirect(e.context,n),r().then(c,null,a("Resolve handler"))}function c(){if(n.resolveIndex===f.handlerInfos.length)return{error:null,state:f};var t=f.handlerInfos[n.resolveIndex];return t.resolve(e,r,n).then(u,null,a("Proceed"))}var l=this.params;o(this.handlerInfos,function(e){l[e.name]=e.params||{}}),n=n||{},n.resolveIndex=0;var f=this,h=!1;return s.resolve(null,this.promiseLabel("Start transition")).then(c,null,this.promiseLabel("Resolve handler"))["catch"](i,this.promiseLabel("Handle error"))}},r["default"]=i}),r("router/transition",["rsvp/promise","./handler-info","./utils","exports"],function(e,t,n,r){function i(e,t,n,r){function a(){return c.isAborted?s.reject(void 0,h("Transition aborted - reject")):void 0}var c=this;if(this.state=n||e.state,this.intent=t,this.router=e,this.data=this.intent&&this.intent.data||{},this.resolvedModels={},this.queryParams={},r)return this.promise=s.reject(r),void 0;if(n){this.params=n.params,this.queryParams=n.queryParams;var l=n.handlerInfos.length;l&&(this.targetName=n.handlerInfos[n.handlerInfos.length-1].name);for(var f=0;l>f;++f){var p=n.handlerInfos[f];if(!(p instanceof u))break;this.pivotHandler=p.handler}this.sequence=i.currentSequence++,this.promise=n.resolve(e.async,a,this)["catch"](function(e){return e.wasAborted?s.reject(o(c)):(c.trigger("error",e.error,c,e.handlerWithError),c.abort(),s.reject(e.error))},h("Handle Abort"))}else this.promise=s.resolve(this.state),this.params={}}function o(e){return f(e.router,e.sequence,"detected abort."),new a}function a(e){this.message=e||"TransitionAborted",this.name="TransitionAborted"}var s=e["default"],u=t.ResolvedHandlerInfo,c=n.trigger,l=n.slice,f=n.log,h=n.promiseLabel;i.currentSequence=0,i.prototype={targetName:null,urlMethod:"update",intent:null,params:null,pivotHandler:null,resolveIndex:0,handlerInfos:null,resolvedModels:null,isActive:!0,state:null,promise:null,data:null,then:function(e,t){return this.promise.then(e,t)},abort:function(){return this.isAborted?this:(f(this.router,this.sequence,this.targetName+": transition was aborted"),this.isAborted=!0,this.isActive=!1,this.router.activeTransition=null,this)},retry:function(){return this.abort(),this.router.transitionByIntent(this.intent,!1)},method:function(e){return this.urlMethod=e,this},trigger:function(e){var t=l.call(arguments);"boolean"==typeof e?t.shift():e=!1,c(this.router,this.state.handlerInfos.slice(0,this.resolveIndex+1),e,t)},followRedirects:function(){var e=this.router;return this.promise["catch"](function(t){return e.activeTransition?e.activeTransition.followRedirects():s.reject(t)})},toString:function(){return"Transition (sequence "+this.sequence+")"},log:function(e){f(this.router,this.sequence,e)}},i.prototype.send=i.prototype.trigger,r.Transition=i,r.logAbort=o,r.TransitionAborted=a}),r("router/utils",["exports"],function(e){function t(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function n(e){var t,n,r=e&&e.length;return r&&r>0&&e[r-1]&&e[r-1].hasOwnProperty("queryParams")?(n=e[r-1].queryParams,t=p.call(e,0,r-1),[t,n]):[e,null]}function r(e){for(var t in e)if("number"==typeof e[t])e[t]=""+e[t];else if(d(e[t]))for(var n=0,r=e[t].length;r>n;n++)e[t][n]=""+e[t][n]}function i(e,t,n){e.log&&(3===arguments.length?e.log("Transition #"+t+": "+n):(n=t,e.log(n)))}function o(e,t){var n=arguments;return function(r){var i=p.call(n,2);return i.push(r),e.apply(t,i)}}function a(e){return"string"==typeof e||e instanceof String||"number"==typeof e||e instanceof Number}function s(e,t){for(var n=0,r=e.length;r>n&&!1!==t(e[n]);n++);}function u(e,t,n){var r={};if(a(t))return r[n[0]]=t,r;if(e.serialize)return e.serialize(t,n);if(1===n.length){var i=n[0];return r[i]=/_id$/.test(i)?t.id:t,r}}function c(e,t,n,r){if(e.triggerEvent)return e.triggerEvent(t,n,r),void 0;var i=r.shift();if(!t){if(n)return;throw Error("Could not trigger event '"+i+"'. There are no active handlers")}for(var o=!1,a=t.length-1;a>=0;a--){var s=t[a],u=s.handler;if(u.events&&u.events[i]){if(u.events[i].apply(u,r)!==!0)return;o=!0}}if(!o&&!n)throw Error("Nothing handled the event '"+i+"'.")}function l(e,n){var i,o={all:{},changed:{},removed:{}};t(o.all,n);var a=!1;r(e),r(n);for(i in e)e.hasOwnProperty(i)&&(n.hasOwnProperty(i)||(a=!0,o.removed[i]=e[i]));for(i in n)if(n.hasOwnProperty(i))if(d(e[i])&&d(n[i]))if(e[i].length!==n[i].length)o.changed[i]=n[i],a=!0;else for(var s=0,u=e[i].length;u>s;s++)e[i][s]!==n[i][s]&&(o.changed[i]=n[i],a=!0);else e[i]!==n[i]&&(o.changed[i]=n[i],a=!0);return a&&o}function f(e){return"Router: "+e}var h,p=Array.prototype.slice;h=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var d=h;e.isArray=d;var v=Object.create||function(e){function t(){}return t.prototype=e,new t};e.oCreate=v,e.extractQueryParams=n,e.log=i,e.bind=o,e.forEach=s,e.serialize=u,e.trigger=c,e.getChangelist=l,e.promiseLabel=f,e.merge=t,e.slice=p,e.isParam=a,e.coerceQueryParamsToString=r}),r("router",["./router/router","exports"],function(e,t){var n=e["default"];t["default"]=n}),r("route-recognizer",[],function(){return n}),r("rsvp/promise",[],function(){return t}),i("router").default}(window,{"default":e("./promise")},e("./route-recognizer"))})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{"./promise":11,"./route-recognizer":12}]},{},[]),require=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);throw Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;r.length>a;a++)i(r[a]);return i}({1:[function(e,t){(function(e){"use strict";e(function(e){var t=e("./util"),n=function(){},r=function(e,r,i){var o;return o=r&&r.hasOwnProperty("constructor")?r.constructor:function(){return e.apply(this,arguments)},t.extend(o,e),n.prototype=e.prototype,o.prototype=new n,r&&t.extend(o.prototype,r),i&&t.extend(o,i),o.prototype.constructor=o,o.__super__=e.prototype,o};return function(e,t){var n=r(this,e,t);return n.extend=this.extend,n}})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{"./util":2}],2:[function(e,t){(function(e){"use strict";e(function(){var e={},t={},n=Array.prototype,r=n.slice,i=n.map,o=n.forEach,a=Object.keys;e.keys=a||function(t){if(t!==Object(t))throw new TypeError("Invalid object");var n=[];for(var r in t)e.has(t,r)&&n.push(r);return n};var s=e.each=function(n,r,i){if(null!==n){var a,s;if(o&&n.forEach===o)n.forEach(r,i);else if(n.length===+n.length){for(a=0,s=n.length;s>a;a++)if(r.call(i,n[a],a,n)===t)return}else{var u=e.keys(n);for(a=0,s=u.length;s>a;a++)if(r.call(i,n[u[a]],u[a],n)===t)return}}};e.map=function(e,t,n){var r=[];return null===e?r:i&&e.map===i?e.map(t,n):(s(e,function(e,i,o){r.push(t.call(n,e,i,o))}),r)},e.extend=function(e){return s(r.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},e.pluck=function(t,n){return e.map(t,function(e){return e[n]})};var u=0;return e.uniqueId=function(e){var t=++u+"";return e?e+t:t},e})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{}],T9Eu8O:[function(e,t){(function(e){"use strict";e(function(e){var t=e("./lib/util"),n=e("./lib/inherit"),r=function(){},i=function(e){this.name=e.name,this.router=e.router,this.id=t.uniqueId(),this.initialize()};return t.extend(i.prototype,{initialize:r,beforeModel:r,model:r,afterModel:r,activate:r,update:r,deactivate:r,enter:function(){this._setup=0,this.needsReactivation=!1},exit:function(){this.deactivate.apply(this,arguments)},setup:function(){function e(){r.activate.apply(r,i)}function t(){r.exit(),r.activate.apply(r,i)}function n(){return r.parent&&!r.parent.needsReactivation}this._setup+=1;var r=this,i=arguments;return 1===this._setup?e():n()&&this.update&&this.update.apply(this,i)===!1?(r.needsReactivation=!1,void 0):(t(),void 0)},setParent:function(e){this.parent=e},getContext:r,transitionTo:function(){var e=this.router;return e.transitionTo.apply(e,arguments)},replaceWith:function(){var e=this.router;return e.replaceWith.apply(e,arguments)},get:function(e){for(var t,n=this;n;){if(t=n.getContext(),t&&t[e])return t[e];if(n[e])return n[e];n=n.parent}}}),i.extend=n,i})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{"./lib/inherit":1,"./lib/util":2}],"cherrytree/route":[function(e,t){t.exports=e("T9Eu8O")},{}]},{},[]),require=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);throw Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;r.length>a;a++)i(r[a]);return i}({1:[function(e,t){(function(e){"use strict";e(function(){var e={},t={},n=Array.prototype,r=n.slice,i=n.map,o=n.forEach,a=Object.keys;e.keys=a||function(t){if(t!==Object(t))throw new TypeError("Invalid object");var n=[];for(var r in t)e.has(t,r)&&n.push(r);return n};var s=e.each=function(n,r,i){if(null!==n){var a,s;if(o&&n.forEach===o)n.forEach(r,i);else if(n.length===+n.length){for(a=0,s=n.length;s>a;a++)if(r.call(i,n[a],a,n)===t)return}else{var u=e.keys(n);for(a=0,s=u.length;s>a;a++)if(r.call(i,n[u[a]],u[a],n)===t)return}}};e.map=function(e,t,n){var r=[];return null===e?r:i&&e.map===i?e.map(t,n):(s(e,function(e,i,o){r.push(t.call(n,e,i,o))}),r)},e.extend=function(e){return s(r.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},e.pluck=function(t,n){return e.map(t,function(e){return e[n]})};var u=0;return e.uniqueId=function(e){var t=++u+"";return e?e+t:t},e})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{}],"I/Dq/Q":[function(e,t){(function(e){"use strict";e(function(e){var t=e("../lib/util"),n=e("./history_location/link_delegate"),r=e("location-bar"),i=function(e){this.path="",this.options=t.extend({pushState:!1,interceptLinks:!0,root:"/"},e);var n=this;this.locationBar=new r,this.locationBar.onChange(function(e){n.handleURL("/"+(e||""))}),this.locationBar.start(t.extend({},e)),this.usesPushState()&&this.options.interceptLinks&&this.interceptLinks()};return i.prototype.usesPushState=function(){return this.options.pushState&&this.locationBar.hasPushState()},i.prototype.getURL=function(){return this.path},i.prototype.setURL=function(e){this.path!==e&&(this.path=e,this.locationBar.update(e,{trigger:!1}))},i.prototype.replaceURL=function(e){this.path!==e&&(this.path=e,this.locationBar.update(e,{trigger:!1,replace:!0}))},i.prototype.onChange=function(e){this.changeCallback=e},i.prototype.formatURL=function(e){if(this.locationBar.hasPushState()){var t=this.options.root;return""!==e&&(t=t.replace(/\/$/,"")),t+e}return"/"===e[0]&&(e=e.substr(1)),"#"+e},i.prototype.destroy=function(){this.locationBar.stop(),this.linkHandler&&n.undelegate(this.linkHandler)},i.prototype.interceptLinks=function(){var e=this;this.linkHandler=function(t,n){t.preventDefault(),e.navigate(n.getAttribute("href"))},n.delegate(this.linkHandler)},i.prototype.navigate=function(e){this.locationBar.update(e,{trigger:!0})},i.prototype.handleURL=function(e){this.path=e,this.changeCallback&&this.changeCallback(e)},i})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{"../lib/util":1,"./history_location/link_delegate":5,"location-bar":6}],"cherrytree/location/history_location":[function(e,t){t.exports=e("I/Dq/Q")},{}],4:[function(e,t){(function(e){"use strict";e(function(){var e={},t=window.addEventListener?"addEventListener":"attachEvent",n=window.removeEventListener?"removeEventListener":"detachEvent",r="addEventListener"!==t?"on":"";return e.bind=function(e,n,i,o){return e[t](r+n,i,o||!1),i},e.unbind=function(e,t,i,o){return e[n](r+t,i,o||!1),i},e})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{}],5:[function(e,t){(function(e){"use strict";e(function(e){function t(e,t){if(1===n(e)&&!(e.metaKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||t.target||null!==t.getAttribute("data-bypass"))){var r=t.getAttribute("href");if(r&&0!==r.length&&"#"!==r[0]&&0!==r.indexOf("http://")&&0!==r.indexOf("https://")&&0!==r.indexOf("javascript:"))return!0}}function n(e){return e=e||window.event,null===e.which?e.button:e.which}var r=e("./events"),i={},o=function(e){e={parentNode:e};for(var t=document;(e=e.parentNode)&&e!==document;){if("a"===e.tagName.toLowerCase())return e;if(e===t)return}},a=function(e,t,n){return r.bind(e,t,function(e){var t=e.target||e.srcElement,r=o(t);r&&n(e,r)})},s=function(e,t,n){r.unbind(e,t,n)};return i.delegate=function(e,n){"function"==typeof e&&(n=e,e=document),a(e,"click",function(e,r){t(e,r)&&n(e,r)})},i.undelegate=function(e,t){"function"==typeof e&&(t=e,e=document),s(e,"click",t)},i})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{"./events":4}],6:[function(e,t){(function(e){e(function(){function e(e,t){for(var n in t)e[n]=t[n];return e}function t(e,t,n){e.attachEvent?(e["e"+t+n]=n,e[t+n]=function(){e["e"+t+n](window.event)},e.attachEvent("on"+t,e[t+n])):e.addEventListener(t,n,!1)}function n(e,t,n){e.detachEvent?(e.detachEvent("on"+t,e[t+n]),e[t+n]=null):e.removeEventListener(t,n,!1)}var r=function(){this.handlers=[];var e=this,t=this.checkUrl;this.checkUrl=function(){t.apply(e,arguments)},"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},i=/^[#\/]|\s+$/g,o=/^\/+|\/+$/g,a=/msie [\w.]+/,s=/\/$/,u=/#.*$/;return r.started=!1,e(r.prototype,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(null==e)if(this._hasPushState||!this._wantsHashChange||t){e=decodeURI(this.location.pathname+this.location.search);var n=this.root.replace(s,"");e.indexOf(n)||(e=e.slice(n.length))}else e=this.getHash();return e.replace(i,"")},start:function(n){if(r.started)throw Error("LocationBar has already been started");r.started=!0,this.options=e({root:"/"},n),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var s=this.getFragment(),u=document.documentMode,c=a.exec(navigator.userAgent.toLowerCase())&&(!u||7>=u);this.root=("/"+this.root+"/").replace(o,"/"),c&&this._wantsHashChange&&(this.iframe=document.createElement("iframe"),this.iframe.setAttribute("src","javascript:0"),this.iframe.setAttribute("tabindex",-1),this.iframe.style.display="none",document.body.appendChild(this.iframe),this.iframe=this.iframe.contentWindow,this.navigate(s)),this._hasPushState?t(window,"popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!c?t(window,"hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=s;var l=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+"#"+this.fragment),!0;this._hasPushState&&this.atRoot()&&l.hash&&(this.fragment=this.getHash().replace(i,""),this.history.replaceState({},document.title,this.root+this.fragment))}return this.options.silent?void 0:this.loadUrl()},stop:function(){n(window,"popstate",this.checkUrl),n(window,"hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),r.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getFragment(this.getHash(this.iframe))),e===this.fragment?!1:(this.iframe&&this.navigate(e),this.loadUrl(),void 0)},loadUrl:function(e){e=this.fragment=this.getFragment(e);for(var t=0,n=this.handlers.length;n>t;t++){var r=this.handlers[t];if(r.route.test(e))return r.callback(e),!0}return!1},navigate:function(e,t){if(!r.started)return!1;t&&t!==!0||(t={trigger:!!t});var n=this.root+(e=this.getFragment(e||""));if(e=e.replace(u,""),this.fragment!==e){if(this.fragment=e,""===e&&"/"!==n&&(n=n.slice(0,-1)),this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),r.prototype.update=function(){this.navigate.apply(this,arguments)},r.prototype.onChange=function(e){this.route(/^(.*?)$/,e)},r.prototype.hasPushState=function(){if(!r.started)throw Error("only available after locationBar.start()");return this._hasPushState},r})})("function"==typeof define&&define.amd?define:function(n){t.exports=n(e)})},{}]},{},[]);var $=require("jquery"),Router=require("cherrytree"),Route=require("cherrytree/route"),HistoryLocation=require("cherrytree/location/history_location"),Post=function(){};Post.prototype.fetch=function(){},Post.prototype.get=function(){return"Hello cherrytree"};var router=new Router({location:new HistoryLocation({pushState:!1})});router.map(function(){this.resource("post",{path:"/post/:postId"},function(){this.route("show",{path:"/"}),this.route("edit")})}),router.addRoute("application",Route.extend({activate:function(){this.view=$("<div><h1>My Blog</h1><div class='outlet'></div></div>"),$(document.body).html(this.view)}})),router.addRoute("post",Route.extend({model:function(e){return this.post=new Post({id:e.postId}),this.post.fetch()},activate:function(){this.outlet=this.parent.view.find(".outlet")}})),router.addRoute("post.show",Route.extend({activate:function(){this.view=$("<p>"+this.get("post").get("content")+"</p>"),this.parent.outlet.html(this.view)},deactivate:function(){this.view.remove()}})),router.startRouting(),router.transitionTo("post.show",42); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "requirebin-sketch", | |
"version": "1.0.0", | |
"dependencies": { | |
"jquery": "2.1.0", | |
"cherrytree": "0.2.0" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; } | |
body, html { height: 100%; width: 100%; }</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment