doevisualizations
Version:
Data Visualization Library based on RequireJS and D3.js (v4+)
60 lines (59 loc) • 45.9 kB
JavaScript
/*!
* jQuery++ - 2.0.2
* http://jquerypp.com
* Copyright (c) 2016 Bitovi
* Wed, 06 Apr 2016 00:03:57 GMT
* Licensed MIT
*/
/*[global-shim-start]*/
!function(exports,global){var origDefine=global.define,get=function(e){var o,l=e.split("."),n=global;for(o=0;o<l.length&&n;o++)n=n[l[o]];return n},modules=global.define&&global.define.modules||global._define&&global._define.modules||{},ourDefine=global.define=function(e,o,l){var n;"function"==typeof o&&(l=o,o=[]);var i,r=[];for(i=0;i<o.length;i++)r.push(exports[o[i]]?get(exports[o[i]]):modules[o[i]]||get(o[i]));if(!o.length&&l.length){n={exports:{}};var t=function(e){return exports[e]?get(exports[e]):modules[e]};r.push(t,n.exports,n)}else r[0]||"exports"!==o[0]||(n={exports:{}},r[0]=n.exports);global.define=origDefine;var f=l?l.apply(null,r):void 0;global.define=ourDefine,modules[e]=n&&n.exports?n.exports:f};global.define.orig=origDefine,global.define.modules=modules,global.define.amd=!0,global.System={define:function(__name,__code){global.define=origDefine,eval("(function() { "+__code+" \n }).call(global);"),global.define=ourDefine},orig:global.System}}({},window);
/*jquerypp@2.0.2#dom/animate/animate*/
define("jquerypp/dom/animate/animate",["jquery/jquery"],function(n){var e=0,t=null,i=[],o=null,r=n.fn.animate,a=function(){if(!t){var n=document.createElement("style");n.setAttribute("type","text/css"),n.setAttribute("media","screen"),document.getElementsByTagName("head")[0].appendChild(n),window.createPopup||n.appendChild(document.createTextNode("")),t=n.sheet}return t},s=function(n,e){for(var t=n.cssRules.length-1;t>=0;t--){var i=n.cssRules[t];if(7===i.type&&i.name==e)return void n.deleteRule(t)}},u=function(e,t,i,o){var r=!(this[0]&&this[0].nodeType),a=!r&&"inline"===n(this).css("display")&&"none"===n(this).css("float"),s=f();for(var u in e)if("show"==e[u]||"hide"==e[u]||"toggle"==e[u]||n.isArray(e[u])||e[u]<0||"zIndex"==u||"z-index"==u||"scrollTop"==u||"scrollLeft"==u)return!0;return e.jquery===!0||null===s||"-o-"===s.prefix||n.isEmptyObject(e)||i||i&&"string"==typeof i||n.isPlainObject(t)||a||r},l=function(e,t){return"number"!=typeof t||n.cssNumber[e]?t:t+="px"},f=function(){if(!o){var n,e=document.createElement("fakeelement"),t={transition:{transitionEnd:"transitionend",prefix:""},MozTransition:{transitionEnd:"animationend",prefix:"-moz-"},WebkitTransition:{transitionEnd:"webkitTransitionEnd",prefix:"-webkit-"},OTransition:{transitionEnd:"oTransitionEnd",prefix:"-o-"}};for(n in t)n in e.style&&(o=t[n])}return o},c={top:function(n){return n.position().top},left:function(n){return n.position().left},width:function(n){return n.width()},height:function(n){return n.height()},fontSize:function(n){return"1em"}},d=function(e){var t={};return n.each(e,function(n,e){t[f().prefix+n]=e}),t},p=function(t){var o,r,u;return n.each(i,function(n,e){t===e.style?(r=e.name,e.age=0):e.age+=1}),r||(o=a(),r="jquerypp_animation_"+e++,o.insertRule("@"+f().prefix+"keyframes "+r+" "+t,o.cssRules&&o.cssRules.length||0),i.push({name:r,style:t,age:0}),i.sort(function(n,e){return n.age-e.age}),i.length>20&&(u=i.pop(),s(o,u.name))),r};return n.fn.animate=function(e,t,i,o){if(u.apply(this,arguments))return r.apply(this,arguments);var a=n.speed(t,i,o),s=[];return("height"in e||"width"in e)&&(s=[this[0].style.overflow,this[0].style.overflowX,this[0].style.overflowY],this.css("overflow","hidden")),this.queue(a.queue,function(t){var i,o,r,u,m=[],h="",y=n(this),v=a.duration,g="{ from {",w=function(e,t){t?y.css("overflow",""):(y[0].style.overflow=s[0],y[0].style.overflowX=s[1],y[0].style.overflowY=s[2]),y.css(e),y.css(d({"animation-duration":"","animation-name":"","animation-fill-mode":"","animation-play-state":""})),n.isFunction(a.old)&&t&&a.old.call(y[0],!0),n.removeData(y,u,!0)},x=function(){w(e,!0),t()};for(o in e)m.push(o);("-moz-"===f().prefix||/Edge\/\d+/.test(navigator.userAgent))&&n.each(m,function(e,t){var i=c[n.camelCase(t)];i&&"auto"==y.css(t)&&y.css(t,i(y))}),i=y.css.apply(y,m),n.each(m,function(n,t){var o=t.replace(/([A-Z]|^ms)/g,"-$1").toLowerCase();g+=o+" : "+l(t,i[t])+"; ",h+=o+" : "+l(t,e[t])+"; "}),g+="} to {"+h+" }}",r=p(g),u=r+".run",n._data(this,u,{stop:function(n){y.css(d({"animation-play-state":"paused"})),y.off(f().transitionEnd,x),n?w(e,!0):w(y.styles.apply(y,m),!1)}}),y.css(d({"animation-duration":v+"ms","animation-name":r,"animation-fill-mode":"forwards"})),y.one(f().transitionEnd,x)}),this},n});
/*jquerypp@2.0.2#dom/compare/compare*/
define("jquerypp/dom/compare/compare",["jquery/jquery"],function(e){return e.fn.compare=function(e){try{e=e.jquery?e[0]:e}catch(t){return null}if(window.HTMLElement){var n=HTMLElement.prototype.toString.call(e);if("[xpconnect wrapped native prototype]"==n||"[object XULElement]"==n||"[object Window]"===n)return null}if(this[0].compareDocumentPosition)return this[0].compareDocumentPosition(e);if(this[0]==document&&e!=document)return 8;var o=(this[0]!==e&&this[0].contains(e)&&16)+(this[0]!=e&&e.contains(this[0])&&8),r=document.documentElement;return this[0].sourceIndex&&(o+=this[0].sourceIndex<e.sourceIndex&&4,o+=this[0].sourceIndex>e.sourceIndex&&2,o+=(this[0].ownerDocument!==e.ownerDocument||this[0]!=r&&this[0].sourceIndex<=0||e!=r&&e.sourceIndex<=0)&&1),o},e});
/*jquerypp@2.0.2#dom/cookie/cookie*/
define("jquerypp/dom/cookie/cookie",["jquery/jquery"],function(e){return e.cookie=function(i,o,t){if("undefined"==typeof o){var n=null;if(document.cookie&&""!=document.cookie)for(var r=document.cookie.split(";"),c=0;c<r.length;c++){var p=e.trim(r[c]);if(p.substring(0,i.length+1)==i+"="){n=decodeURIComponent(p.substring(i.length+1));break}}if(n&&n.match(/^\s*\{/))try{n=JSON.parse(n)}catch(s){}return n}t=t||{},null===o&&(o="",t.expires=-1),"object"==typeof o&&JSON.stringify&&(o=JSON.stringify(o));var u="";if(t.expires&&("number"==typeof t.expires||t.expires.toUTCString)){var a;"number"==typeof t.expires?(a=new Date,a.setTime(a.getTime()+24*t.expires*60*60*1e3)):a=t.expires,u="; expires="+a.toUTCString()}var f=t.path?"; path="+t.path:"",m=t.domain?"; domain="+t.domain:"",d=t.secure?"; secure":"";document.cookie=[i,"=",encodeURIComponent(o),u,f,m,d].join("")},e});
/*jquerypp@2.0.2#dom/form_params/form_params*/
define("jquerypp/dom/form_params/form_params",["jquery/jquery"],function(a){var r=/[^\[\]]+/g,t=function(r){return a.isNumeric(r)?parseFloat(r):"true"===r?!0:"false"===r?!1:""===r||null===r?void 0:r},e=function(r,t,n,i,s,c,u){var o=i.shift();if(u=u?u+"."+o:o,i.length)n[o]||(n[o]={}),e(r,t,n[o],i,s,c,u);else{if(u in c&&"radio"!=t&&!a.isArray(n[o])?o in n?n[o]=[n[o]]:n[o]=[]:c[u]=!0,("radio"==t||"checkbox"==t)&&!r.is(":checked"))return;n[o]?n[o].push(s):n[o]=s}};return a.fn.extend({formParams:function(a){var r;return!!a===a&&(r=a,a=null),a?this.setParams(a):this.getParams(r)},setParams:function(r){this.find("[name]").each(function(){var t=a(this),e=r[t.attr("name")];void 0!==e&&(t.is(":radio")?t.val()==e&&t.attr("checked",!0):t.is(":checkbox")?(e=a.isArray(e)?e:[e],a.inArray(t.val(),e)>-1&&t.attr("checked",!0)):t.val(e))})},getParams:function(n){var i={},s={};return this.find("[name]:not(:disabled)").each(function(){var c,u=a(this),o=u.attr("type"),f=u.attr("name"),h=u.val();"submit"!=o&&f&&(c=f.match(r),c.length||(c=[f]),n&&(h=t(h)),e(u,o,i,c,h,s))}),i}}),a});
/*jquerypp@2.0.2#dom/range/range*/
define("jquerypp/dom/range/range",["jquery/jquery","jquerypp/dom/compare/compare"],function(e){e.fn.range=function(){return e.Range(this[0])};var t=function(e){return e.replace(/([a-z])([a-z]+)/gi,function(e,t,n){return t+n.toLowerCase()}).replace(/_/g,"")},n=function(e){return e.replace(/^([a-z]+)_TO_([a-z]+)/i,function(e,t,n){return n+"_TO_"+t})},r=function(e){return e?e.ownerDocument.defaultView||e.ownerDocument.parentWindow:window},i={};e.Range=function(t){return this.constructor!==e.Range?new e.Range(t):(t&&t.jquery&&(t=t[0]),void(!t||t.nodeType?(this.win=r(t),this.win.document.createRange?this.range=this.win.document.createRange():this.win&&this.win.document.body&&this.win.document.body.createTextRange&&(this.range=this.win.document.body.createTextRange()),t&&this.select(t)):null!=t.clientX||null!=t.pageX||null!=t.left?this.moveToPoint(t):t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches.length?this.moveToPoint(t.originalEvent.touches[0]):t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches.length?this.moveToPoint(t.originalEvent.changedTouches[0]):this.range=t))},e.Range.current=function(t){var n,i=r(t);return i.getSelection?(n=i.getSelection(),new e.Range(n.rangeCount?n.getRangeAt(0):i.document.createRange())):new e.Range(i.document.selection.createRange())},e.extend(e.Range.prototype,{moveToPoint:function(t){var n=t.clientX,r=t.clientY;if(!n){var a=d();n=(t.pageX||t.left||0)-a.left,r=(t.pageY||t.top||0)-a.top}if(i.moveToPoint)return this.range=e.Range().range,this.range.moveToPoint(n,r),this;for(var s=document.elementFromPoint(n,r),c=0;c<s.childNodes.length;c++){var g=s.childNodes[c];if(3===g.nodeType||4===g.nodeType)for(var l=e.Range(g),h=l.toString().length,f=1;h+1>f;f++){var u=l.end(f).rect();if(u.left<=n&&u.left+u.width>=n&&u.top<=r&&u.top+u.height>=r)return l.start(f-1),this.range=l.range,this}}var p;o(s.childNodes,function(n){var r=e.Range(n);return r.rect().top>t.clientY?!1:void(p=r)}),p?(p.start(p.toString().length),this.range=p.range):this.range=e.Range(s).range},window:function(){return this.win||window},overlaps:function(t){t.nodeType&&(t=e.Range(t).select(t));var n=this.compare("START_TO_START",t),r=this.compare("END_TO_END",t);return 0>=n&&r>=0?!0:n>=0&&this.compare("START_TO_END",t)<=0?!0:this.compare("END_TO_START",t)>=0&&0>=r?!0:!1},collapse:function(e){return this.range.collapse(void 0===e?!0:e),this},toString:function(){return"string"==typeof this.range.text?this.range.text:this.range.toString()},start:function(t){if(void 0===t){if(this.range.startContainer)return{container:this.range.startContainer,offset:this.range.startOffset};var n=this.clone().collapse().parent(),r=e.Range(n).select(n).collapse();return r.move("END_TO_START",this),{container:n,offset:r.toString().length}}if(this.range.setStart)if("number"==typeof t)this.range.setStart(this.range.startContainer,t);else if("string"==typeof t){var i=l(this.range.startContainer,this.range.startOffset,parseInt(t,10));this.range.setStart(i.node,i.offset)}else this.range.setStart(t.container,t.offset);else if("string"==typeof t)this.range.moveStart("character",parseInt(t,10));else{var o,a=this.start().container;"number"==typeof t?o=t:(a=t.container,o=t.offset);var s=e.Range(a).collapse();s.range.move(o),this.move("START_TO_START",s)}return this},end:function(t){if(void 0===t){if(this.range.startContainer)return{container:this.range.endContainer,offset:this.range.endOffset};var n=this.clone().collapse(!1).parent(),r=e.Range(n).select(n).collapse();return r.move("END_TO_END",this),{container:n,offset:r.toString().length}}if(this.range.setEnd)if("number"==typeof t)this.range.setEnd(this.range.endContainer,t);else if("string"==typeof t){var i=l(this.range.endContainer,this.range.endOffset,parseInt(t,10));this.range.setEnd(i.node,i.offset)}else this.range.setEnd(t.container,t.offset);else if("string"==typeof t)this.range.moveEnd("character",parseInt(t,10));else{var o,a=this.end().container;"number"==typeof t?o=t:(a=t.container,o=t.offset);var s=e.Range(a).collapse();s.range.move(o),this.move("END_TO_START",s)}return this},parent:function(){if(this.range.commonAncestorContainer)return this.range.commonAncestorContainer;var t=this.range.parentElement(),n=this.range;return o(t.childNodes,function(r){return e.Range(r).range.inRange(n)?(t=r,!1):void 0}),t},rect:function(t){var n=this.range.getBoundingClientRect();if(n.height||n.width||(n=this.range.getClientRects()[0]),"page"===t){var r=d();n=e.extend({},n),n.top+=r.top,n.left+=r.left}return n},rects:function(t){var n,r=e.map(e.makeArray(this.range.getClientRects()).sort(function(e,t){return t.width*t.height-e.width*e.height}),function(t){return e.extend({},t)}),i=0;for(r.length;i<r.length;){var o=r[i],a=!1;for(n=i+1;n<r.length;)if(u(o,r[n])){if(r[n].width){a=r[n];break}r.splice(n,1)}else n++;a?r.splice(i,1):i++}if("page"==t){var s=d();return e.each(r,function(e,t){t.top+=s.top,t.left+=s.left})}return r}}),function(){var r=e.Range.prototype,i=e.Range().range;r.compare=i.compareBoundaryPoints?function(e,t){return this.range.compareBoundaryPoints(this.window().Range[n(e)],t.range)}:function(e,n){return this.range.compareEndPoints(t(e),n.range)},r.move=i.setStart?function(e,t){var n=t.range;switch(e){case"START_TO_END":this.range.setStart(n.endContainer,n.endOffset);break;case"START_TO_START":this.range.setStart(n.startContainer,n.startOffset);break;case"END_TO_END":this.range.setEnd(n.endContainer,n.endOffset);break;case"END_TO_START":this.range.setEnd(n.startContainer,n.startOffset)}return this}:function(e,n){return this.range.setEndPoint(t(e),n.range),this};var a=i.cloneRange?"cloneRange":"duplicate";i.selectNodeContents?"selectNodeContents":"moveToElementText";r.clone=function(){return e.Range(this.range[a]())},r.select=i.selectNodeContents?function(e){if(e)this.range.selectNodeContents(e);else{var t=this.window().getSelection();t.removeAllRanges(),t.addRange(this.range)}return this}:function(e){if(e)if(3===e.nodeType){var t,n=e.parentNode,r=0;o(n.childNodes,function(n){return n===e?(t=r+n.nodeValue.length,!1):void(r+=n.nodeValue.length)}),this.range.moveToElementText(n),this.range.moveEnd("character",t-this.range.text.length),this.range.moveStart("character",r)}else this.range.moveToElementText(e);else this.range.select();return this}}();var o=function(e,t){for(var n,r=0;e[r];r++)if(n=e[r],3===n.nodeType||4===n.nodeType){if(t(n)===!1)return!1}else if(8!==n.nodeType&&o(n.childNodes,t)===!1)return!1},a=function(e){return 3===e.nodeType||4===e.nodeType},s=function(e,t){return function(n,r){return n[e]&&!r?a(n[e])?n[e]:arguments.callee(n[e]):n[t]?a(n[t])?n[t]:arguments.callee(n[t]):n.parentNode?arguments.callee(n.parentNode,!0):void 0}},c=s("firstChild","nextSibling"),g=s("lastChild","previousSibling"),l=function(e,t,n){var r=0>n?g:c;return a(e)?0>t+n?h(r(e),t+n):h(e,t+n):(e=e.childNodes[t]?e.childNodes[t]:e.lastChild,a(e)||(e=r(e)),h(e,n))},h=function(e,t){var n=0>t?g:c;for(t=Math.abs(t);e&&t>=e.nodeValue.length;)t-=e.nodeValue.length,e=n(e);return{node:e,offset:n===c?t:e.nodeValue.length-t}},f=function(e,t){return e.left<=t.clientX&&e.left+e.width>=t.clientX&&e.top<=t.clientY&&e.top+e.height>=t.clientY},u=function(e,t){return f(e,{clientX:t.left,clientY:t.top})&&f(e,{clientX:t.left+t.width,clientY:t.top})&&f(e,{clientX:t.left,clientY:t.top+t.height})&&f(e,{clientX:t.left+t.width,clientY:t.top+t.height})},d=function(e){var e=e||window;return doc=e.document.documentElement,body=e.document.body,{left:(doc&&doc.scrollLeft||body&&body.scrollLeft||0)+(doc.clientLeft||0),top:(doc&&doc.scrollTop||body&&body.scrollTop||0)+(doc.clientTop||0)}};return i.moveToPoint=!!e.Range().range.moveToPoint,e});
/*jquerypp@2.0.2#dom/selection/selection*/
define("jquerypp/dom/selection/selection",["jquery/jquery","jquerypp/dom/range/range"],function(e){var t=function(e){return e?e.ownerDocument.defaultView||e.ownerDocument.parentWindow:window},n=function(t,n){var r=e.Range.current(t).clone(),o=e.Range(t).select(t);return r.overlaps(o)?(r.compare("START_TO_START",o)<1?(startPos=0,r.move("START_TO_START",o)):(fromElementToCurrent=o.clone(),fromElementToCurrent.move("END_TO_START",r),startPos=fromElementToCurrent.toString().length),r.compare("END_TO_END",o)>=0?endPos=o.toString().length:endPos=startPos+r.toString().length,{start:startPos,end:endPos,width:endPos-startPos}):null},r=function(r){var o=t(r);if(void 0!==r.selectionStart)return document.activeElement&&document.activeElement!=r&&r.selectionStart==r.selectionEnd&&0==r.selectionStart?{start:r.value.length,end:r.value.length,width:0}:{start:r.selectionStart,end:r.selectionEnd,width:r.selectionEnd-r.selectionStart};if(o.getSelection)return n(r,o);try{if("input"==r.nodeName.toLowerCase()){var a=t(r).document.selection.createRange(),c=r.createTextRange();c.setEndPoint("EndToStart",a);var l=c.text.length;return{start:l,end:l+a.text.length,width:a.text.length}}var s=n(r,o);if(!s)return s;var i=e.Range.current().clone(),d=i.clone().collapse().range,u=i.clone().collapse(!1).range;return d.moveStart("character",-1),u.moveStart("character",-1),0!=s.startPos&&""==d.text&&(s.startPos+=2),0!=s.endPos&&""==u.text&&(s.endPos+=2),s}catch(g){return{start:r.value.length,end:r.value.length,width:0}}},o=function(e,n,r){var o=t(e);if(e.setSelectionRange)void 0===r?(e.focus(),e.setSelectionRange(n,n)):(e.select(),e.selectionStart=n,e.selectionEnd=r);else if(e.createTextRange){var a=e.createTextRange();a.moveStart("character",n),r=r||n,a.moveEnd("character",r-e.value.length),a.select()}else if(o.getSelection){var l=o.document,s=o.getSelection(),i=l.createRange(),d=[n,void 0!==r?r:n];c([e],d),i.setStart(d[0].el,d[0].count),i.setEnd(d[1].el,d[1].count),s.removeAllRanges(),s.addRange(i)}else if(o.document.body.createTextRange){var i=document.body.createTextRange();i.moveToElementText(e),i.collapse(),i.moveStart("character",n),i.moveEnd("character",void 0!==r?r:n),i.select()}},a=function(e,t,n,r){"number"==typeof n[0]&&n[0]<t&&(n[0]={el:r,count:n[0]-e}),"number"==typeof n[1]&&n[1]<=t&&(n[1]={el:r,count:n[1]-e})},c=function(e,t,n){var r,o;n=n||0;for(var l=0;e[l];l++)r=e[l],3===r.nodeType||4===r.nodeType?(o=n,n+=r.nodeValue.length,a(o,n,t,r)):8!==r.nodeType&&(n=c(r.childNodes,t,n));return n};return e.fn.selection=function(e,t){return void 0!==e?this.each(function(){o(this,e,t)}):r(this[0])},e.fn.selection.getCharElement=c,e});
/*jquerypp@2.0.2#dom/within/within*/
define("jquerypp/dom/within/within",["jquery/jquery"],function(t){var i=function(t,i,e,h,n,s){return i>=h&&h+s>i&&t>=e&&e+n>t};return t.fn.within=function(e,h,n){var s=[];return this.each(function(){var f=jQuery(this);if(this==document.documentElement)return s.push(this);var u=n?t.data(this,"offsetCache")||t.data(this,"offsetCache",f.offset()):f.offset(),o=i(e,h,u.left,u.top,this.offsetWidth,this.offsetHeight);o&&s.push(this)}),this.pushStack(t.unique(s),"within",e+","+h)},t.fn.withinBox=function(i,e,h,n,s){var f=[];return this.each(function(){var u=jQuery(this);if(this==document.documentElement)return f.push(this);var o=s?t.data(this,"offset")||t.data(this,"offset",u.offset()):u.offset(),r=u.width(),a=u.height(),c=!(o.top>e+n||o.top+a<e||o.left>i+h||o.left+r<i);c&&f.push(this)}),this.pushStack(t.unique(f),"withinBox",t.makeArray(arguments).join(","))},t});
/*jquerypp@2.0.2#lang/vector/vector*/
define("jquerypp/lang/vector/vector",["jquery/jquery"],function(t){var e=function(t){return void 0!==t?this.array[0]=t:this.array[0]},r=function(t){return void 0!==t?this.array[1]=t:this.array[1]};return t.Vector=function(e){var r=t.isArray(e)?e:t.makeArray(arguments);this.update(r)},t.Vector.prototype={app:function(e){var r,n=[];for(r=0;r<this.array.length;r++)n.push(e(this.array[r],r));return new t.Vector(n)},plus:function(){var e,r=arguments[0]instanceof t.Vector?arguments[0].array:t.makeArray(arguments),n=this.array.slice(0),a=new t.Vector;for(e=0;e<r.length;e++)n[e]=(n[e]?n[e]:0)+r[e];return a.update(n)},minus:function(){var e,r=arguments[0]instanceof t.Vector?arguments[0].array:t.makeArray(arguments),n=this.array.slice(0),a=new t.Vector;for(e=0;e<r.length;e++)n[e]=(n[e]?n[e]:0)-r[e];return a.update(n)},equals:function(){var e,r=arguments[0]instanceof t.Vector?arguments[0].array:t.makeArray(arguments),n=this.array.slice(0),a=new t.Vector;for(e=0;e<r.length;e++)if(n[e]!=r[e])return null;return a.update(n)},x:e,left:e,width:e,y:r,top:r,height:r,toString:function(){return"("+this.array.join(", ")+")"},update:function(t){var e;if(this.array)for(e=0;e<this.array.length;e++)delete this.array[e];for(this.array=t,e=0;e<t.length;e++)this[e]=this.array[e];return this}},t.Event.prototype.vector=function(){var e="ontouchend"in document&&this.originalEvent.changedTouches&&this.originalEvent.changedTouches.length?this.originalEvent.changedTouches[0]:this;if(this.originalEvent.synthetic){var r=document.documentElement,n=document.body;return new t.Vector(e.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r.clientLeft||0),e.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r.clientTop||0))}return new t.Vector(e.pageX,e.pageY)},t.fn.offsetv=function(){if(this[0]==window)return new t.Vector(window.pageXOffset?window.pageXOffset:document.documentElement.scrollLeft,window.pageYOffset?window.pageYOffset:document.documentElement.scrollTop);var e=this.offset()||{};return new t.Vector(e.left,e.top)},t.fn.dimensionsv=function(e){return this[0]!=window&&e?new t.Vector(this[e+"Width"](),this[e+"Height"]()):new t.Vector(this.width(),this.height())},t});
/*jquerypp@2.0.2#event/livehack/livehack*/
define("jquerypp/event/livehack/livehack",["jquery/jquery"],function(e){var n=e.event,t=function(e,n,t,i){var r,s,l,o,a,c,u,h,d;for(r=0;r<n.length;r++)for(s=n[r],o=s.indexOf(".")<0,o||(u=s.split("."),s=u.shift(),h=new RegExp("(^|\\.)"+u.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")),l=(e[s]||[]).slice(0),a=0;a<l.length;a++)c=l[a],d=o||h.test(c.namespace),d&&(i?c.selector===i&&t(s,c.origHandler||c.handler):null===i?t(s,c.origHandler||c.handler,c.selector):c.selector||t(s,c.origHandler||c.handler))};return n.find=function(n,i,r){var s=(e._data(n)||{}).events,l=[];return s?(t(s,i,function(e,n){l.push(n)},r),l):l},n.findBySelector=function(n,i){var r=e._data(n).events,s={},l=function(e,n,t){var i=s[e]||(s[e]={}),r=i[n]||(i[n]=[]);r.push(t)};return r?(t(r,i,function(e,n,t){l(t||"",e,n)},null),s):s},n.supportTouch="ontouchend"in document,e.fn.respondsTo=function(t){return this.length?n.find(this[0],e.isArray(t)?t:[t]).length>0:!1},e.fn.triggerHandled=function(n,t){return n="string"==typeof n?e.Event(n):n,this.trigger(n,t),n.handled},n.setupHelper=function(t,i,r){r||(r=i,i=null);var s=function(s){var l,o=s.selector||"",a=s.namespace?"."+s.namespace:"";o?(l=n.find(this,t,o),l.length||e(this).delegate(o,i+a,r)):n.find(this,t,o).length||n.add(this,i+a,r,{selector:o,delegate:this})},l=function(s){var l,o=s.selector||"";o?(l=n.find(this,t,o),l.length||e(this).undelegate(o,i,r)):n.find(this,t,o).length||n.remove(this,i,r,{selector:o,delegate:this})};e.each(t,function(){n.special[this]={add:s,remove:l,setup:function(){},teardown:function(){}}})},e});
/*jquerypp@2.0.2#event/reverse/reverse*/
define("jquerypp/event/reverse/reverse",["jquery/jquery"],function(e){return e.event.reverse=function(n,t){var i=e(),r=0,a=e.event.handle||e.event.dispatch;return e.event.special[n]={setup:function(){return this!==window&&(i.push(this),e.unique(i)),this!==window},teardown:function(){return i=i.not(this),this!==window},add:function(n){var o=n.handler;n.origHandler=o,n.handler=function(o,s){var d=this===window;if(t&&t.handler){var u=t.handler.apply(this,arguments);if(u===!0)return}if(0===r){r++;var h=s===!1?o.target:this;if(a.call(h,o,s),o.isPropagationStopped())return void r--;for(var l,p,c=i.index(this),f=i.length;++c<f&&(l=i[c])&&(d||e.contains(h,l));)if(a.call(l,o,s),o.isPropagationStopped())for(;++c<f&&(p=i[c]);)if(!e.contains(l,p)){c--;break}o.stopImmediatePropagation(),r--}else n.origHandler.call(this,o,s)}}},e([document,window]).bind(n,function(){}),e.event.special[n]},e});
/*jquerypp@2.0.2#event/drag/core/core*/
define("jquerypp/event/drag/core/core",["jquery/jquery","jquerypp/lang/vector/vector","jquerypp/event/livehack/livehack","jquerypp/event/reverse/reverse"],function(t){t.event.special.move||t.event.reverse("move");var e=function(e,n){var i=Array.prototype.slice.call(arguments,2);return function(){var s=[this].concat(i,t.makeArray(arguments));return n.apply(e,s)}},n=t.event,i=window.getSelection?function(){window.getSelection().removeAllRanges()}:function(){},s=!window._phantom&&"ontouchend"in document,o=s?"touchstart":"mousedown",r=s?"touchend":"mouseup",l=s?"touchmove":"mousemove",h=function(t){t.preventDefault()};return t.Drag=function(){},t.extend(t.Drag,{lowerName:"drag",current:null,distance:0,mousedown:function(e,i){var o=0===e.button||1==e.button,r=o||s;if(r&&!this.current){var l=new t.Drag,h=e.delegateTarget||i,c=e.handleObj.selector,a=this;this.current=l,l.setup({element:i,delegate:e.delegateTarget||i,selector:e.handleObj.selector,moved:!1,_distance:this.distance,callbacks:{dragdown:n.find(h,["dragdown"],c),draginit:n.find(h,["draginit"],c),dragover:n.find(h,["dragover"],c),dragmove:n.find(h,["dragmove"],c),dragout:n.find(h,["dragout"],c),dragend:n.find(h,["dragend"],c),dragcleanup:n.find(h,["dragcleanup"],c)},destroyed:function(){a.current=null}},e)}}}),t.extend(t.Drag.prototype,{setup:function(n,o){t.extend(this,n),this.element=t(this.element),this.event=o,this.moved=!1,this.allowOtherDrags=!1;var c=e(this,this.mousemove),a=e(this,this.mouseup);this._mousemove=c,this._mouseup=a,this._distance=n.distance?n.distance:0,this.mouseStartPosition=o.vector(),t(document).bind(l,c),t(document).bind(r,a),s&&t(document).bind(l,h),this.callEvents("down",this.element,o)||(this.noSelection(this.delegate),i())},destroy:function(){t(document).unbind(l,this._mousemove),t(document).unbind(r,this._mouseup),s&&t(document).unbind(l,h),this.moved||(this.event=this.element=null),s||this.selection(this.delegate),this.destroyed()},mousemove:function(t,e){if(!this.moved){var n=Math.sqrt(Math.pow(e.pageX-this.event.pageX,2)+Math.pow(e.pageY-this.event.pageY,2));if(n<this._distance)return!1;this.init(this.element,e),this.moved=!0}this.element.trigger("move",this);var i=e.vector();this._start_position&&this._start_position.equal(i)||this.draw(i,e)},mouseup:function(t,e){this.moved&&this.end(e),this.destroy()},noSelection:function(e){e=e||this.delegate,document.documentElement.onselectstart=function(){return!1},document.documentElement.unselectable="on",this.selectionDisabled=this.selectionDisabled?this.selectionDisabled.add(e):t(e),this.selectionDisabled.css("-moz-user-select","-moz-none")},selection:function(){this.selectionDisabled&&(document.documentElement.onselectstart=function(){},document.documentElement.unselectable="off",this.selectionDisabled.css("-moz-user-select",""))},init:function(e,n){e=t(e);var i=this.movingElement=this.element=t(e);this._cancelled=!1,this.event=n,this.mouseElementPosition=this.mouseStartPosition.minus(this.element.offsetv()),this.callEvents("init",e,n),this._cancelled!==!0&&(this.startPosition=i!=this.movingElement?this.movingElement.offsetv():this.currentDelta(),this.makePositioned(this.movingElement),this.oldZIndex=this.movingElement.css("zIndex"),this.movingElement.css("zIndex",1e3),!this._only&&this.constructor.responder&&this.constructor.responder.compile(n,this))},makePositioned:function(t){var e,n=t.css("position");n&&"static"!=n||(e={position:"relative"},window.opera&&(e.top="0px",e.left="0px"),t.css(e))},callEvents:function(t,e,n,i){var s,o=this.callbacks[this.constructor.lowerName+t];for(s=0;s<o.length;s++)o[s].call(e,n,this,i);return o.length},currentDelta:function(){return new t.Vector(parseInt(this.movingElement.css("left"),10)||0,parseInt(this.movingElement.css("top"),10)||0)},draw:function(t,e){this._cancelled||(i(),this.location=t.minus(this.mouseElementPosition),this.move(e),this._cancelled||(e.isDefaultPrevented()||this.position(this.location),!this._only&&this.constructor.responder&&this.constructor.responder.show(t,this,e)))},position:function(t){var e,n=this.currentDelta(),i=this.movingElement.offsetv().minus(n);this.required_css_position=t.minus(i),this.offsetv=t,e=this.movingElement[0].style,this._cancelled||this._horizontal||(e.top=this.required_css_position.top()+"px"),this._cancelled||this._vertical||(e.left=this.required_css_position.left()+"px")},move:function(t){this.callEvents("move",this.element,t)},over:function(t,e){this.callEvents("over",this.element,t,e)},out:function(t,e){this.callEvents("out",this.element,t,e)},end:function(t){if(!this._cancelled){if(!this._only&&this.constructor.responder&&this.constructor.responder.end(t,this),this.callEvents("end",this.element,t),this._revert){var e=this;this.movingElement.animate({top:this.startPosition.top()+"px",left:this.startPosition.left()+"px"},function(){e.cleanup.apply(e,arguments)})}else this.cleanup(t);this.event=null}},cleanup:function(t){this.movingElement.css({zIndex:this.oldZIndex}),this.movingElement[0]===this.element[0]||this.movingElement.has(this.element[0]).length||this.element.has(this.movingElement[0]).length||this.movingElement.css({display:"none"}),this._removeMovingElement&&this.movingElement.remove(),t&&this.callEvents("cleanup",this.element,t),this.movingElement=this.element=this.event=null},cancel:function(){this._cancelled=!0,!this._only&&this.constructor.responder&&this.constructor.responder.clear(this.event.vector(),this,this.event),this.destroy()},ghost:function(e){var n=this.movingElement.clone().css("position","absolute");return e?t(e).append(n):t(this.movingElement).after(n),n.width(this.movingElement.width()).height(this.movingElement.height()),n.offset(this.movingElement.offset()),this.movingElement=n,this.noSelection(n),this._removeMovingElement=!0,n},representative:function(e,n,i){this._offsetX=n||0,this._offsetY=i||0;var s=this.mouseStartPosition;return this.movingElement=t(e),this.movingElement.css({top:s.y()-this._offsetY+"px",left:s.x()-this._offsetX+"px",display:"block",position:"absolute"}).show(),this.noSelection(this.movingElement),this.mouseElementPosition=new t.Vector(this._offsetX,this._offsetY),this},revert:function(t){return this._revert=void 0===t?!0:t,this},vertical:function(){return this._vertical=!0,this},horizontal:function(){return this._horizontal=!0,this},only:function(t){return this._only=void 0===t?!0:t},distance:function(t){return void 0!==t?(this._distance=t,this):this._distance}}),n.setupHelper(["dragdown","draginit","dragover","dragmove","dragout","dragend","dragcleanup"],o,function(e){t.Drag.mousedown.call(t.Drag,e,this)}),t});
/*jquerypp@2.0.2#event/drag/step/step*/
define("jquerypp/event/drag/step/step",["jquery/jquery","jquerypp/event/drag/core/core"],function(t){var e=function(t,e){return Math.round(t/e)*e};return t.Drag.prototype.step=function(e,r,o){"number"==typeof e&&(e={x:e,y:e}),r=r||t(document.body),this._step=e;var p=r.css(["borderTopWidth","paddingTop","borderLeftWidth","paddingLeft"]),s=parseInt(p.borderTopWidth)+parseInt(p.paddingTop),n=parseInt(p.borderLeftWidth)+parseInt(p.paddingLeft);return this._step.offset=r.offsetv().plus(n,s),this._step.center=o,this},function(){var r=t.Drag.prototype.position;t.Drag.prototype.position=function(t){if(this._step){var o=this._step,p=o.center&&o.center.toLowerCase(),s=this.movingElement.dimensionsv("outer"),n=o.offset.top()-(p&&"x"!=p?s.height()/2:0),i=o.offset.left()-(p&&"y"!=p?s.width()/2:0);this._step.x&&t.left(Math.round(i+e(t.left()-i,this._step.x))),this._step.y&&t.top(Math.round(n+e(t.top()-n,this._step.y)))}r.call(this,t)}}(),t});
/*jquerypp@2.0.2#event/drag/limit/limit*/
define("jquerypp/event/drag/limit/limit",["jquery/jquery","jquerypp/event/drag/core/core"],function(t){t.Drag.prototype.limit=function(e,i){var o=e.css(["borderTopWidth","paddingTop","borderLeftWidth","paddingLeft"]),r=new t.Vector(parseInt(o.borderLeftWidth,10)+parseInt(o.paddingLeft,10)||0,parseInt(o.borderTopWidth,10)+parseInt(o.paddingTop,10)||0);return this._limit={offset:e.offsetv().plus(r),size:e.dimensionsv(),center:i===!0?"both":i},this};var e=t.Drag.prototype.position;return t.Drag.prototype.position=function(t){if(this._limit){var i=this._limit,o=i.center&&i.center.toLowerCase(),r=this.movingElement.dimensionsv("outer"),n=o&&"x"!=o?r.height()/2:0,p=o&&"y"!=o?r.width()/2:0,s=i.offset.top(),d=i.offset.left(),f=i.size.height(),h=i.size.width();t.top()+n<s&&t.top(s-n),t.top()+r.height()-n>s+f&&t.top(s+f-r.height()+n),t.left()+p<d&&t.left(d-p),t.left()+r.width()-p>d+h&&t.left(d+h-r.left()+p)}e.call(this,t)},t});
/*jquerypp@2.0.2#event/drop/drop*/
define("jquerypp/event/drop/drop",["jquery/jquery","jquerypp/event/drag/core/core","jquerypp/dom/within/within","jquerypp/dom/compare/compare"],function(e){var t=e.event,n=["dropover","dropon","dropout","dropinit","dropmove","dropend"];return e.Drop=function(t,n){e.extend(this,t),this.element=e(n)},e.each(n,function(){t.special[this]={add:function(t){var n=e(this),r=n.data("dropEventCount")||0;n.data("dropEventCount",r+1),0==r&&e.Drop.addElement(this)},remove:function(){var t=e(this),n=t.data("dropEventCount")||0;t.data("dropEventCount",n-1),1>=n&&e.Drop.removeElement(this)}}}),e.extend(e.Drop,{lowerName:"drop",_rootElements:[],_elements:e(),last_active:[],endName:"dropon",addElement:function(e){for(var t=0;t<this._rootElements.length;t++)if(e==this._rootElements[t])return;this._rootElements.push(e)},removeElement:function(e){for(var t=0;t<this._rootElements.length;t++)if(e==this._rootElements[t])return void this._rootElements.splice(t,1)},sortByDeepestChild:function(e,t){var n=e.element.compare(t.element);return 16&n||4&n?1:8&n||2&n?-1:0},isAffected:function(e,t,n){return n.element!=t.element&&1==n.element.within(e[0],e[1],n._cache).length},deactivate:function(e,t,n){t.out(n,e),e.callHandlers(this.lowerName+"out",e.element[0],n,t)},activate:function(e,t,n){t.over(n,e),e.callHandlers(this.lowerName+"over",e.element[0],n,t)},move:function(e,t,n){e.callHandlers(this.lowerName+"move",e.element[0],n,t)},compile:function(t,r){if(this.dragging||r){this.dragging||(this.dragging=r,this.last_active=[]);for(var i,a,o,s,l=[],h=this.dragging,d=0;d<this._rootElements.length;d++){i=this._rootElements[d];var a=e.event.findBySelector(i,n);for(o in a){s=o?jQuery(o,i):[i];for(var c=0;c<s.length;c++)this.addCallbacks(s[c],a[o],h)&&l.push(s[c])}}this.add(l,t,h)}},addCallbacks:function(t,n,r){var i=e.data(t,"_dropData");if(!i)return e.data(t,"_dropData",new e.Drop(n,t)),!0;if(!r){var a=i;for(var o in n)a[o]=a[o]?a[o].concat(n[o]):n[o];return!1}},add:function(t,n,r,i){for(var a,o=0;o<t.length;)a=e.data(t[o],"_dropData"),a.callHandlers(this.lowerName+"init",t[o],n,r),a._canceled?t.splice(o,1):o++;this._elements.push.apply(this._elements,t)},show:function(t,n,r){n.element;if(this._elements.length){for(var i,a,o,s,l,h=[],d=!0,c=0,p=this.last_active,m=this;c<this._elements.length;)l=e.data(this._elements[c],"_dropData"),l?(c++,m.isAffected(t,n,l)&&h.push(l)):this._elements.splice(c,1);for(h.sort(this.sortByDeepestChild),r.stopRespondPropagate=function(){d=!1},o=h.slice(),this.last_active=h,i=0;i<p.length;i++){for(a=p[i],c=0;s=o[c];){if(a==s){o.splice(c,1);break}c++}if(s||this.deactivate(a,n,r),!d)return}for(var c=0;c<o.length;c++)if(this.activate(o[c],n,r),!d)return;for(c=0;c<h.length;c++)if(this.move(h[c],n,r),!d)return}},end:function(t,n){for(var r,i,a=this.lowerName+"end",o=e.Event(this.endName,t),s=0;s<this.last_active.length&&(r=this.last_active[s],this.isAffected(t.vector(),n,r)&&r[this.endName]&&r.callHandlers(this.endName,null,o,n),!o.isPropagationStopped());s++);for(var l=0;l<this._elements.length;l++)i=e.data(this._elements[l],"_dropData"),i&&i.callHandlers(a,null,t,n);this.clear()},clear:function(){this._elements.each(function(){e.removeData(this,"_dropData")}),this._elements=e(),delete this.dragging}}),e.Drag.responder=e.Drop,e.extend(e.Drop.prototype,{callHandlers:function(e,t,n,r){for(var i=this[e]?this[e].length:0,a=0;i>a;a++)this[e][a].call(t||this.element[0],n,this,r)},cache:function(e){this._cache=null!=e?e:!0},cancel:function(){this._canceled=!0}}),e});
/*jquerypp@2.0.2#event/drag/scroll/scroll*/
define("jquerypp/event/drag/scroll/scroll",["jquery/jquery","jquerypp/event/drop/drop"],function(t){return t.Drag.prototype.scrolls=function(e,n){for(var e=t(e),i=0;i<e.length;i++)this.constructor.responder._elements.push(e.eq(i).data("_dropData",new t.Scrollable(e[i],n))[0])},t.Scrollable=function(e,n){this.element=jQuery(e),this.options=t.extend({distance:30,delta:function(t,e){return(e-t)/2},direction:"xy",delay:15},n),this.x=-1!=this.options.direction.indexOf("x"),this.y=-1!=this.options.direction.indexOf("y")},t.extend(t.Scrollable.prototype,{init:function(t){this.element=jQuery(t)},callHandlers:function(t,e,n,i){this[t](e||this.element[0],n,this,i)},dropover:function(){},dropon:function(){this.clear_timeout()},dropout:function(){this.clear_timeout()},dropinit:function(){},dropend:function(){},clear_timeout:function(){this.interval&&(clearTimeout(this.interval),this.interval=null)},distance:function(t){return(30-t)/2},dropmove:function(e,n,i,o){this.clear_timeout();var r=n.vector(),s=t(e==document.documentElement?window:e),l=s.dimensionsv("outer"),c=s.offsetv(),u=c.y()+l.y()-r.y(),a=r.y()-c.y(),d=c.x()+l.x()-r.x(),p=r.x()-c.x(),h=0,f=0,m=this.options.distance;if(m>u&&this.y?f=this.options.delta(u,m):m>a&&this.y&&(f=-this.options.delta(a,m)),m>d&&this.options&&this.x?h=this.options.delta(d,m):m>p&&this.x&&(h=-this.options.delta(p,m)),h||f){var y=this;this.interval=setTimeout(function(){y.move(t(e),o.movingElement,h,f,n,n.clientX,n.clientY,n.screenX,n.screenY)},this.options.delay)}},move:function(e,n,i,o,r){e.scrollTop(e.scrollTop()+o),e.scrollLeft(e.scrollLeft()+i),n.trigger(t.event.fix({type:"mousemove",clientX:r.clientX,clientY:r.clientY,screenX:r.screenX,screenY:r.screenY,pageX:r.pageX,pageY:r.pageY}))}}),t});
/*jquerypp@2.0.2#event/drag/drag*/
define("jquerypp/event/drag/drag",["jquery/jquery","jquerypp/event/drag/core/core","jquerypp/event/drag/step/step","jquerypp/event/drag/limit/limit","jquerypp/event/drag/scroll/scroll"],function(e){return e});
/*jquerypp@2.0.2#event/hover/hover*/
define("jquerypp/event/hover/hover",["jquery/jquery","jquerypp/event/livehack/livehack"],function(e){e.Hover=function(){this._delay=e.Hover.delay,this._distance=e.Hover.distance,this._leave=e.Hover.leave},e.extend(e.Hover,{delay:100,distance:10,leave:0}),e.extend(e.Hover.prototype,{delay:function(e){return this._delay=e,this},distance:function(e){return this._distance=e,this},leave:function(e){return this._leave=e,this}});var a=e.event,t=(a.handle,function(n){var i=n.delegateTarget||n.currentTarget,o=n.handleObj.selector,r=e.data(i,"_hover"+o);if(r){if(!r.forcing){r.forcing=!0,clearTimeout(r.leaveTimer);var v=r.leaving?Math.max(0,r.hover.leave-(new Date-r.leaving)):r.hover.leave,l=this;setTimeout(function(){r.callHoverLeave(),t.call(l,n)},v)}}else{var u,c,h={pageX:n.pageX,pageY:n.pageY},s=0,d=this,f=!1,g=n,p=new e.Hover,m=function(){e.each(a.find(i,["hoverleave"],o),function(){this.call(d,n,p)}),T()},_=function(e){clearTimeout(c),s+=Math.pow(e.pageX-h.pageX,2)+Math.pow(e.pageY-h.pageY,2),h={pageX:e.pageX,pageY:e.pageY},g=e},y=function(e){clearTimeout(u),f?0===p._leave?m():(clearTimeout(c),r.leaving=new Date,c=r.leaveTimer=setTimeout(function(){m()},p._leave)):T()},T=function(){e(d).unbind("mouseleave",y),e(d).unbind("mousemove",_),e.removeData(i,"_hover"+o)},H=function(){e.each(a.find(i,["hoverenter"],o),function(){this.call(d,g,p)}),f=!0};r={callHoverLeave:m,hover:p},e.data(i,"_hover"+o,r),e(d).bind("mousemove",_).bind("mouseleave",y),e.each(a.find(i,["hoverinit"],o),function(){this.call(d,n,p)}),0===p._delay?H():u=setTimeout(function(){return s<p._distance&&0==e(d).queue().length?void H():(s=0,void(u=setTimeout(arguments.callee,p._delay)))},p._delay)}});return a.setupHelper(["hoverinit","hoverenter","hoverleave","hovermove"],"mouseenter",t),e});
/*jquerypp@2.0.2#event/key/key*/
define("jquerypp/event/key/key",["jquery/jquery"],function(e){var r=function(e){e=e.toLowerCase();var r=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:r[1]||"",version:r[2]||"0"}},o={},t={},n=r(navigator.userAgent).browser;return e.event.key=function(r,i){if(void 0===r)return o;void 0===i&&(i=r,r=n),o[r]||(o[r]={}),e.extend(o[r],i),t[r]||(t[r]={});for(var a in i)t[r][i[a]]=a},e.event.key({"\b":"8"," ":"9","\r":"13",shift:"16",ctrl:"17",alt:"18","pause-break":"19",caps:"20",escape:"27","num-lock":"144","scroll-lock":"145",print:"44","page-up":"33","page-down":"34",end:"35",home:"36",left:"37",up:"38",right:"39",down:"40",insert:"45","delete":"46"," ":"32",0:"48",1:"49",2:"50",3:"51",4:"52",5:"53",6:"54",7:"55",8:"56",9:"57",a:"65",b:"66",c:"67",d:"68",e:"69",f:"70",g:"71",h:"72",i:"73",j:"74",k:"75",l:"76",m:"77",n:"78",o:"79",p:"80",q:"81",r:"82",s:"83",t:"84",u:"85",v:"86",w:"87",x:"88",y:"89",z:"90",num0:"96",num1:"97",num2:"98",num3:"99",num4:"100",num5:"101",num6:"102",num7:"103",num8:"104",num9:"105","*":"106","+":"107","-":"109",".":"110","/":"111",";":"186","=":"187",",":"188","-":"189",".":"190","/":"191","`":"192","[":"219","\\":"220","]":"221","'":"222","left window key":"91","right window key":"92","select key":"93",f1:"112",f2:"113",f3:"114",f4:"115",f5:"116",f6:"117",f7:"118",f8:"119",f9:"120",f10:"121",f11:"122",f12:"123"}),e.Event.prototype.keyName=function(){var e=this,r=/\w/,o=t[n][(e.keyCode||e.which)+""],i=String.fromCharCode(e.keyCode||e.which),a=e.charCode&&t[n][e.charCode+""],f=e.charCode&&String.fromCharCode(e.charCode);return f&&r.test(f)?f.toLowerCase():a&&r.test(a)?f.toLowerCase():i&&r.test(i)?i.toLowerCase():o&&r.test(o)?o.toLowerCase():"keypress"==e.type?e.keyCode?String.fromCharCode(e.keyCode):String.fromCharCode(e.which):!e.keyCode&&e.which?String.fromCharCode(e.which):t[n][e.keyCode+""]},e});
/*jquerypp@2.0.2#event/default/default*/
define("jquerypp/event/default/default",["jquery/jquery"],function(e){e.fn.triggerAsync=function(e,t,n,r){if("function"==typeof t&&(r=n,n=t,t=void 0),this.length){var u=this;setTimeout(function(){u.trigger({type:e,_success:n,_prevented:r},t)},0)}else n&&n.call(this);return this};var t={},n=/\.(.*)$/,r=e.event;r.special["default"]={add:function(e){t[e.namespace.replace(n,"")]=!0},setup:function(){return!0}};var u=r.trigger;return r.trigger=function(t,n,r,a){var i=t.type||t,t="object"==typeof t?t[e.expando]?t:new e.Event(i,t):new e.Event(i),s=u.call(e.event,t,n,r,a),d=t.isPaused&&t.isPaused();return a||t.isDefaultPrevented()||0===t.type.indexOf("default")||(u("default."+t.type,n,r),t._success&&t._success(t)),a||!t.isDefaultPrevented()||0===t.type.indexOf("default")||d||t._prevented&&t._prevented(t),d&&(t.isDefaultPrevented=t.pausedState.isDefaultPrevented,t.isPropagationStopped=t.pausedState.isPropagationStopped),s},e});
/*jquerypp@2.0.2#event/pause/pause*/
define("jquerypp/event/pause/pause",["jquery/jquery","jquerypp/event/default/default"],function(e){var t=function(){return!1},i=function(){return!0};return e.Event.prototype.isPaused=t,e.Event.prototype.pause=function(){this.pausedState={isDefaultPrevented:this.isDefaultPrevented()?i:t,isPropagationStopped:this.isPropagationStopped()?i:t},this.stopImmediatePropagation(),this.preventDefault(),this.isPaused=i},e.Event.prototype.resume=function(){var i=this.handleObj,a=this.currentTarget,n=e.event.special[i.origType],p=n&&n.handle;n||(e.event.special[i.origType]={}),e.event.special[i.origType].handle=function(t){t.handleObj===i&&t.currentTarget===a&&(n?e.event.special[i.origType].handle=p:delete e.event.special[i.origType])},delete this.pausedState,this.isPaused=this.isImmediatePropagationStopped=t,this.isPropagationStopped()||e.event.trigger(this,[],this.target)},e});
/*jquerypp@2.0.2#event/removed/removed*/
define("jquerypp/event/removed/removed",["jquery/jquery"],function(e){var r=e.cleanData;return e.cleanData=function(n){for(var a,o=0;void 0!==(a=n[o]);o++)e(a).triggerHandler("removed");r(n)},e});
/*jquerypp@2.0.2#event/resize/resize*/
define("jquerypp/event/resize/resize",["jquerypp/event/reverse/reverse"],function(e){var r,i=e(window),n=0,t=0;return e(function(){n=i.width(),t=i.height()}),e.event.reverse("resize",{handler:function(e,u){var v=this===window;if(v&&e.originalEvent){var o=i.width(),s=i.height();return(o!=n||s!=t)&&(n=o,t=s,clearTimeout(r),r=setTimeout(function(){i.trigger("resize")},1)),!0}}}),e});
/*jquerypp@2.0.2#event/swipe/swipe*/
define("jquerypp/event/swipe/swipe",["jquery/jquery","jquerypp/event/livehack/livehack"],function(e){var t=/Phantom/.test(navigator.userAgent),n=!t&&"ontouchend"in document,o=n?"touchstart":"mousedown",i=n?"touchend":"mouseup",s=n?"touchmove":"mousemove",r=function(t){var n=t.originalEvent.touches?t.originalEvent.touches[0]:t;return{time:(new Date).getTime(),coords:[n.clientX,n.clientY],origin:e(t.target)}},a=e.event.swipe={delay:500,max:320,min:30};return e.event.setupHelper(["swipe","swipeleft","swiperight","swipeup","swipedown"],o,function(t){function n(e){c&&(o=r(e),Math.abs(c.coords[0]-o.coords[0])>10&&e.preventDefault())}var o,c=r(t),u=t.delegateTarget||t.currentTarget,d=t.handleObj.selector,p=this;e(document.documentElement).bind(s,n).one(i,function(i){if(e(this).unbind(s,n),c&&o){var r=Math.abs(c.coords[0]-o.coords[0]),h=Math.abs(c.coords[1]-o.coords[1]),m=Math.sqrt(r*r+h*h);if(o.time-c.time<a.delay&&m>=a.min&&m<=a.max){var v=["swipe"];r>=a.min&&h<a.min?v.push(c.coords[0]>o.coords[0]?"swipeleft":"swiperight"):h>=a.min&&r<a.min&&v.push(c.coords[1]<o.coords[1]?"swipedown":"swipeup"),e.each(e.event.find(u,v,d),function(){this.call(p,t,{start:c,end:o})})}}c=o=void 0})}),e});
/*jquerypp@2.0.2#index*/
define("jquerypp",["jquery/jquery","jquerypp/dom/animate/animate","jquerypp/dom/compare/compare","jquerypp/dom/cookie/cookie","jquerypp/dom/form_params/form_params","jquerypp/dom/range/range","jquerypp/dom/selection/selection","jquerypp/dom/within/within","jquerypp/event/drag/drag","jquerypp/event/drop/drop","jquerypp/event/hover/hover","jquerypp/event/key/key","jquerypp/event/pause/pause","jquerypp/event/removed/removed","jquerypp/event/resize/resize","jquerypp/event/swipe/swipe","jquerypp/lang/vector/vector"],function(e){return e});
/*[global-shim-end]*/
!function(){window._define=window.define,window.define=window.define.orig,window.System=window.System.orig}();