!function(e,t){function o(e){var t=pt[e]={};return Z.each(e.split(tt),function(e,o){t[o]=!0}),t}function n(e,o,n){if(n===t&&1===e.nodeType){var i="data-"+o.replace(mt,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:ft.test(n)?Z.parseJSON(n):n}catch(r){}Z.data(e,o,n)}else n=t}return n}function i(e){var t;for(t in e)if(("data"!==t||!Z.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function r(){return!1}function s(){return!0}function l(e){return!e||!e.parentNode||11===e.parentNode.nodeType}function a(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function c(e,t,o){if(t=t||0,Z.isFunction(t))return Z.grep(e,function(e,n){var i=!!t.call(e,n,e);return i===o});if(t.nodeType)return Z.grep(e,function(e){return e===t===o});if("string"==typeof t){var n=Z.grep(e,function(e){return 1===e.nodeType});if(Mt.test(t))return Z.filter(t,n,!o);t=Z.filter(t,n)}return Z.grep(e,function(e){return Z.inArray(e,t)>=0===o})}function g(e){var t=Ht.split("|"),o=e.createDocumentFragment();if(o.createElement)for(;t.length;)o.createElement(t.pop());return o}function u(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e,t){if(1===t.nodeType&&Z.hasData(e)){var o,n,i,r=Z._data(e),s=Z._data(t,r),l=r.events;if(l){delete s.handle,s.events={};for(o in l)for(n=0,i=l[o].length;i>n;n++)Z.event.add(t,o,l[o][n])}s.data&&(s.data=Z.extend({},s.data))}}function d(e,t){var o;1===t.nodeType&&(t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),o=t.nodeName.toLowerCase(),"object"===o?(t.parentNode&&(t.outerHTML=e.outerHTML),Z.support.html5Clone&&e.innerHTML&&!Z.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===o&&Xt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===o?t.selected=e.defaultSelected:"input"===o||"textarea"===o?t.defaultValue=e.defaultValue:"script"===o&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(Z.expando))}function p(e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName("*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll("*"):[]}function f(e){Xt.test(e.type)&&(e.defaultChecked=e.checked)}function m(e,t){if(t in e)return t;for(var o=t.charAt(0).toUpperCase()+t.slice(1),n=t,i=_o.length;i--;)if(t=_o[i]+o,t in e)return t;return n}function y(e,t){return e=t||e,"none"===Z.css(e,"display")||!Z.contains(e.ownerDocument,e)}function _(e,t){for(var o,n,i=[],r=0,s=e.length;s>r;r++)o=e[r],o.style&&(i[r]=Z._data(o,"olddisplay"),t?(!i[r]&&"none"===o.style.display&&(o.style.display=""),""===o.style.display&&y(o)&&(i[r]=Z._data(o,"olddisplay",B(o.nodeName)))):(n=oo(o,"display"),!i[r]&&"none"!==n&&Z._data(o,"olddisplay",n)));for(r=0;s>r;r++)o=e[r],o.style&&(t&&"none"!==o.style.display&&""!==o.style.display||(o.style.display=t?i[r]||"":"none"));return e}function E(e,t,o){var n=go.exec(t);return n?Math.max(0,n[1]-(o||0))+(n[2]||"px"):t}function v(e,t,o,n){for(var i=o===(n?"border":"content")?4:"width"===t?1:0,r=0;4>i;i+=2)"margin"===o&&(r+=Z.css(e,o+yo[i],!0)),n?("content"===o&&(r-=parseFloat(oo(e,"padding"+yo[i]))||0),"margin"!==o&&(r-=parseFloat(oo(e,"border"+yo[i]+"Width"))||0)):(r+=parseFloat(oo(e,"padding"+yo[i]))||0,"padding"!==o&&(r+=parseFloat(oo(e,"border"+yo[i]+"Width"))||0));return r}function C(e,t,o){var n="width"===t?e.offsetWidth:e.offsetHeight,i=!0,r=Z.support.boxSizing&&"border-box"===Z.css(e,"boxSizing");if(0>=n||null==n){if(n=oo(e,t),(0>n||null==n)&&(n=e.style[t]),uo.test(n))return n;i=r&&(Z.support.boxSizingReliable||n===e.style[t]),n=parseFloat(n)||0}return n+v(e,t,o||(r?"border":"content"),i)+"px"}function B(e){if(po[e])return po[e];var t=Z("<"+e+">").appendTo($.body),o=t.css("display");return t.remove(),("none"===o||""===o)&&(no=$.body.appendChild(no||Z.extend($.createElement("iframe"),{frameBorder:0,width:0,height:0})),io&&no.createElement||(io=(no.contentWindow||no.contentDocument).document,io.write(""),io.close()),t=io.body.appendChild(io.createElement(e)),o=oo(t,"display"),$.body.removeChild(no)),po[e]=o,o}function k(e,t,o,n){var i;if(Z.isArray(t))Z.each(t,function(t,i){o||Co.test(e)?n(e,i):k(e+"["+("object"==typeof i?t:"")+"]",i,o,n)});else if(o||"object"!==Z.type(t))n(e,t);else for(i in t)k(e+"["+i+"]",t[i],o,n)}function b(e){return function(t,o){"string"!=typeof t&&(o=t,t="*");var n,i,r,s=t.toLowerCase().split(tt),l=0,a=s.length;if(Z.isFunction(o))for(;a>l;l++)n=s[l],r=/^\+/.test(n),r&&(n=n.substr(1)||"*"),i=e[n]=e[n]||[],i[r?"unshift":"push"](o)}}function A(e,o,n,i,r,s){r=r||o.dataTypes[0],s=s||{},s[r]=!0;for(var l,a=e[r],c=0,g=a?a.length:0,u=e===xo;g>c&&(u||!l);c++)l=a[c](o,n,i),"string"==typeof l&&(!u||s[l]?l=t:(o.dataTypes.unshift(l),l=A(e,o,n,i,l,s)));return(u||!l)&&!s["*"]&&(l=A(e,o,n,i,"*",s)),l}function T(e,o){var n,i,r=Z.ajaxSettings.flatOptions||{};for(n in o)o[n]!==t&&((r[n]?e:i||(i={}))[n]=o[n]);i&&Z.extend(!0,e,i)}function S(e,o,n){var i,r,s,l,a=e.contents,c=e.dataTypes,g=e.responseFields;for(r in g)r in n&&(o[g[r]]=n[r]);for(;"*"===c[0];)c.shift(),i===t&&(i=e.mimeType||o.getResponseHeader("content-type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){c.unshift(r);break}if(c[0]in n)s=c[0];else{for(r in n){if(!c[0]||e.converters[r+" "+c[0]]){s=r;break}l||(l=r)}s=s||l}return s?(s!==c[0]&&c.unshift(s),n[s]):void 0}function R(e,t){var o,n,i,r,s=e.dataTypes.slice(),l=s[0],a={},c=0;if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),s[1])for(o in e.converters)a[o.toLowerCase()]=e.converters[o];for(;i=s[++c];)if("*"!==i){if("*"!==l&&l!==i){if(o=a[l+" "+i]||a["* "+i],!o)for(n in a)if(r=n.split(" "),r[1]===i&&(o=a[l+" "+r[0]]||a["* "+r[0]])){o===!0?o=a[n]:a[n]!==!0&&(i=r[0],s.splice(c--,0,i));break}if(o!==!0)if(o&&e["throws"])t=o(t);else try{t=o(t)}catch(g){return{state:"parsererror",error:o?g:"No conversion from "+l+" to "+i}}}l=i}return{state:"success",data:t}}function I(){try{return new e.XMLHttpRequest}catch(t){}}function D(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function w(){return setTimeout(function(){Yo=t},0),Yo=Z.now()}function L(e,t){Z.each(t,function(t,o){for(var n=(en[t]||[]).concat(en["*"]),i=0,r=n.length;r>i;i++)if(n[i].call(e,t,o))return})}function F(e,t,o){var n,i=0,r=Jo.length,s=Z.Deferred().always(function(){delete l.elem}),l=function(){for(var t=Yo||w(),o=Math.max(0,a.startTime+a.duration-t),n=1-(o/a.duration||0),i=0,r=a.tweens.length;r>i;i++)a.tweens[i].run(n);return s.notifyWith(e,[a,n,o]),1>n&&r?o:(s.resolveWith(e,[a]),!1)},a=s.promise({elem:e,props:Z.extend({},t),opts:Z.extend(!0,{specialEasing:{}},o),originalProperties:t,originalOptions:o,startTime:Yo||w(),duration:o.duration,tweens:[],createTween:function(t,o){var n=Z.Tween(e,a.opts,t,o,a.opts.specialEasing[t]||a.opts.easing);return a.tweens.push(n),n},stop:function(t){for(var o=0,n=t?a.tweens.length:0;n>o;o++)a.tweens[o].run(1);return t?s.resolveWith(e,[a,t]):s.rejectWith(e,[a,t]),this}}),c=a.props;for(O(c,a.opts.specialEasing);r>i;i++)if(n=Jo[i].call(a,e,c,a.opts))return n;return L(a,c),Z.isFunction(a.opts.start)&&a.opts.start.call(e,a),Z.fx.timer(Z.extend(l,{anim:a,queue:a.opts.queue,elem:e})),a.progress(a.opts.progress).done(a.opts.done,a.opts.complete).fail(a.opts.fail).always(a.opts.always)}function O(e,t){var o,n,i,r,s;for(o in e)if(n=Z.camelCase(o),i=t[n],r=e[o],Z.isArray(r)&&(i=r[1],r=e[o]=r[0]),o!==n&&(e[n]=r,delete e[o]),s=Z.cssHooks[n],s&&"expand"in s){r=s.expand(r),delete e[n];for(o in r)o in e||(e[o]=r[o],t[o]=i)}else t[n]=i}function N(e,t,o){var n,i,r,s,l,a,c,g,u=this,h=e.style,d={},p=[],f=e.nodeType&&y(e);o.queue||(c=Z._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,g=c.empty.fire,c.empty.fire=function(){c.unqueued||g()}),c.unqueued++,u.always(function(){u.always(function(){c.unqueued--,Z.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(o.overflow=[h.overflow,h.overflowX,h.overflowY],"inline"===Z.css(e,"display")&&"none"===Z.css(e,"float")&&(Z.support.inlineBlockNeedsLayout&&"inline"!==B(e.nodeName)?h.zoom=1:h.display="inline-block")),o.overflow&&(h.overflow="hidden",Z.support.shrinkWrapBlocks||u.done(function(){h.overflow=o.overflow[0],h.overflowX=o.overflow[1],h.overflowY=o.overflow[2]}));for(n in t)if(r=t[n],qo.exec(r)){if(delete t[n],r===(f?"hide":"show"))continue;p.push(n)}if(s=p.length)for(l=Z._data(e,"fxshow")||Z._data(e,"fxshow",{}),f?Z(e).show():u.done(function(){Z(e).hide()}),u.done(function(){var t;Z.removeData(e,"fxshow",!0);for(t in d)Z.style(e,t,d[t])}),n=0;s>n;n++)i=p[n],a=u.createTween(i,f?l[i]:0),d[i]=l[i]||Z.style(e,i),i in l||(l[i]=a.start,f&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}function M(e,t,o,n,i){return new M.prototype.init(e,t,o,n,i)}function x(e,t){var o,n={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)o=yo[i],n["margin"+o]=n["padding"+o]=e;return t&&(n.opacity=n.width=e),n}function P(e){return Z.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var H,U,$=e.document,W=e.location,G=e.navigator,V=e.jQuery,K=e.$,j=Array.prototype.push,z=Array.prototype.slice,Y=Array.prototype.indexOf,X=Object.prototype.toString,q=Object.prototype.hasOwnProperty,Q=String.prototype.trim,Z=function(e,t){return new Z.fn.init(e,t,H)},J=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,et=/\S/,tt=/\s+/,ot=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,nt=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,it=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,rt=/^[\],:{}\s]*$/,st=/(?:^|:|,)(?:\s*\[)+/g,lt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,at=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,ct=/^-ms-/,gt=/-([\da-z])/gi,ut=function(e,t){return(t+"").toUpperCase()},ht=function(){$.addEventListener?($.removeEventListener("DOMContentLoaded",ht,!1),Z.ready()):"complete"===$.readyState&&($.detachEvent("onreadystatechange",ht),Z.ready())},dt={};Z.fn=Z.prototype={constructor:Z,init:function(e,o,n){var i,r,s;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:nt.exec(e),i&&(i[1]||!o)){if(i[1])return o=o instanceof Z?o[0]:o,s=o&&o.nodeType?o.ownerDocument||o:$,e=Z.parseHTML(i[1],s,!0),it.test(i[1])&&Z.isPlainObject(o)&&this.attr.call(e,o,!0),Z.merge(this,e);if(r=$.getElementById(i[2]),r&&r.parentNode){if(r.id!==i[2])return n.find(e);this.length=1,this[0]=r}return this.context=$,this.selector=e,this}return!o||o.jquery?(o||n).find(e):this.constructor(o).find(e)}return Z.isFunction(e)?n.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),Z.makeArray(e,this))},selector:"",jquery:"1.8.1",length:0,size:function(){return this.length},toArray:function(){return z.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e,t,o){var n=Z.merge(this.constructor(),e);return n.prevObject=this,n.context=this.context,"find"===t?n.selector=this.selector+(this.selector?" ":"")+o:t&&(n.selector=this.selector+"."+t+"("+o+")"),n},each:function(e,t){return Z.each(this,e,t)},ready:function(e){return Z.ready.promise().done(e),this},eq:function(e){return e=+e,-1===e?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(z.apply(this,arguments),"slice",z.call(arguments).join(","))},map:function(e){return this.pushStack(Z.map(this,function(t,o){return e.call(t,o,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},Z.fn.init.prototype=Z.fn,Z.extend=Z.fn.extend=function(){var e,o,n,i,r,s,l=arguments[0]||{},a=1,c=arguments.length,g=!1;for("boolean"==typeof l&&(g=l,l=arguments[1]||{},a=2),"object"!=typeof l&&!Z.isFunction(l)&&(l={}),c===a&&(l=this,--a);c>a;a++)if(null!=(e=arguments[a]))for(o in e)n=l[o],i=e[o],l!==i&&(g&&i&&(Z.isPlainObject(i)||(r=Z.isArray(i)))?(r?(r=!1,s=n&&Z.isArray(n)?n:[]):s=n&&Z.isPlainObject(n)?n:{},l[o]=Z.extend(g,s,i)):i!==t&&(l[o]=i));return l},Z.extend({noConflict:function(t){return e.$===Z&&(e.$=K),t&&e.jQuery===Z&&(e.jQuery=V),Z},isReady:!1,readyWait:1,holdReady:function(e){e?Z.readyWait++:Z.ready(!0)},ready:function(e){if(e===!0?!--Z.readyWait:!Z.isReady){if(!$.body)return setTimeout(Z.ready,1);Z.isReady=!0,e!==!0&&--Z.readyWait>0||(U.resolveWith($,[Z]),Z.fn.trigger&&Z($).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===Z.type(e)},isArray:Array.isArray||function(e){return"array"===Z.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):dt[X.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==Z.type(e)||e.nodeType||Z.isWindow(e))return!1;try{if(e.constructor&&!q.call(e,"constructor")&&!q.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(o){return!1}var n;for(n in e);return n===t||q.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,o){var n;return e&&"string"==typeof e?("boolean"==typeof t&&(o=t,t=0),t=t||$,(n=it.exec(e))?[t.createElement(n[1])]:(n=Z.buildFragment([e],t,o?null:[]),Z.merge([],(n.cacheable?Z.clone(n.fragment):n.fragment).childNodes))):null},parseJSON:function(t){return t&&"string"==typeof t?(t=Z.trim(t),e.JSON&&e.JSON.parse?e.JSON.parse(t):rt.test(t.replace(lt,"@").replace(at,"]").replace(st,""))?new Function("return "+t)():(Z.error("Invalid JSON: "+t),void 0)):null},parseXML:function(o){var n,i;if(!o||"string"!=typeof o)return null;try{e.DOMParser?(i=new DOMParser,n=i.parseFromString(o,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(o))}catch(r){n=t}return(!n||!n.documentElement||n.getElementsByTagName("parsererror").length)&&Z.error("Invalid XML: "+o),n},noop:function(){},globalEval:function(t){t&&et.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ct,"ms-").replace(gt,ut)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,o,n){var i,r=0,s=e.length,l=s===t||Z.isFunction(e);if(n)if(l){for(i in e)if(o.apply(e[i],n)===!1)break}else for(;s>r&&o.apply(e[r++],n)!==!1;);else if(l){for(i in e)if(o.call(e[i],i,e[i])===!1)break}else for(;s>r&&o.call(e[r],r,e[r++])!==!1;);return e},trim:Q&&!Q.call(" ")?function(e){return null==e?"":Q.call(e)}:function(e){return null==e?"":e.toString().replace(ot,"")},makeArray:function(e,t){var o,n=t||[];return null!=e&&(o=Z.type(e),null==e.length||"string"===o||"function"===o||"regexp"===o||Z.isWindow(e)?j.call(n,e):Z.merge(n,e)),n},inArray:function(e,t,o){var n;if(t){if(Y)return Y.call(t,e,o);for(n=t.length,o=o?0>o?Math.max(0,n+o):o:0;n>o;o++)if(o in t&&t[o]===e)return o}return-1},merge:function(e,o){var n=o.length,i=e.length,r=0;if("number"==typeof n)for(;n>r;r++)e[i++]=o[r];else for(;o[r]!==t;)e[i++]=o[r++];return e.length=i,e},grep:function(e,t,o){var n,i=[],r=0,s=e.length;for(o=!!o;s>r;r++)n=!!t(e[r],r),o!==n&&i.push(e[r]);return i},map:function(e,o,n){var i,r,s=[],l=0,a=e.length,c=e instanceof Z||a!==t&&"number"==typeof a&&(a>0&&e[0]&&e[a-1]||0===a||Z.isArray(e));if(c)for(;a>l;l++)i=o(e[l],l,n),null!=i&&(s[s.length]=i);else for(r in e)i=o(e[r],r,n),null!=i&&(s[s.length]=i);return s.concat.apply([],s)},guid:1,proxy:function(e,o){var n,i,r;return"string"==typeof o&&(n=e[o],o=e,e=n),Z.isFunction(e)?(i=z.call(arguments,2),r=function(){return e.apply(o,i.concat(z.call(arguments)))},r.guid=e.guid=e.guid||r.guid||Z.guid++,r):t},access:function(e,o,n,i,r,s,l){var a,c=null==n,g=0,u=e.length;if(n&&"object"==typeof n){for(g in n)Z.access(e,o,g,n[g],1,s,i);r=1}else if(i!==t){if(a=l===t&&Z.isFunction(i),c&&(a?(a=o,o=function(e,t,o){return a.call(Z(e),o)}):(o.call(e,i),o=null)),o)for(;u>g;g++)o(e[g],n,a?i.call(e[g],g,o(e[g],n)):i,l);r=1}return r?e:c?o.call(e):u?o(e[0],n):s},now:function(){return(new Date).getTime()}}),Z.ready.promise=function(t){if(!U)if(U=Z.Deferred(),"complete"===$.readyState)setTimeout(Z.ready,1);else if($.addEventListener)$.addEventListener("DOMContentLoaded",ht,!1),e.addEventListener("load",Z.ready,!1);else{$.attachEvent("onreadystatechange",ht),e.attachEvent("onload",Z.ready);var o=!1;try{o=null==e.frameElement&&$.documentElement}catch(n){}o&&o.doScroll&&function i(){if(!Z.isReady){try{o.doScroll("left")}catch(e){return setTimeout(i,50)}Z.ready()}}()}return U.promise(t)},Z.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){dt["[object "+t+"]"]=t.toLowerCase()}),H=Z($);var pt={};Z.Callbacks=function(e){e="string"==typeof e?pt[e]||o(e):Z.extend({},e);var n,i,r,s,l,a,c=[],g=!e.once&&[],u=function(t){for(n=e.memory&&t,i=!0,a=s||0,s=0,l=c.length,r=!0;c&&l>a;a++)if(c[a].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}r=!1,c&&(g?g.length&&u(g.shift()):n?c=[]:h.disable())},h={add:function(){if(c){var t=c.length;!function o(t){Z.each(t,function(t,n){var i=Z.type(n);"function"!==i||e.unique&&h.has(n)?n&&n.length&&"string"!==i&&o(n):c.push(n)})}(arguments),r?l=c.length:n&&(s=t,u(n))}return this},remove:function(){return c&&Z.each(arguments,function(e,t){for(var o;(o=Z.inArray(t,c,o))>-1;)c.splice(o,1),r&&(l>=o&&l--,a>=o&&a--)}),this},has:function(e){return Z.inArray(e,c)>-1},empty:function(){return c=[],this},disable:function(){return c=g=n=t,this},disabled:function(){return!c},lock:function(){return g=t,n||h.disable(),this},locked:function(){return!g},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],c&&(!i||g)&&(r?g.push(t):u(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},Z.extend({Deferred:function(e){var t=[["resolve","done",Z.Callbacks("once memory"),"resolved"],["reject","fail",Z.Callbacks("once memory"),"rejected"],["notify","progress",Z.Callbacks("memory")]],o="pending",n={state:function(){return o},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Z.Deferred(function(o){Z.each(t,function(t,n){var r=n[0],s=e[t];i[n[1]](Z.isFunction(s)?function(){var e=s.apply(this,arguments);e&&Z.isFunction(e.promise)?e.promise().done(o.resolve).fail(o.reject).progress(o.notify):o[r+"With"](this===i?o:this,[e])}:o[r])}),e=null}).promise()},promise:function(e){return"object"==typeof e?Z.extend(e,n):n}},i={};return n.pipe=n.then,Z.each(t,function(e,r){var s=r[2],l=r[3];n[r[1]]=s.add,l&&s.add(function(){o=l},t[1^e][2].disable,t[2][2].lock),i[r[0]]=s.fire,i[r[0]+"With"]=s.fireWith}),n.promise(i),e&&e.call(i,i),i},when:function(e){var t,o,n,i=0,r=z.call(arguments),s=r.length,l=1!==s||e&&Z.isFunction(e.promise)?s:0,a=1===l?e:Z.Deferred(),c=function(e,o,n){return function(i){o[e]=this,n[e]=arguments.length>1?z.call(arguments):i,n===t?a.notifyWith(o,n):--l||a.resolveWith(o,n)}};if(s>1)for(t=new Array(s),o=new Array(s),n=new Array(s);s>i;i++)r[i]&&Z.isFunction(r[i].promise)?r[i].promise().done(c(i,n,r)).fail(a.reject).progress(c(i,o,t)):--l;return l||a.resolveWith(n,r),a.promise()}}),Z.support=function(){var t,o,n,i,r,s,l,a,c,g,u,h=$.createElement("div");if(h.setAttribute("className","t"),h.innerHTML="
a",o=h.getElementsByTagName("*"),n=h.getElementsByTagName("a")[0],n.style.cssText="top:1px;float:left;opacity:.5",!o||!o.length||!n)return{};i=$.createElement("select"),r=i.appendChild($.createElement("option")),s=h.getElementsByTagName("input")[0],t={leadingWhitespace:3===h.firstChild.nodeType,tbody:!h.getElementsByTagName("tbody").length,htmlSerialize:!!h.getElementsByTagName("link").length,style:/top/.test(n.getAttribute("style")),hrefNormalized:"/a"===n.getAttribute("href"),opacity:/^0.5/.test(n.style.opacity),cssFloat:!!n.style.cssFloat,checkOn:"on"===s.value,optSelected:r.selected,getSetAttribute:"t"!==h.className,enctype:!!$.createElement("form").enctype,html5Clone:"<:nav>"!==$.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===$.compatMode,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},s.checked=!0,t.noCloneChecked=s.cloneNode(!0).checked,i.disabled=!0,t.optDisabled=!r.disabled;try{delete h.test}catch(d){t.deleteExpando=!1}if(!h.addEventListener&&h.attachEvent&&h.fireEvent&&(h.attachEvent("onclick",u=function(){t.noCloneEvent=!1}),h.cloneNode(!0).fireEvent("onclick"),h.detachEvent("onclick",u)),s=$.createElement("input"),s.value="t",s.setAttribute("type","radio"),t.radioValue="t"===s.value,s.setAttribute("checked","checked"),s.setAttribute("name","t"),h.appendChild(s),l=$.createDocumentFragment(),l.appendChild(h.lastChild),t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=s.checked,l.removeChild(s),l.appendChild(h),h.attachEvent)for(c in{submit:!0,change:!0,focusin:!0})a="on"+c,g=a in h,g||(h.setAttribute(a,"return;"),g="function"==typeof h[a]),t[c+"Bubbles"]=g;return Z(function(){var o,n,i,r,s="padding:0;margin:0;border:0;display:block;overflow:hidden;",l=$.getElementsByTagName("body")[0];l&&(o=$.createElement("div"),o.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",l.insertBefore(o,l.firstChild),n=$.createElement("div"),o.appendChild(n),n.innerHTML="
t
",i=n.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",g=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",t.reliableHiddenOffsets=g&&0===i[0].offsetHeight,n.innerHTML="",n.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===n.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==l.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(n,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(n,null)||{width:"4px"}).width,r=$.createElement("div"),r.style.cssText=n.style.cssText=s,r.style.marginRight=r.style.width="0",n.style.width="1px",n.appendChild(r),t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),"undefined"!=typeof n.style.zoom&&(n.innerHTML="",n.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===n.offsetWidth,n.style.display="block",n.style.overflow="visible",n.innerHTML="
",n.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==n.offsetWidth,o.style.zoom=1),l.removeChild(o),o=n=i=r=null)}),l.removeChild(h),o=n=i=r=s=l=h=null,t}();var ft=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,mt=/([A-Z])/g;Z.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(Z.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?Z.cache[e[Z.expando]]:e[Z.expando],!!e&&!i(e)},data:function(e,o,n,i){if(Z.acceptData(e)){var r,s,l=Z.expando,a="string"==typeof o,c=e.nodeType,g=c?Z.cache:e,u=c?e[l]:e[l]&&l;if(u&&g[u]&&(i||g[u].data)||!a||n!==t)return u||(c?e[l]=u=Z.deletedIds.pop()||++Z.uuid:u=l),g[u]||(g[u]={},c||(g[u].toJSON=Z.noop)),("object"==typeof o||"function"==typeof o)&&(i?g[u]=Z.extend(g[u],o):g[u].data=Z.extend(g[u].data,o)),r=g[u],i||(r.data||(r.data={}),r=r.data),n!==t&&(r[Z.camelCase(o)]=n),a?(s=r[o],null==s&&(s=r[Z.camelCase(o)])):s=r,s}},removeData:function(e,t,o){if(Z.acceptData(e)){var n,r,s,l=e.nodeType,a=l?Z.cache:e,c=l?e[Z.expando]:Z.expando;if(a[c]){if(t&&(n=o?a[c]:a[c].data)){Z.isArray(t)||(t in n?t=[t]:(t=Z.camelCase(t),t=t in n?[t]:t.split(" ")));for(r=0,s=t.length;s>r;r++)delete n[t[r]];if(!(o?i:Z.isEmptyObject)(n))return}(o||(delete a[c].data,i(a[c])))&&(l?Z.cleanData([e],!0):Z.support.deleteExpando||a!=a.window?delete a[c]:a[c]=null)}}},_data:function(e,t,o){return Z.data(e,t,o,!0)},acceptData:function(e){var t=e.nodeName&&Z.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),Z.fn.extend({data:function(e,o){var i,r,s,l,a,c=this[0],g=0,u=null;if(e===t){if(this.length&&(u=Z.data(c),1===c.nodeType&&!Z._data(c,"parsedAttrs"))){for(s=c.attributes,a=s.length;a>g;g++)l=s[g].name,0===l.indexOf("data-")&&(l=Z.camelCase(l.substring(5)),n(c,l,u[l]));Z._data(c,"parsedAttrs",!0)}return u}return"object"==typeof e?this.each(function(){Z.data(this,e)}):(i=e.split(".",2),i[1]=i[1]?"."+i[1]:"",r=i[1]+"!",Z.access(this,function(o){return o===t?(u=this.triggerHandler("getData"+r,[i[0]]),u===t&&c&&(u=Z.data(c,e),u=n(c,e,u)),u===t&&i[1]?this.data(i[0]):u):(i[1]=o,this.each(function(){var t=Z(this);t.triggerHandler("setData"+r,i),Z.data(this,e,o),t.triggerHandler("changeData"+r,i)}),void 0)},null,o,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){Z.removeData(this,e)})}}),Z.extend({queue:function(e,t,o){var n;return e?(t=(t||"fx")+"queue",n=Z._data(e,t),o&&(!n||Z.isArray(o)?n=Z._data(e,t,Z.makeArray(o)):n.push(o)),n||[]):void 0},dequeue:function(e,t){t=t||"fx";var o=Z.queue(e,t),n=o.length,i=o.shift(),r=Z._queueHooks(e,t),s=function(){Z.dequeue(e,t)};"inprogress"===i&&(i=o.shift(),n--),i&&("fx"===t&&o.unshift("inprogress"),delete r.stop,i.call(e,s,r)),!n&&r&&r.empty.fire()},_queueHooks:function(e,t){var o=t+"queueHooks";return Z._data(e,o)||Z._data(e,o,{empty:Z.Callbacks("once memory").add(function(){Z.removeData(e,t+"queue",!0),Z.removeData(e,o,!0)})})}}),Z.fn.extend({queue:function(e,o){var n=2;return"string"!=typeof e&&(o=e,e="fx",n--),arguments.length1)},removeAttr:function(e){return this.each(function(){Z.removeAttr(this,e)})},prop:function(e,t){return Z.access(this,Z.prop,e,t,arguments.length>1)},removeProp:function(e){return e=Z.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(o){}})},addClass:function(e){var t,o,n,i,r,s,l;if(Z.isFunction(e))return this.each(function(t){Z(this).addClass(e.call(this,t,this.className))});if(e&&"string"==typeof e)for(t=e.split(tt),o=0,n=this.length;n>o;o++)if(i=this[o],1===i.nodeType)if(i.className||1!==t.length){for(r=" "+i.className+" ",s=0,l=t.length;l>s;s++)~r.indexOf(" "+t[s]+" ")||(r+=t[s]+" ");i.className=Z.trim(r)}else i.className=e;return this},removeClass:function(e){var o,n,i,r,s,l,a;if(Z.isFunction(e))return this.each(function(t){Z(this).removeClass(e.call(this,t,this.className))});if(e&&"string"==typeof e||e===t)for(o=(e||"").split(tt),l=0,a=this.length;a>l;l++)if(i=this[l],1===i.nodeType&&i.className){for(n=(" "+i.className+" ").replace(vt," "),r=0,s=o.length;s>r;r++)for(;n.indexOf(" "+o[r]+" ")>-1;)n=n.replace(" "+o[r]+" "," ");i.className=e?Z.trim(n):""}return this},toggleClass:function(e,t){var o=typeof e,n="boolean"==typeof t;return Z.isFunction(e)?this.each(function(o){Z(this).toggleClass(e.call(this,o,this.className,t),t)}):this.each(function(){if("string"===o)for(var i,r=0,s=Z(this),l=t,a=e.split(tt);i=a[r++];)l=n?l:!s.hasClass(i),s[l?"addClass":"removeClass"](i);else("undefined"===o||"boolean"===o)&&(this.className&&Z._data(this,"__className__",this.className),this.className=this.className||e===!1?"":Z._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",o=0,n=this.length;n>o;o++)if(1===this[o].nodeType&&(" "+this[o].className+" ").replace(vt," ").indexOf(t)>-1)return!0;return!1},val:function(e){var o,n,i,r=this[0];{if(arguments.length)return i=Z.isFunction(e),this.each(function(n){var r,s=Z(this);1===this.nodeType&&(r=i?e.call(this,n,s.val()):e,null==r?r="":"number"==typeof r?r+="":Z.isArray(r)&&(r=Z.map(r,function(e){return null==e?"":e+""})),o=Z.valHooks[this.type]||Z.valHooks[this.nodeName.toLowerCase()],o&&"set"in o&&o.set(this,r,"value")!==t||(this.value=r))});if(r)return o=Z.valHooks[r.type]||Z.valHooks[r.nodeName.toLowerCase()],o&&"get"in o&&(n=o.get(r,"value"))!==t?n:(n=r.value,"string"==typeof n?n.replace(Ct,""):null==n?"":n)}}}),Z.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,o,n,i,r=e.selectedIndex,s=[],l=e.options,a="select-one"===e.type;if(0>r)return null;for(o=a?r:0,n=a?r+1:l.length;n>o;o++)if(i=l[o],!(!i.selected||(Z.support.optDisabled?i.disabled:null!==i.getAttribute("disabled"))||i.parentNode.disabled&&Z.nodeName(i.parentNode,"optgroup"))){if(t=Z(i).val(),a)return t;s.push(t)}return a&&!s.length&&l.length?Z(l[r]).val():s},set:function(e,t){var o=Z.makeArray(t);return Z(e).find("option").each(function(){this.selected=Z.inArray(Z(this).val(),o)>=0}),o.length||(e.selectedIndex=-1),o}}},attrFn:{},attr:function(e,o,n,i){var r,s,l,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return i&&Z.isFunction(Z.fn[o])?Z(e)[o](n):"undefined"==typeof e.getAttribute?Z.prop(e,o,n):(l=1!==a||!Z.isXMLDoc(e),l&&(o=o.toLowerCase(),s=Z.attrHooks[o]||(At.test(o)?_t:yt)),n!==t?null===n?(Z.removeAttr(e,o),void 0):s&&"set"in s&&l&&(r=s.set(e,n,o))!==t?r:(e.setAttribute(o,""+n),n):s&&"get"in s&&l&&null!==(r=s.get(e,o))?r:(r=e.getAttribute(o),null===r?t:r))},removeAttr:function(e,t){var o,n,i,r,s=0;if(t&&1===e.nodeType)for(n=t.split(tt);s=0:void 0}})});var St=/^(?:textarea|input|select)$/i,Rt=/^([^\.]*|)(?:\.(.+)|)$/,It=/(?:^|\s)hover(\.\S+|)\b/,Dt=/^key/,wt=/^(?:mouse|contextmenu)|click/,Lt=/^(?:focusinfocus|focusoutblur)$/,Ft=function(e){return Z.event.special.hover?e:e.replace(It,"mouseenter$1 mouseleave$1")};Z.event={add:function(e,o,n,i,r){var s,l,a,c,g,u,h,d,p,f,m;if(3!==e.nodeType&&8!==e.nodeType&&o&&n&&(s=Z._data(e))){for(n.handler&&(p=n,n=p.handler,r=p.selector),n.guid||(n.guid=Z.guid++),a=s.events,a||(s.events=a={}),l=s.handle,l||(s.handle=l=function(e){return"undefined"==typeof Z||e&&Z.event.triggered===e.type?t:Z.event.dispatch.apply(l.elem,arguments)},l.elem=e),o=Z.trim(Ft(o)).split(" "),c=0;c=0&&(m=m.slice(0,-1),l=!0),m.indexOf(".")>=0&&(y=m.split("."),m=y.shift(),y.sort()),(!i||Z.event.customEvent[m])&&!Z.event.global[m])return;if(o="object"==typeof o?o[Z.expando]?o:new Z.Event(m,o):new Z.Event(m),o.type=m,o.isTrigger=!0,o.exclusive=l,o.namespace=y.join("."),o.namespace_re=o.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u=m.indexOf(":")<0?"on"+m:"",!i){s=Z.cache;for(a in s)s[a].events&&s[a].events[m]&&Z.event.trigger(o,n,s[a].handle.elem,!0);return}if(o.result=t,o.target||(o.target=i),n=null!=n?Z.makeArray(n):[],n.unshift(o),h=Z.event.special[m]||{},h.trigger&&h.trigger.apply(i,n)===!1)return;if(p=[[i,h.bindType||m]],!r&&!h.noBubble&&!Z.isWindow(i)){for(f=h.delegateType||m,c=Lt.test(f+m)?i:i.parentNode,g=i;c;c=c.parentNode)p.push([c,f]),g=c;g===(i.ownerDocument||$)&&p.push([g.defaultView||g.parentWindow||e,f])}for(a=0;an;n++)g=h[n],u=g.selector,l[u]===t&&(l[u]=Z(u,this).index(r)>=0),l[u]&&c.push(g);c.length&&y.push({elem:r,matches:c})}for(h.length>d&&y.push({elem:this,matches:h.slice(d)}),n=0;n0?this.on(t,null,e,o):this.trigger(t)},Dt.test(t)&&(Z.event.fixHooks[t]=Z.event.keyHooks),wt.test(t)&&(Z.event.fixHooks[t]=Z.event.mouseHooks)}),function(e,t){function o(e,t,o,n){o=o||[],t=t||R;var i,r,s,l,a=t.nodeType;if(1!==a&&9!==a)return[];if(!e||"string"!=typeof e)return o;if(s=v(t),!s&&!n&&(i=X.exec(e)))if(l=i[1]){if(9===a){if(r=t.getElementById(l),!r||!r.parentNode)return o;if(r.id===l)return o.push(r),o}else if(t.ownerDocument&&(r=t.ownerDocument.getElementById(l))&&C(t,r)&&r.id===l)return o.push(r),o}else{if(i[2])return L.apply(o,w.call(t.getElementsByTagName(e),0)),o;if((l=i[3])&<&&t.getElementsByClassName)return L.apply(o,w.call(t.getElementsByClassName(l),0)),o}return p(e,t,o,n,s)}function n(e){return function(t){var o=t.nodeName.toLowerCase();return"input"===o&&t.type===e}}function i(e){return function(t){var o=t.nodeName.toLowerCase();return("input"===o||"button"===o)&&t.type===e}}function r(e,t,o){if(e===t)return o;for(var n=e.nextSibling;n;){if(n===t)return-1;n=n.nextSibling}return 1}function s(e,t,n,i){var r,s,l,a,c,g,u,h,d,p,f=!n&&t!==R,m=(f?"":"")+e.replace(K,"$1"),y=M[S][m];if(y)return i?0:w.call(y,0);for(c=e,g=[],h=0,d=_.preFilter,p=_.filter;c;){(!r||(s=j.exec(c)))&&(s&&(c=c.slice(s[0].length),l.selector=u),g.push(l=[]),u="",f&&(c=" "+c)),r=!1,(s=z.exec(c))&&(u+=s[0],c=c.slice(s[0].length),r=l.push({part:s.pop().replace(K," "),string:s[0],captures:s}));for(a in p)(s=ot[a].exec(c))&&(!d[a]||(s=d[a](s,t,n)))&&(u+=s[0],c=c.slice(s[0].length),r=l.push({part:a,string:s.shift(),captures:s}));if(!r)break}return u&&(l.selector=u),i?c.length:c?o.error(e):w.call(M(m,g),0)}function l(e,t,o,n){var i=t.dir,r=D++;return e||(e=function(e){return e===o}),t.first?function(t){for(;t=t[i];)if(1===t.nodeType)return e(t)&&t}:n?function(t){for(;t=t[i];)if(1===t.nodeType&&e(t))return t}:function(t){for(var o,n=r+"."+f,s=n+"."+m;t=t[i];)if(1===t.nodeType){if((o=t[S])===s)return t.sizset;if("string"==typeof o&&0===o.indexOf(n)){if(t.sizset)return t}else{if(t[S]=s,e(t))return t.sizset=!0,t;t.sizset=!1}}}}function a(e,t){return e?function(o){var n=t(o);return n&&e(n===!0?o:n)}:t}function c(e,t,o){for(var n,i,r=0;n=e[r];r++)i=_.relative[n.part]?l(i,_.relative[n.part],t,o):a(i,_.filter[n.part].apply(null,n.captures.concat(t,o)));return i}function g(e){return function(t){for(var o,n=0;o=e[n];n++)if(o(t))return!0;return!1}}function u(e,t,n,i){for(var r=0,s=t.length;s>r;r++)o(e,t[r],n,i)}function h(e,t,n,i,r,s){var l,a=_.setFilters[t.toLowerCase()];return a||o.error(t),(e||!(l=r))&&u(e||"*",i,l=[],r),l.length>0?a(l,n,s):[]}function d(e,n,i,r){for(var s,l,a,c,g,d,p,f,m,y,_,E,v,C=0,B=e.length,k=ot.POS,b=new RegExp("^"+k.source+"(?!"+P+")","i"),A=function(){for(var e=1,o=arguments.length-2;o>e;e++)arguments[e]===t&&(m[e]=t)};B>C;C++){for(s=e[C],l="",f=r,a=0,c=s.length;c>a;a++){if(g=s[a],d=g.string,"PSEUDO"===g.part)for(k.exec(""),p=0;m=k.exec(d);)y=!0,_=k.lastIndex=m.index+m[0].length,_>p&&(l+=d.slice(p,m.index),p=_,E=[n],z.test(l)&&(f&&(E=f),f=r),(v=Q.test(l))&&(l=l.slice(0,-5).replace(z,"$&*"),p++),m.length>1&&m[0].replace(b,A),f=h(l,m[1],m[2],E,f,v)),l="";y||(l+=d),y=!1}l?z.test(l)?u(l,f||[n],i,r):o(l,n,i,r?r.concat(f):f):L.apply(i,f)}return 1===B?i:o.uniqueSort(i)}function p(e,t,o,n,i){e=e.replace(K,"$1");var r,l,a,c,g,u,h,p,y,E=s(e,t,i),v=t.nodeType;if(ot.POS.test(e))return d(E,t,o,n);if(n)r=w.call(n,0);else if(1===E.length){if((g=w.call(E[0],0)).length>2&&"ID"===(u=g[0]).part&&9===v&&!i&&_.relative[g[1].part]){if(t=_.find.ID(u.captures[0].replace(tt,""),t,i)[0],!t)return o;e=e.slice(g.shift().string.length)}for(p=(E=q.exec(g[0].string))&&!E.index&&t.parentNode||t,h="",c=g.length-1;c>=0&&(u=g[c],y=u.part,h=u.string+h,!_.relative[y]);c--)if(_.order.test(y)){if(r=_.find[y](u.captures[0].replace(tt,""),p,i),null==r)continue;e=e.slice(0,e.length-h.length)+h.replace(ot[y],""),e||L.apply(o,w.call(r,0));break}}if(e)for(l=B(e,t,i),f=l.dirruns++,null==r&&(r=_.find.TAG("*",q.test(e)&&t.parentNode||t)),c=0;a=r[c];c++)m=l.runs++,l(a)&&o.push(a);return o}var f,m,y,_,E,v,C,B,k,b,A=!0,T="undefined",S=("sizcache"+Math.random()).replace(".",""),R=e.document,I=R.documentElement,D=0,w=[].slice,L=[].push,F=function(e,t){return e[S]=t||!0,e},O=function(){var e={},t=[];return F(function(o,n){return t.push(o)>_.cacheLength&&delete e[t.shift()],e[o]=n},e)},N=O(),M=O(),x=O(),P="[\\x20\\t\\r\\n\\f]",H="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",U=H.replace("w","w#"),$="([*^$|!~]?=)",W="\\["+P+"*("+H+")"+P+"*(?:"+$+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+U+")|)|)"+P+"*\\]",G=":("+H+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+W+")|[^:]|\\\\.)*|.*))\\)|)",V=":(nth|eq|gt|lt|first|last|even|odd)(?:\\(((?:-\\d)?\\d*)\\)|)(?=[^-]|$)",K=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),j=new RegExp("^"+P+"*,"+P+"*"),z=new RegExp("^"+P+"*([\\x20\\t\\r\\n\\f>+~])"+P+"*"),Y=new RegExp(G),X=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,q=/[\x20\t\r\n\f]*[+~]/,Q=/:not\($/,J=/h\d/i,et=/input|select|textarea|button/i,tt=/\\(?!\\)/g,ot={ID:new RegExp("^#("+H+")"),CLASS:new RegExp("^\\.("+H+")"),NAME:new RegExp("^\\[name=['\"]?("+H+")['\"]?\\]"),TAG:new RegExp("^("+H.replace("w","w*")+")"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+G),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),POS:new RegExp(V,"ig"),needsContext:new RegExp("^"+P+"*[>+~]|"+V,"i")},nt=function(e){var t=R.createElement("div");try{return e(t)}catch(o){return!1}finally{t=null}},it=nt(function(e){return e.appendChild(R.createComment("")),!e.getElementsByTagName("*").length}),rt=nt(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==T&&"#"===e.firstChild.getAttribute("href")}),st=nt(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),lt=nt(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),at=nt(function(e){e.id=S+0,e.innerHTML="
",I.insertBefore(e,I.firstChild);var t=R.getElementsByName&&R.getElementsByName(S).length===2+R.getElementsByName(S+0).length;return y=!R.getElementById(S),I.removeChild(e),t});try{w.call(I.childNodes,0)[0].nodeType}catch(ct){w=function(e){for(var t,o=[];t=this[e];e++)o.push(t);return o}}o.matches=function(e,t){return o(e,null,null,t)},o.matchesSelector=function(e,t){return o(t,null,null,[e]).length>0},E=o.getText=function(e){var t,o="",n=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)o+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[n];n++)o+=E(t);return o},v=o.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},C=o.contains=I.contains?function(e,t){var o=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!!(n&&1===n.nodeType&&o.contains&&o.contains(n))}:I.compareDocumentPosition?function(e,t){return t&&!!(16&e.compareDocumentPosition(t))}:function(e,t){for(;t=t.parentNode;)if(t===e)return!0;return!1},o.attr=function(e,t){var o,n=v(e);return n||(t=t.toLowerCase()),_.attrHandle[t]?_.attrHandle[t](e):st||n?e.getAttribute(t):(o=e.getAttributeNode(t),o?"boolean"==typeof e[t]?e[t]?t:null:o.specified?o.value:null:null)},_=o.selectors={cacheLength:50,createPseudo:F,match:ot,order:new RegExp("ID|TAG"+(at?"|NAME":"")+(lt?"|CLASS":"")),attrHandle:rt?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:y?function(e,t,o){if(typeof t.getElementById!==T&&!o){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}}:function(e,o,n){if(typeof o.getElementById!==T&&!n){var i=o.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==T&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:it?function(e,t){return typeof t.getElementsByTagName!==T?t.getElementsByTagName(e):void 0}:function(e,t){var o=t.getElementsByTagName(e);if("*"===e){for(var n,i=[],r=0;n=o[r];r++)1===n.nodeType&&i.push(n);return i}return o},NAME:function(e,t){return typeof t.getElementsByName!==T?t.getElementsByName(name):void 0},CLASS:function(e,t,o){return typeof t.getElementsByClassName===T||o?void 0:t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(tt,""),e[3]=(e[4]||e[5]||"").replace(tt,""),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1]?(e[2]||o.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*("even"===e[2]||"odd"===e[2])),e[4]=+(e[6]+e[7]||"odd"===e[2])):e[2]&&o.error(e[0]),e},PSEUDO:function(e,t,o){var n,i;return ot.CHILD.test(e[0])?null:(e[3]?e[2]=e[3]:(n=e[4])&&(Y.test(n)&&(i=s(n,t,o,!0))&&(i=n.indexOf(")",n.length-i)-n.length)&&(n=n.slice(0,i),e[0]=e[0].slice(0,i)),e[2]=n),e.slice(0,3))}},filter:{ID:y?function(e){return e=e.replace(tt,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace(tt,""),function(t){var o=typeof t.getAttributeNode!==T&&t.getAttributeNode("id");return o&&o.value===e}},TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(tt,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=N[S][e];return t||(t=N(e,new RegExp("(^|"+P+")"+e+"("+P+"|$)"))),function(e){return t.test(e.className||typeof e.getAttribute!==T&&e.getAttribute("class")||"")}},ATTR:function(e,t,n){return t?function(i){var r=o.attr(i,e),s=r+"";if(null==r)return"!="===t;switch(t){case"=":return s===n;case"!=":return s!==n;case"^=":return n&&0===s.indexOf(n);case"*=":return n&&s.indexOf(n)>-1;case"$=":return n&&s.substr(s.length-n.length)===n;case"~=":return(" "+s+" ").indexOf(n)>-1;case"|=":return s===n||s.substr(0,n.length+1)===n+"-"}}:function(t){return null!=o.attr(t,e)}},CHILD:function(e,t,o,n){if("nth"===e){var i=D++;return function(e){var t,r,s=0,l=e;if(1===o&&0===n)return!0;if(t=e.parentNode,t&&(t[S]!==i||!e.sizset)){for(l=t.firstChild;l&&(1!==l.nodeType||(l.sizset=++s,l!==e));l=l.nextSibling);t[S]=i}return r=e.sizset-n,0===o?0===r:r%o===0&&r/o>=0}}return function(t){var o=t;switch(e){case"only":case"first":for(;o=o.previousSibling;)if(1===o.nodeType)return!1;if("first"===e)return!0;o=t;case"last":for(;o=o.nextSibling;)if(1===o.nodeType)return!1;return!0}}},PSEUDO:function(e,t,n,i){var r,s=_.pseudos[e]||_.pseudos[e.toLowerCase()];return s||o.error("unsupported pseudo: "+e),s[S]?s(t,n,i):s.length>1?(r=[e,e,"",t],function(e){return s(e,0,r)}):s}},pseudos:{not:F(function(e,t,o){var n=B(e.replace(K,"$1"),t,o);return function(e){return!n(e)}}),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},parent:function(e){return!_.pseudos.empty(e)},empty:function(e){var t;for(e=e.firstChild;e;){if(e.nodeName>"@"||3===(t=e.nodeType)||4===t)return!1;e=e.nextSibling}return!0},contains:F(function(e){return function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),has:F(function(e){return function(t){return o(e,t).length>0}}),header:function(e){return J.test(e.nodeName)},text:function(e){var t,o;return"input"===e.nodeName.toLowerCase()&&"text"===(t=e.type)&&(null==(o=e.getAttribute("type"))||o.toLowerCase()===t)},radio:n("radio"),checkbox:n("checkbox"),file:n("file"),password:n("password"),image:n("image"),submit:i("submit"),reset:i("reset"),button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},input:function(e){return et.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return!(e!==t.activeElement||t.hasFocus&&!t.hasFocus()||!e.type&&!e.href)},active:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t,o){return o?e.slice(1):[e[0]]},last:function(e,t,o){var n=e.pop();return o?e:[n]},even:function(e,t,o){for(var n=[],i=o?1:0,r=e.length;r>i;i+=2)n.push(e[i]);return n},odd:function(e,t,o){for(var n=[],i=o?0:1,r=e.length;r>i;i+=2)n.push(e[i]);return n},lt:function(e,t,o){return o?e.slice(+t):e.slice(0,+t)},gt:function(e,t,o){return o?e.slice(0,+t+1):e.slice(+t+1)},eq:function(e,t,o){var n=e.splice(+t,1);return o?e:n}}},k=I.compareDocumentPosition?function(e,t){return e===t?(b=!0,0):(e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t):e.compareDocumentPosition)?-1:1}:function(e,t){if(e===t)return b=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var o,n,i=[],s=[],l=e.parentNode,a=t.parentNode,c=l;if(l===a)return r(e,t);if(!l)return-1;if(!a)return 1;for(;c;)i.unshift(c),c=c.parentNode;for(c=a;c;)s.unshift(c),c=c.parentNode;o=i.length,n=s.length;for(var g=0;o>g&&n>g;g++)if(i[g]!==s[g])return r(i[g],s[g]);return g===o?r(e,s[g],-1):r(i[g],t,1)},[0,0].sort(k),A=!b,o.uniqueSort=function(e){var t,o=1;if(b=A,e.sort(k),b)for(;t=e[o];o++)t===e[o-1]&&e.splice(o--,1);return e},o.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},B=o.compile=function(e,t,o){var n,i,r,l=x[S][e];if(l&&l.context===t)return l;for(n=s(e,t,o),i=0,r=n.length;r>i;i++)n[i]=c(n[i],t,o);return l=x(e,g(n)),l.context=t,l.runs=l.dirruns=0,l},R.querySelectorAll&&function(){var e,t=p,n=/'|\\/g,i=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,r=[],l=[":active"],a=I.matchesSelector||I.mozMatchesSelector||I.webkitMatchesSelector||I.oMatchesSelector||I.msMatchesSelector;nt(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||r.push("\\["+P+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||r.push(":checked")}),nt(function(e){e.innerHTML="

",e.querySelectorAll("[test^='']").length&&r.push("[*^$]="+P+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||r.push(":enabled",":disabled")}),r=r.length&&new RegExp(r.join("|")),p=function(e,o,i,l,a){if(!(l||a||r&&r.test(e)))if(9===o.nodeType)try{return L.apply(i,w.call(o.querySelectorAll(e),0)),i}catch(c){}else if(1===o.nodeType&&"object"!==o.nodeName.toLowerCase()){var g,u,h,d=o.getAttribute("id"),p=d||S,f=q.test(e)&&o.parentNode||o;for(d?p=p.replace(n,"\\$&"):o.setAttribute("id",p),g=s(e,o,a),p="[id='"+p+"']",u=0,h=g.length;h>u;u++)g[u]=p+g[u].selector;try{return L.apply(i,w.call(f.querySelectorAll(g.join(",")),0)),i}catch(c){}finally{d||o.removeAttribute("id")}}return t(e,o,i,l,a)},a&&(nt(function(t){e=a.call(t,"div");try{a.call(t,"[test!='']:sizzle"),l.push(ot.PSEUDO.source,ot.POS.source,"!=")}catch(o){}}),l=new RegExp(l.join("|")),o.matchesSelector=function(t,n){if(n=n.replace(i,"='$1']"),!(v(t)||l.test(n)||r&&r.test(n)))try{var s=a.call(t,n);if(s||e||t.document&&11!==t.document.nodeType)return s}catch(c){}return o(n,null,null,[t]).length>0})}(),_.setFilters.nth=_.setFilters.eq,_.filters=_.pseudos,o.attr=Z.attr,Z.find=o,Z.expr=o.selectors,Z.expr[":"]=Z.expr.pseudos,Z.unique=o.uniqueSort,Z.text=o.getText,Z.isXMLDoc=o.isXML,Z.contains=o.contains}(e);var Ot=/Until$/,Nt=/^(?:parents|prev(?:Until|All))/,Mt=/^.[^:#\[\.,]*$/,xt=Z.expr.match.needsContext,Pt={children:!0,contents:!0,next:!0,prev:!0};Z.fn.extend({find:function(e){var t,o,n,i,r,s,l=this;if("string"!=typeof e)return Z(e).filter(function(){for(t=0,o=l.length;o>t;t++)if(Z.contains(l[t],this))return!0});for(s=this.pushStack("","find",e),t=0,o=this.length;o>t;t++)if(n=s.length,Z.find(e,this[t],s),t>0)for(i=n;ir;r++)if(s[r]===s[i]){s.splice(i--,1);break}return s},has:function(e){var t,o=Z(e,this),n=o.length;return this.filter(function(){for(t=0;n>t;t++)if(Z.contains(this,o[t]))return!0})},not:function(e){return this.pushStack(c(this,e,!1),"not",e)},filter:function(e){return this.pushStack(c(this,e,!0),"filter",e)},is:function(e){return!!e&&("string"==typeof e?xt.test(e)?Z(e,this.context).index(this[0])>=0:Z.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var o,n=0,i=this.length,r=[],s=xt.test(e)||"string"!=typeof e?Z(e,t||this.context):0;i>n;n++)for(o=this[n];o&&o.ownerDocument&&o!==t&&11!==o.nodeType;){if(s?s.index(o)>-1:Z.find.matchesSelector(o,e)){r.push(o);break}o=o.parentNode}return r=r.length>1?Z.unique(r):r,this.pushStack(r,"closest",e)},index:function(e){return e?"string"==typeof e?Z.inArray(this[0],Z(e)):Z.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var o="string"==typeof e?Z(e,t):Z.makeArray(e&&e.nodeType?[e]:e),n=Z.merge(this.get(),o);return this.pushStack(l(o[0])||l(n[0])?n:Z.unique(n))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Z.fn.andSelf=Z.fn.addBack,Z.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Z.dir(e,"parentNode")},parentsUntil:function(e,t,o){return Z.dir(e,"parentNode",o)},next:function(e){return a(e,"nextSibling")},prev:function(e){return a(e,"previousSibling")},nextAll:function(e){return Z.dir(e,"nextSibling")},prevAll:function(e){return Z.dir(e,"previousSibling")},nextUntil:function(e,t,o){return Z.dir(e,"nextSibling",o)},prevUntil:function(e,t,o){return Z.dir(e,"previousSibling",o)},siblings:function(e){return Z.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Z.sibling(e.firstChild)},contents:function(e){return Z.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:Z.merge([],e.childNodes)}},function(e,t){Z.fn[e]=function(o,n){var i=Z.map(this,t,o);return Ot.test(e)||(n=o),n&&"string"==typeof n&&(i=Z.filter(n,i)),i=this.length>1&&!Pt[e]?Z.unique(i):i,this.length>1&&Nt.test(e)&&(i=i.reverse()),this.pushStack(i,e,z.call(arguments).join(","))}}),Z.extend({filter:function(e,t,o){return o&&(e=":not("+e+")"),1===t.length?Z.find.matchesSelector(t[0],e)?[t[0]]:[]:Z.find.matches(e,t)},dir:function(e,o,n){for(var i=[],r=e[o];r&&9!==r.nodeType&&(n===t||1!==r.nodeType||!Z(r).is(n));)1===r.nodeType&&i.push(r),r=r[o];return i},sibling:function(e,t){for(var o=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&o.push(e);return o}});var Ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Ut=/ jQuery\d+="(?:null|\d+)"/g,$t=/^\s+/,Wt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Gt=/<([\w:]+)/,Vt=/]","i"),Xt=/^(?:checkbox|radio)$/,qt=/checked\s*(?:[^=]|=\s*.checked.)/i,Qt=/\/(java|ecma)script/i,Zt=/^\s*\s*$/g,Jt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},eo=g($),to=eo.appendChild($.createElement("div"));Jt.optgroup=Jt.option,Jt.tbody=Jt.tfoot=Jt.colgroup=Jt.caption=Jt.thead,Jt.th=Jt.td,Z.support.htmlSerialize||(Jt._default=[1,"X
","
"]),Z.fn.extend({text:function(e){return Z.access(this,function(e){return e===t?Z.text(this):this.empty().append((this[0]&&this[0].ownerDocument||$).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(Z.isFunction(e))return this.each(function(t){Z(this).wrapAll(e.call(this,t))});if(this[0]){var t=Z(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return Z.isFunction(e)?this.each(function(t){Z(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Z(this),o=t.contents();o.length?o.wrapAll(e):t.append(e)})},wrap:function(e){var t=Z.isFunction(e);return this.each(function(o){Z(this).wrapAll(t?e.call(this,o):e)})},unwrap:function(){return this.parent().each(function(){Z.nodeName(this,"body")||Z(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!l(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this) });if(arguments.length){var e=Z.clean(arguments);return this.pushStack(Z.merge(e,this),"before",this.selector)}},after:function(){if(!l(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=Z.clean(arguments);return this.pushStack(Z.merge(this,e),"after",this.selector)}},remove:function(e,t){for(var o,n=0;null!=(o=this[n]);n++)(!e||Z.filter(e,[o]).length)&&(!t&&1===o.nodeType&&(Z.cleanData(o.getElementsByTagName("*")),Z.cleanData([o])),o.parentNode&&o.parentNode.removeChild(o));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&Z.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return Z.clone(this,e,t)})},html:function(e){return Z.access(this,function(e){var o=this[0]||{},n=0,i=this.length;if(e===t)return 1===o.nodeType?o.innerHTML.replace(Ut,""):t;if(!("string"!=typeof e||jt.test(e)||!Z.support.htmlSerialize&&Yt.test(e)||!Z.support.leadingWhitespace&&$t.test(e)||Jt[(Gt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Wt,"<$1>");try{for(;i>n;n++)o=this[n]||{},1===o.nodeType&&(Z.cleanData(o.getElementsByTagName("*")),o.innerHTML=e);o=0}catch(r){}}o&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return l(this[0])?this.length?this.pushStack(Z(Z.isFunction(e)?e():e),"replaceWith",e):this:Z.isFunction(e)?this.each(function(t){var o=Z(this),n=o.html();o.replaceWith(e.call(this,t,n))}):("string"!=typeof e&&(e=Z(e).detach()),this.each(function(){var t=this.nextSibling,o=this.parentNode;Z(this).remove(),t?Z(t).before(e):Z(o).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,o,n){e=[].concat.apply([],e);var i,r,s,l,a=0,c=e[0],g=[],h=this.length;if(!Z.support.checkClone&&h>1&&"string"==typeof c&&qt.test(c))return this.each(function(){Z(this).domManip(e,o,n)});if(Z.isFunction(c))return this.each(function(i){var r=Z(this);e[0]=c.call(this,i,o?r.html():t),r.domManip(e,o,n)});if(this[0]){if(i=Z.buildFragment(e,this,g),s=i.fragment,r=s.firstChild,1===s.childNodes.length&&(s=r),r)for(o=o&&Z.nodeName(r,"tr"),l=i.cacheable||h-1;h>a;a++)n.call(o&&Z.nodeName(this[a],"table")?u(this[a],"tbody"):this[a],a===l?s:Z.clone(s,!0,!0));s=r=null,g.length&&Z.each(g,function(e,t){t.src?Z.ajax?Z.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):Z.error("no ajax"):Z.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Zt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),Z.buildFragment=function(e,o,n){var i,r,s,l=e[0];return o=o||$,o=!o.nodeType&&o[0]||o,o=o.ownerDocument||o,1===e.length&&"string"==typeof l&&l.length<512&&o===$&&"<"===l.charAt(0)&&!zt.test(l)&&(Z.support.checkClone||!qt.test(l))&&(Z.support.html5Clone||!Yt.test(l))&&(r=!0,i=Z.fragments[l],s=i!==t),i||(i=o.createDocumentFragment(),Z.clean(e,o,i,n),r&&(Z.fragments[l]=s&&i)),{fragment:i,cacheable:r}},Z.fragments={},Z.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Z.fn[e]=function(o){var n,i=0,r=[],s=Z(o),l=s.length,a=1===this.length&&this[0].parentNode;if((null==a||a&&11===a.nodeType&&1===a.childNodes.length)&&1===l)return s[t](this[0]),this;for(;l>i;i++)n=(i>0?this.clone(!0):this).get(),Z(s[i])[t](n),r=r.concat(n);return this.pushStack(r,e,s.selector)}}),Z.extend({clone:function(e,t,o){var n,i,r,s;if(Z.support.html5Clone||Z.isXMLDoc(e)||!Yt.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(to.innerHTML=e.outerHTML,to.removeChild(s=to.firstChild)),!(Z.support.noCloneEvent&&Z.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Z.isXMLDoc(e)))for(d(e,s),n=p(e),i=p(s),r=0;n[r];++r)i[r]&&d(n[r],i[r]);if(t&&(h(e,s),o))for(n=p(e),i=p(s),r=0;n[r];++r)h(n[r],i[r]);return n=i=null,s},clean:function(e,t,o,n){var i,r,s,l,a,c,u,h,d,p,m,y=t===$&&eo,_=[];for(t&&"undefined"!=typeof t.createDocumentFragment||(t=$),i=0;null!=(s=e[i]);i++)if("number"==typeof s&&(s+=""),s){if("string"==typeof s)if(Kt.test(s)){for(y=y||g(t),u=t.createElement("div"),y.appendChild(u),s=s.replace(Wt,"<$1>"),l=(Gt.exec(s)||["",""])[1].toLowerCase(),a=Jt[l]||Jt._default,c=a[0],u.innerHTML=a[1]+s+a[2];c--;)u=u.lastChild;if(!Z.support.tbody)for(h=Vt.test(s),d="table"!==l||h?""!==a[1]||h?[]:u.childNodes:u.firstChild&&u.firstChild.childNodes,r=d.length-1;r>=0;--r)Z.nodeName(d[r],"tbody")&&!d[r].childNodes.length&&d[r].parentNode.removeChild(d[r]);!Z.support.leadingWhitespace&&$t.test(s)&&u.insertBefore(t.createTextNode($t.exec(s)[0]),u.firstChild),s=u.childNodes,u.parentNode.removeChild(u)}else s=t.createTextNode(s);s.nodeType?_.push(s):Z.merge(_,s)}if(u&&(s=u=y=null),!Z.support.appendChecked)for(i=0;null!=(s=_[i]);i++)Z.nodeName(s,"input")?f(s):"undefined"!=typeof s.getElementsByTagName&&Z.grep(s.getElementsByTagName("input"),f);if(o)for(p=function(e){return!e.type||Qt.test(e.type)?n?n.push(e.parentNode?e.parentNode.removeChild(e):e):o.appendChild(e):void 0},i=0;null!=(s=_[i]);i++)Z.nodeName(s,"script")&&p(s)||(o.appendChild(s),"undefined"!=typeof s.getElementsByTagName&&(m=Z.grep(Z.merge([],s.getElementsByTagName("script")),p),_.splice.apply(_,[i+1,0].concat(m)),i+=m.length));return _},cleanData:function(e,t){for(var o,n,i,r,s=0,l=Z.expando,a=Z.cache,c=Z.support.deleteExpando,g=Z.event.special;null!=(i=e[s]);s++)if((t||Z.acceptData(i))&&(n=i[l],o=n&&a[n])){if(o.events)for(r in o.events)g[r]?Z.event.remove(i,r):Z.removeEvent(i,r,o.handle);a[n]&&(delete a[n],c?delete i[l]:i.removeAttribute?i.removeAttribute(l):i[l]=null,Z.deletedIds.push(n))}}}),function(){var e,t;Z.uaMatch=function(e){e=e.toLowerCase();var t=/(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:t[1]||"",version:t[2]||"0"}},e=Z.uaMatch(G.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),Z.browser=t,Z.sub=function(){function e(t,o){return new e.fn.init(t,o)}Z.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function o(o,n){return n&&n instanceof Z&&!(n instanceof e)&&(n=e(n)),Z.fn.init.call(this,o,n,t)},e.fn.init.prototype=e.fn;var t=e($);return e}}();var oo,no,io,ro=/alpha\([^)]*\)/i,so=/opacity=([^)]*)/,lo=/^(top|right|bottom|left)$/,ao=/^(none|table(?!-c[ea]).+)/,co=/^margin/,go=new RegExp("^("+J+")(.*)$","i"),uo=new RegExp("^("+J+")(?!px)[a-z%]+$","i"),ho=new RegExp("^([-+])=("+J+")","i"),po={},fo={position:"absolute",visibility:"hidden",display:"block"},mo={letterSpacing:0,fontWeight:400},yo=["Top","Right","Bottom","Left"],_o=["Webkit","O","Moz","ms"],Eo=Z.fn.toggle;Z.fn.extend({css:function(e,o){return Z.access(this,function(e,o,n){return n!==t?Z.style(e,o,n):Z.css(e,o)},e,o,arguments.length>1)},show:function(){return _(this,!0)},hide:function(){return _(this)},toggle:function(e,t){var o="boolean"==typeof e;return Z.isFunction(e)&&Z.isFunction(t)?Eo.apply(this,arguments):this.each(function(){(o?e:y(this))?Z(this).show():Z(this).hide()})}}),Z.extend({cssHooks:{opacity:{get:function(e,t){if(t){var o=oo(e,"opacity");return""===o?"1":o}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":Z.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,o,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,s,l,a=Z.camelCase(o),c=e.style;if(o=Z.cssProps[a]||(Z.cssProps[a]=m(c,a)),l=Z.cssHooks[o]||Z.cssHooks[a],n===t)return l&&"get"in l&&(r=l.get(e,!1,i))!==t?r:c[o];if(s=typeof n,"string"===s&&(r=ho.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(Z.css(e,o)),s="number"),!(null==n||"number"===s&&isNaN(n)||("number"===s&&!Z.cssNumber[a]&&(n+="px"),l&&"set"in l&&(n=l.set(e,n,i))===t)))try{c[o]=n}catch(g){}}},css:function(e,o,n,i){var r,s,l,a=Z.camelCase(o);return o=Z.cssProps[a]||(Z.cssProps[a]=m(e.style,a)),l=Z.cssHooks[o]||Z.cssHooks[a],l&&"get"in l&&(r=l.get(e,!0,i)),r===t&&(r=oo(e,o)),"normal"===r&&o in mo&&(r=mo[o]),n||i!==t?(s=parseFloat(r),n||Z.isNumeric(s)?s||0:r):r},swap:function(e,t,o){var n,i,r={};for(i in t)r[i]=e.style[i],e.style[i]=t[i];n=o.call(e);for(i in t)e.style[i]=r[i];return n}}),e.getComputedStyle?oo=function(t,o){var n,i,r,s,l=e.getComputedStyle(t,null),a=t.style;return l&&(n=l[o],""===n&&!Z.contains(t.ownerDocument,t)&&(n=Z.style(t,o)),uo.test(n)&&co.test(o)&&(i=a.width,r=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=n,n=l.width,a.width=i,a.minWidth=r,a.maxWidth=s)),n}:$.documentElement.currentStyle&&(oo=function(e,t){var o,n,i=e.currentStyle&&e.currentStyle[t],r=e.style;return null==i&&r&&r[t]&&(i=r[t]),uo.test(i)&&!lo.test(t)&&(o=r.left,n=e.runtimeStyle&&e.runtimeStyle.left,n&&(e.runtimeStyle.left=e.currentStyle.left),r.left="fontSize"===t?"1em":i,i=r.pixelLeft+"px",r.left=o,n&&(e.runtimeStyle.left=n)),""===i?"auto":i}),Z.each(["height","width"],function(e,t){Z.cssHooks[t]={get:function(e,o,n){return o?0===e.offsetWidth&&ao.test(oo(e,"display"))?Z.swap(e,fo,function(){return C(e,t,n)}):C(e,t,n):void 0},set:function(e,o,n){return E(e,o,n?v(e,t,n,Z.support.boxSizing&&"border-box"===Z.css(e,"boxSizing")):0)}}}),Z.support.opacity||(Z.cssHooks.opacity={get:function(e,t){return so.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var o=e.style,n=e.currentStyle,i=Z.isNumeric(t)?"alpha(opacity="+100*t+")":"",r=n&&n.filter||o.filter||"";o.zoom=1,t>=1&&""===Z.trim(r.replace(ro,""))&&o.removeAttribute&&(o.removeAttribute("filter"),n&&!n.filter)||(o.filter=ro.test(r)?r.replace(ro,i):r+" "+i)}}),Z(function(){Z.support.reliableMarginRight||(Z.cssHooks.marginRight={get:function(e,t){return Z.swap(e,{display:"inline-block"},function(){return t?oo(e,"marginRight"):void 0})}}),!Z.support.pixelPosition&&Z.fn.position&&Z.each(["top","left"],function(e,t){Z.cssHooks[t]={get:function(e,o){if(o){var n=oo(e,t);return uo.test(n)?Z(e).position()[t]+"px":n}}}})}),Z.expr&&Z.expr.filters&&(Z.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!Z.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||oo(e,"display"))},Z.expr.filters.visible=function(e){return!Z.expr.filters.hidden(e)}),Z.each({margin:"",padding:"",border:"Width"},function(e,t){Z.cssHooks[e+t]={expand:function(o){var n,i="string"==typeof o?o.split(" "):[o],r={};for(n=0;4>n;n++)r[e+yo[n]+t]=i[n]||i[n-2]||i[0];return r}},co.test(e)||(Z.cssHooks[e+t].set=E)});var vo=/%20/g,Co=/\[\]$/,Bo=/\r?\n/g,ko=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bo=/^(?:select|textarea)/i;Z.fn.extend({serialize:function(){return Z.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?Z.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bo.test(this.nodeName)||ko.test(this.type))}).map(function(e,t){var o=Z(this).val();return null==o?null:Z.isArray(o)?Z.map(o,function(e){return{name:t.name,value:e.replace(Bo,"\r\n")}}):{name:t.name,value:o.replace(Bo,"\r\n")}}).get()}}),Z.param=function(e,o){var n,i=[],r=function(e,t){t=Z.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(o===t&&(o=Z.ajaxSettings&&Z.ajaxSettings.traditional),Z.isArray(e)||e.jquery&&!Z.isPlainObject(e))Z.each(e,function(){r(this.name,this.value)});else for(n in e)k(n,e[n],o,r);return i.join("&").replace(vo,"+")};var Ao,To,So=/#.*$/,Ro=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Io=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Do=/^(?:GET|HEAD)$/,wo=/^\/\//,Lo=/\?/,Fo=/)<[^<]*)*<\/script>/gi,Oo=/([?&])_=[^&]*/,No=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Mo=Z.fn.load,xo={},Po={},Ho=["*/"]+["*"];try{Ao=W.href}catch(Uo){Ao=$.createElement("a"),Ao.href="",Ao=Ao.href}To=No.exec(Ao.toLowerCase())||[],Z.fn.load=function(e,o,n){if("string"!=typeof e&&Mo)return Mo.apply(this,arguments);if(!this.length)return this;var i,r,s,l=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),Z.isFunction(o)?(n=o,o=t):o&&"object"==typeof o&&(r="POST"),Z.ajax({url:e,type:r,dataType:"html",data:o,complete:function(e,t){n&&l.each(n,s||[e.responseText,t,e])}}).done(function(e){s=arguments,l.html(i?Z("
").append(e.replace(Fo,"")).find(i):e)}),this},Z.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){Z.fn[t]=function(e){return this.on(t,e)}}),Z.each(["get","post"],function(e,o){Z[o]=function(e,n,i,r){return Z.isFunction(n)&&(r=r||i,i=n,n=t),Z.ajax({type:o,url:e,data:n,success:i,dataType:r})}}),Z.extend({getScript:function(e,o){return Z.get(e,t,o,"script")},getJSON:function(e,t,o){return Z.get(e,t,o,"json")},ajaxSetup:function(e,t){return t?T(e,Z.ajaxSettings):(t=e,e=Z.ajaxSettings),T(e,t),e},ajaxSettings:{url:Ao,isLocal:Io.test(To[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Ho},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":Z.parseJSON,"text xml":Z.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:b(xo),ajaxTransport:b(Po),ajax:function(e,o){function n(e,o,n,s){var c,u,_,E,C,k=o;2!==v&&(v=2,a&&clearTimeout(a),l=t,r=s||"",B.readyState=e>0?4:0,n&&(E=S(h,B,n)),e>=200&&300>e||304===e?(h.ifModified&&(C=B.getResponseHeader("Last-Modified"),C&&(Z.lastModified[i]=C),C=B.getResponseHeader("Etag"),C&&(Z.etag[i]=C)),304===e?(k="notmodified",c=!0):(c=R(h,E),k=c.state,u=c.data,_=c.error,c=!_)):(_=k,(!k||e)&&(k="error",0>e&&(e=0))),B.status=e,B.statusText=""+(o||k),c?f.resolveWith(d,[u,k,B]):f.rejectWith(d,[B,k,_]),B.statusCode(y),y=t,g&&p.trigger("ajax"+(c?"Success":"Error"),[B,h,c?u:_]),m.fireWith(d,[B,k]),g&&(p.trigger("ajaxComplete",[B,h]),--Z.active||Z.event.trigger("ajaxStop")))}"object"==typeof e&&(o=e,e=t),o=o||{};var i,r,s,l,a,c,g,u,h=Z.ajaxSetup({},o),d=h.context||h,p=d!==h&&(d.nodeType||d instanceof Z)?Z(d):Z.event,f=Z.Deferred(),m=Z.Callbacks("once memory"),y=h.statusCode||{},_={},E={},v=0,C="canceled",B={readyState:0,setRequestHeader:function(e,t){if(!v){var o=e.toLowerCase();e=E[o]=E[o]||e,_[e]=t}return this},getAllResponseHeaders:function(){return 2===v?r:null},getResponseHeader:function(e){var o;if(2===v){if(!s)for(s={};o=Ro.exec(r);)s[o[1].toLowerCase()]=o[2];o=s[e.toLowerCase()]}return o===t?null:o},overrideMimeType:function(e){return v||(h.mimeType=e),this},abort:function(e){return e=e||C,l&&l.abort(e),n(0,e),this}};if(f.promise(B),B.success=B.done,B.error=B.fail,B.complete=m.add,B.statusCode=function(e){if(e){var t;if(2>v)for(t in e)y[t]=[y[t],e[t]];else t=e[B.status],B.always(t)}return this},h.url=((e||h.url)+"").replace(So,"").replace(wo,To[1]+"//"),h.dataTypes=Z.trim(h.dataType||"*").toLowerCase().split(tt),null==h.crossDomain&&(c=No.exec(h.url.toLowerCase()),h.crossDomain=!(!c||c[1]==To[1]&&c[2]==To[2]&&(c[3]||("http:"===c[1]?80:443))==(To[3]||("http:"===To[1]?80:443)))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=Z.param(h.data,h.traditional)),A(xo,h,o,B),2===v)return B;if(g=h.global,h.type=h.type.toUpperCase(),h.hasContent=!Do.test(h.type),g&&0===Z.active++&&Z.event.trigger("ajaxStart"),!h.hasContent&&(h.data&&(h.url+=(Lo.test(h.url)?"&":"?")+h.data,delete h.data),i=h.url,h.cache===!1)){var k=Z.now(),b=h.url.replace(Oo,"$1_="+k);h.url=b+(b===h.url?(Lo.test(h.url)?"&":"?")+"_="+k:"")}(h.data&&h.hasContent&&h.contentType!==!1||o.contentType)&&B.setRequestHeader("Content-Type",h.contentType),h.ifModified&&(i=i||h.url,Z.lastModified[i]&&B.setRequestHeader("If-Modified-Since",Z.lastModified[i]),Z.etag[i]&&B.setRequestHeader("If-None-Match",Z.etag[i])),B.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Ho+"; q=0.01":""):h.accepts["*"]);for(u in h.headers)B.setRequestHeader(u,h.headers[u]);if(!h.beforeSend||h.beforeSend.call(d,B,h)!==!1&&2!==v){C="abort";for(u in{success:1,error:1,complete:1})B[u](h[u]);if(l=A(Po,h,o,B)){B.readyState=1,g&&p.trigger("ajaxSend",[B,h]),h.async&&h.timeout>0&&(a=setTimeout(function(){B.abort("timeout")},h.timeout));try{v=1,l.send(_,n)}catch(T){if(!(2>v))throw T;n(-1,T)}}else n(-1,"No Transport");return B}return B.abort()},active:0,lastModified:{},etag:{}});var $o=[],Wo=/\?/,Go=/(=)\?(?=&|$)|\?\?/,Vo=Z.now();Z.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=$o.pop()||Z.expando+"_"+Vo++;return this[e]=!0,e}}),Z.ajaxPrefilter("json jsonp",function(o,n,i){var r,s,l,a=o.data,c=o.url,g=o.jsonp!==!1,u=g&&Go.test(c),h=g&&!u&&"string"==typeof a&&!(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&Go.test(a);return"jsonp"===o.dataTypes[0]||u||h?(r=o.jsonpCallback=Z.isFunction(o.jsonpCallback)?o.jsonpCallback():o.jsonpCallback,s=e[r],u?o.url=c.replace(Go,"$1"+r):h?o.data=a.replace(Go,"$1"+r):g&&(o.url+=(Wo.test(c)?"&":"?")+o.jsonp+"="+r),o.converters["script json"]=function(){return l||Z.error(r+" was not called"),l[0]},o.dataTypes[0]="json",e[r]=function(){l=arguments},i.always(function(){e[r]=s,o[r]&&(o.jsonpCallback=n.jsonpCallback,$o.push(r)),l&&Z.isFunction(s)&&s(l[0]),l=s=t}),"script"):void 0}),Z.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return Z.globalEval(e),e}}}),Z.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),Z.ajaxTransport("script",function(e){if(e.crossDomain){var o,n=$.head||$.getElementsByTagName("head")[0]||$.documentElement;return{send:function(i,r){o=$.createElement("script"),o.async="async",e.scriptCharset&&(o.charset=e.scriptCharset),o.src=e.url,o.onload=o.onreadystatechange=function(e,i){(i||!o.readyState||/loaded|complete/.test(o.readyState))&&(o.onload=o.onreadystatechange=null,n&&o.parentNode&&n.removeChild(o),o=t,i||r(200,"success"))},n.insertBefore(o,n.firstChild)},abort:function(){o&&o.onload(0,1)}}}});var Ko,jo=e.ActiveXObject?function(){for(var e in Ko)Ko[e](0,1)}:!1,zo=0;Z.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&I()||D()}:I,function(e){Z.extend(Z.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(Z.ajaxSettings.xhr()),Z.support.ajax&&Z.ajaxTransport(function(o){if(!o.crossDomain||Z.support.cors){var n;return{send:function(i,r){var s,l,a=o.xhr();if(o.username?a.open(o.type,o.url,o.async,o.username,o.password):a.open(o.type,o.url,o.async),o.xhrFields)for(l in o.xhrFields)a[l]=o.xhrFields[l];o.mimeType&&a.overrideMimeType&&a.overrideMimeType(o.mimeType),!o.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(l in i)a.setRequestHeader(l,i[l])}catch(c){}a.send(o.hasContent&&o.data||null),n=function(e,i){var l,c,g,u,h;try{if(n&&(i||4===a.readyState))if(n=t,s&&(a.onreadystatechange=Z.noop,jo&&delete Ko[s]),i)4!==a.readyState&&a.abort();else{l=a.status,g=a.getAllResponseHeaders(),u={},h=a.responseXML,h&&h.documentElement&&(u.xml=h);try{u.text=a.responseText}catch(e){}try{c=a.statusText}catch(d){c=""}l||!o.isLocal||o.crossDomain?1223===l&&(l=204):l=u.text?200:404}}catch(p){i||r(-1,p)}u&&r(l,c,u,g)},o.async?4===a.readyState?setTimeout(n,0):(s=++zo,jo&&(Ko||(Ko={},Z(e).unload(jo)),Ko[s]=n),a.onreadystatechange=n):n()},abort:function(){n&&n(0,1)}}}});var Yo,Xo,qo=/^(?:toggle|show|hide)$/,Qo=new RegExp("^(?:([-+])=|)("+J+")([a-z%]*)$","i"),Zo=/queueHooks$/,Jo=[N],en={"*":[function(e,t){var o,n,i,r=this.createTween(e,t),s=Qo.exec(t),l=r.cur(),a=+l||0,c=1;if(s){if(o=+s[2],n=s[3]||(Z.cssNumber[e]?"":"px"),"px"!==n&&a){a=Z.css(r.elem,e,!0)||o||1;do i=c=c||".5",a/=c,Z.style(r.elem,e,a+n),c=r.cur()/l;while(1!==c&&c!==i)}r.unit=n,r.start=a,r.end=s[1]?a+(s[1]+1)*o:o}return r}]};Z.Animation=Z.extend(F,{tweener:function(e,t){Z.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var o,n=0,i=e.length;i>n;n++)o=e[n],en[o]=en[o]||[],en[o].unshift(t)},prefilter:function(e,t){t?Jo.unshift(e):Jo.push(e)}}),Z.Tween=M,M.prototype={constructor:M,init:function(e,t,o,n,i,r){this.elem=e,this.prop=o,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=r||(Z.cssNumber[o]?"":"px")},cur:function(){var e=M.propHooks[this.prop];return e&&e.get?e.get(this):M.propHooks._default.get(this)},run:function(e){var t,o=M.propHooks[this.prop];return this.pos=t=this.options.duration?Z.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),o&&o.set?o.set(this):M.propHooks._default.set(this),this}},M.prototype.init.prototype=M.prototype,M.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Z.css(e.elem,e.prop,!1,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){Z.fx.step[e.prop]?Z.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Z.cssProps[e.prop]]||Z.cssHooks[e.prop])?Z.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},M.propHooks.scrollTop=M.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Z.each(["toggle","show","hide"],function(e,t){var o=Z.fn[t];Z.fn[t]=function(n,i,r){return null==n||"boolean"==typeof n||!e&&Z.isFunction(n)&&Z.isFunction(i)?o.apply(this,arguments):this.animate(x(t,!0),n,i,r)}}),Z.fn.extend({fadeTo:function(e,t,o,n){return this.filter(y).css("opacity",0).show().end().animate({opacity:t},e,o,n)},animate:function(e,t,o,n){var i=Z.isEmptyObject(e),r=Z.speed(t,o,n),s=function(){var t=F(this,Z.extend({},e),r);i&&t.stop(!0)};return i||r.queue===!1?this.each(s):this.queue(r.queue,s)},stop:function(e,o,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=o,o=e,e=t),o&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",r=Z.timers,s=Z._data(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&Zo.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem===this&&(null==e||r[o].queue===e)&&(r[o].anim.stop(n),t=!1,r.splice(o,1));(t||!n)&&Z.dequeue(this,e)})}}),Z.each({slideDown:x("show"),slideUp:x("hide"),slideToggle:x("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Z.fn[e]=function(e,o,n){return this.animate(t,e,o,n)}}),Z.speed=function(e,t,o){var n=e&&"object"==typeof e?Z.extend({},e):{complete:o||!o&&t||Z.isFunction(e)&&e,duration:e,easing:o&&t||t&&!Z.isFunction(t)&&t};return n.duration=Z.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in Z.fx.speeds?Z.fx.speeds[n.duration]:Z.fx.speeds._default,(null==n.queue||n.queue===!0)&&(n.queue="fx"),n.old=n.complete,n.complete=function(){Z.isFunction(n.old)&&n.old.call(this),n.queue&&Z.dequeue(this,n.queue)},n},Z.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Z.timers=[],Z.fx=M.prototype.init,Z.fx.tick=function(){for(var e,t=Z.timers,o=0;o-1,u={},h={};g?(h=s.position(),i=h.top,r=h.left):(i=parseFloat(a)||0,r=parseFloat(c)||0),Z.isFunction(t)&&(t=t.call(e,o,l)),null!=t.top&&(u.top=t.top-l.top+i),null!=t.left&&(u.left=t.left-l.left+r),"using"in t?t.using.call(e,u):s.css(u)}},Z.fn.extend({position:function(){if(this[0]){var e=this[0],t=this.offsetParent(),o=this.offset(),n=tn.test(t[0].nodeName)?{top:0,left:0}:t.offset();return o.top-=parseFloat(Z.css(e,"marginTop"))||0,o.left-=parseFloat(Z.css(e,"marginLeft"))||0,n.top+=parseFloat(Z.css(t[0],"borderTopWidth"))||0,n.left+=parseFloat(Z.css(t[0],"borderLeftWidth"))||0,{top:o.top-n.top,left:o.left-n.left}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||$.body;e&&!tn.test(e.nodeName)&&"static"===Z.css(e,"position");)e=e.offsetParent;return e||$.body})}}),Z.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,o){var n=/Y/.test(o);Z.fn[e]=function(i){return Z.access(this,function(e,i,r){var s=P(e);return r===t?s?o in s?s[o]:s.document.documentElement[i]:e[i]:(s?s.scrollTo(n?Z(s).scrollLeft():r,n?r:Z(s).scrollTop()):e[i]=r,void 0)},e,i,arguments.length,null)}}),Z.each({Height:"height",Width:"width"},function(e,o){Z.each({padding:"inner"+e,content:o,"":"outer"+e},function(n,i){Z.fn[i]=function(i,r){var s=arguments.length&&(n||"boolean"!=typeof i),l=n||(i===!0||r===!0?"margin":"border");return Z.access(this,function(o,n,i){var r;return Z.isWindow(o)?o.document.documentElement["client"+e]:9===o.nodeType?(r=o.documentElement,Math.max(o.body["scroll"+e],r["scroll"+e],o.body["offset"+e],r["offset"+e],r["client"+e])):i===t?Z.css(o,n,i,l):Z.style(o,n,i,l)},o,s?i:t,s,null)}})}),e.jQuery=e.$=Z,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return Z})}(window),function(e,t){e.rails!==t&&e.error("jquery-ujs has already been loaded!");var o,n=e(document);e.rails=o={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",buttonClickSelector:"button[data-remote]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(t){var o=e('meta[name="csrf-token"]').attr("content");o&&t.setRequestHeader("X-CSRF-Token",o)},fire:function(t,o,n){var i=e.Event(o);return t.trigger(i,n),i.result!==!1},confirm:function(e){return confirm(e)},ajax:function(t){return e.ajax(t)},href:function(e){return e.attr("href")},handleRemote:function(n){var i,r,s,l,a,c,g,u;if(o.fire(n,"ajax:before")){if(l=n.data("cross-domain"),a=l===t?null:l,c=n.data("with-credentials")||null,g=n.data("type")||e.ajaxSettings&&e.ajaxSettings.dataType,n.is("form")){i=n.attr("method"),r=n.attr("action"),s=n.serializeArray();var h=n.data("ujs:submit-button");h&&(s.push(h),n.data("ujs:submit-button",null))}else n.is(o.inputChangeSelector)?(i=n.data("method"),r=n.data("url"),s=n.serialize(),n.data("params")&&(s=s+"&"+n.data("params"))):n.is(o.buttonClickSelector)?(i=n.data("method")||"get",r=n.data("url"),s=n.serialize(),n.data("params")&&(s=s+"&"+n.data("params"))):(i=n.data("method"),r=o.href(n),s=n.data("params")||null);u={type:i||"GET",data:s,dataType:g,beforeSend:function(e,i){return i.dataType===t&&e.setRequestHeader("accept","*/*;q=0.5, "+i.accepts.script),o.fire(n,"ajax:beforeSend",[e,i])},success:function(e,t,o){n.trigger("ajax:success",[e,t,o])},complete:function(e,t){n.trigger("ajax:complete",[e,t])},error:function(e,t,o){n.trigger("ajax:error",[e,t,o])},crossDomain:a},c&&(u.xhrFields={withCredentials:c}),r&&(u.url=r);var d=o.ajax(u);return n.trigger("ajax:send",d),d}return!1},handleMethod:function(n){var i=o.href(n),r=n.data("method"),s=n.attr("target"),l=e("meta[name=csrf-token]").attr("content"),a=e("meta[name=csrf-param]").attr("content"),c=e('
'),g='';a!==t&&l!==t&&(g+=''),s&&c.attr("target",s),c.hide().append(g).appendTo("body"),c.submit()},disableFormElements:function(t){t.find(o.disableSelector).each(function(){var t=e(this),o=t.is("button")?"html":"val";t.data("ujs:enable-with",t[o]()),t[o](t.data("disable-with")),t.prop("disabled",!0)})},enableFormElements:function(t){t.find(o.enableSelector).each(function(){var t=e(this),o=t.is("button")?"html":"val";t.data("ujs:enable-with")&&t[o](t.data("ujs:enable-with")),t.prop("disabled",!1)})},allowAction:function(e){var t,n=e.data("confirm"),i=!1;return n?(o.fire(e,"confirm")&&(i=o.confirm(n),t=o.fire(e,"confirm:complete",[i])),i&&t):!0},blankInputs:function(t,o,n){var i,r,s=e(),l=o||"input,textarea",a=t.find(l);return a.each(function(){if(i=e(this),r=i.is("input[type=checkbox],input[type=radio]")?i.is(":checked"):i.val(),!r==!n){if(i.is("input[type=radio]")&&a.filter('input[type=radio]:checked[name="'+i.attr("name")+'"]').length)return!0;s=s.add(i)}}),s.length?s:!1},nonBlankInputs:function(e,t){return o.blankInputs(e,t,!0)},stopEverything:function(t){return e(t.target).trigger("ujs:everythingStopped"),t.stopImmediatePropagation(),!1},disableElement:function(e){e.data("ujs:enable-with",e.html()),e.html(e.data("disable-with")),e.bind("click.railsDisable",function(e){return o.stopEverything(e)})},enableElement:function(e){e.data("ujs:enable-with")!==t&&(e.html(e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.unbind("click.railsDisable")}},o.fire(n,"rails:attachBindings")&&(e.ajaxPrefilter(function(e,t,n){e.crossDomain||o.CSRFProtection(n)}),n.delegate(o.linkDisableSelector,"ajax:complete",function(){o.enableElement(e(this))}),n.delegate(o.linkClickSelector,"click.rails",function(n){var i=e(this),r=i.data("method"),s=i.data("params");if(!o.allowAction(i))return o.stopEverything(n);if(i.is(o.linkDisableSelector)&&o.disableElement(i),i.data("remote")!==t){if(!(!n.metaKey&&!n.ctrlKey||r&&"GET"!==r||s))return!0;var l=o.handleRemote(i);return l===!1?o.enableElement(i):l.error(function(){o.enableElement(i)}),!1}return i.data("method")?(o.handleMethod(i),!1):void 0}),n.delegate(o.buttonClickSelector,"click.rails",function(t){var n=e(this);return o.allowAction(n)?(o.handleRemote(n),!1):o.stopEverything(t)}),n.delegate(o.inputChangeSelector,"change.rails",function(t){var n=e(this);return o.allowAction(n)?(o.handleRemote(n),!1):o.stopEverything(t)}),n.delegate(o.formSubmitSelector,"submit.rails",function(n){var i=e(this),r=i.data("remote")!==t,s=o.blankInputs(i,o.requiredInputSelector),l=o.nonBlankInputs(i,o.fileInputSelector);if(!o.allowAction(i))return o.stopEverything(n);if(s&&i.attr("novalidate")==t&&o.fire(i,"ajax:aborted:required",[s]))return o.stopEverything(n);if(r){if(l){setTimeout(function(){o.disableFormElements(i)},13);var a=o.fire(i,"ajax:aborted:file",[l]);return a||setTimeout(function(){o.enableFormElements(i)},13),a}return o.handleRemote(i),!1}setTimeout(function(){o.disableFormElements(i)},13)}),n.delegate(o.formInputClickSelector,"click.rails",function(t){var n=e(this);if(!o.allowAction(n))return o.stopEverything(t);var i=n.attr("name"),r=i?{name:i,value:n.val()}:null;n.closest("form").data("ujs:submit-button",r)}),n.delegate(o.formSubmitSelector,"ajax:beforeSend.rails",function(t){this==t.target&&o.disableFormElements(e(this))}),n.delegate(o.formSubmitSelector,"ajax:complete.rails",function(t){this==t.target&&o.enableFormElements(e(this))}),e(function(){var t=e("meta[name=csrf-token]").attr("content"),o=e("meta[name=csrf-param]").attr("content");e('form input[name="'+o+'"]').val(t)})) }(jQuery),function(e,t){function o(t,o){var i,r,s,l=t.nodeName.toLowerCase();return"area"===l?(i=t.parentNode,r=i.name,t.href&&r&&"map"===i.nodeName.toLowerCase()?(s=e("img[usemap=#"+r+"]")[0],!!s&&n(s)):!1):(/input|select|textarea|button|object/.test(l)?!t.disabled:"a"===l?t.href||o:o)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var i=0,r=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(o,n){return"number"==typeof o?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},o)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(o){if(o!==t)return this.css("zIndex",o);if(this.length)for(var n,i,r=e(this[0]);r.length&&r[0]!==document;){if(n=r.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(i=parseInt(r.css("zIndex"),10),!isNaN(i)&&0!==i))return i;r=r.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++i)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(o){return!!e.data(o,t)}}):function(t,o,n){return!!e.data(t,n[3])},focusable:function(t){return o(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),i=isNaN(n);return(i||n>=0)&&o(t,!i)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(o,n){function i(t,o,n,i){return e.each(r,function(){o-=parseFloat(e.css(t,"padding"+this))||0,n&&(o-=parseFloat(e.css(t,"border"+this+"Width"))||0),i&&(o-=parseFloat(e.css(t,"margin"+this))||0)}),o}var r="Width"===n?["Left","Right"]:["Top","Bottom"],s=n.toLowerCase(),l={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(o){return o===t?l["inner"+n].call(this):this.each(function(){e(this).css(s,i(this,o)+"px")})},e.fn["outer"+n]=function(t,o){return"number"!=typeof t?l["outer"+n].call(this,t):this.each(function(){e(this).css(s,i(this,t,!0,o)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(o){return arguments.length?t.call(this,e.camelCase(o)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,o,n){var i,r=e.ui[t].prototype;for(i in n)r.plugins[i]=r.plugins[i]||[],r.plugins[i].push([o,n[i]])},call:function(e,t,o){var n,i=e.plugins[t];if(i&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;n0?!0:(t[n]=1,i=t[n]>0,t[n]=0,i)}})}(jQuery),function(e,t){var o=0,n=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var o,n=0;null!=(o=t[n]);n++)try{e(o).triggerHandler("remove")}catch(r){}i(t)},e.widget=function(t,o,n){var i,r,s,l,a={},c=t.split(".")[0];t=t.split(".")[1],i=c+"-"+t,n||(n=o,o=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[c]=e[c]||{},r=e[c][t],s=e[c][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new s(e,t)},e.extend(s,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),l=new o,l.options=e.widget.extend({},l.options),e.each(n,function(t,n){return e.isFunction(n)?(a[t]=function(){var e=function(){return o.prototype[t].apply(this,arguments)},i=function(e){return o.prototype[t].apply(this,e)};return function(){var t,o=this._super,r=this._superApply;return this._super=e,this._superApply=i,t=n.apply(this,arguments),this._super=o,this._superApply=r,t}}(),void 0):(a[t]=n,void 0)}),s.prototype=e.widget.extend(l,{widgetEventPrefix:r?l.widgetEventPrefix:t},a,{constructor:s,namespace:c,widgetName:t,widgetFullName:i}),r?(e.each(r._childConstructors,function(t,o){var n=o.prototype;e.widget(n.namespace+"."+n.widgetName,s,o._proto)}),delete r._childConstructors):o._childConstructors.push(s),e.widget.bridge(t,s)},e.widget.extend=function(o){for(var i,r,s=n.call(arguments,1),l=0,a=s.length;a>l;l++)for(i in s[l])r=s[l][i],s[l].hasOwnProperty(i)&&r!==t&&(o[i]=e.isPlainObject(r)?e.isPlainObject(o[i])?e.widget.extend({},o[i],r):e.widget.extend({},r):r);return o},e.widget.bridge=function(o,i){var r=i.prototype.widgetFullName||o;e.fn[o]=function(s){var l="string"==typeof s,a=n.call(arguments,1),c=this;return s=!l&&a.length?e.widget.extend.apply(null,[s].concat(a)):s,l?this.each(function(){var n,i=e.data(this,r);return i?e.isFunction(i[s])&&"_"!==s.charAt(0)?(n=i[s].apply(i,a),n!==i&&n!==t?(c=n&&n.jquery?c.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+s+"' for "+o+" widget instance"):e.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+s+"'")}):this.each(function(){var t=e.data(this,r);t?t.option(s||{})._init():e.data(this,r,new i(s,this))}),c}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=o++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(o,n){var i,r,s,l=o;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof o)if(l={},i=o.split("."),o=i.shift(),i.length){for(r=l[o]=e.widget.extend({},this.options[o]),s=0;s=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var o=this.options;return this.helper||o.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(o.iframeFix===!0?"iframe":o.iframeFix).each(function(){e("
").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var o=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,o){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!o){var n=this._uiHash();if(this._trigger("drag",t,n)===!1)return this._mouseUp({}),!1;this.position=n.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var o=this,n=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){o._trigger("stop",t)!==!1&&o._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var o=this.options,n=e.isFunction(o.helper)?e(o.helper.apply(this.element[0],[t])):"clone"===o.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===o.appendTo?this.element[0].parentNode:o.appendTo),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,o,n,i=this.options;return i.containment?"window"===i.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===i.containment?(this.containment=[0,0,e(document).width()-this.helperProportions.width-this.margins.left,(e(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):i.containment.constructor===Array?(this.containment=i.containment,void 0):("parent"===i.containment&&(i.containment=this.helper[0].parentNode),o=e(i.containment),n=o[0],n&&(t="hidden"!==o.css("overflow"),this.containment=[(parseInt(o.css("borderLeftWidth"),10)||0)+(parseInt(o.css("paddingLeft"),10)||0),(parseInt(o.css("borderTopWidth"),10)||0)+(parseInt(o.css("paddingTop"),10)||0),(t?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(o.css("borderRightWidth"),10)||0)-(parseInt(o.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(o.css("borderBottomWidth"),10)||0)-(parseInt(o.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=o),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,o){o||(o=this.position);var n="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:i.scrollTop(),left:i.scrollLeft()}),{top:o.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*n,left:o.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*n}},_generatePosition:function(t){var o,n,i,r,s=this.options,l="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=t.pageX,c=t.pageY;return this.offset.scroll||(this.offset.scroll={top:l.scrollTop(),left:l.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(n=this.relative_container.offset(),o=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):o=this.containment,t.pageX-this.offset.click.lefto[2]&&(a=o[2]+this.offset.click.left),t.pageY-this.offset.click.top>o[3]&&(c=o[3]+this.offset.click.top)),s.grid&&(i=s.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,c=o?i-this.offset.click.top>=o[1]||i-this.offset.click.top>o[3]?i:i-this.offset.click.top>=o[1]?i-s.grid[1]:i+s.grid[1]:i,r=s.grid[0]?this.originalPageX+Math.round((a-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,a=o?r-this.offset.click.left>=o[0]||r-this.offset.click.left>o[2]?r:r-this.offset.click.left>=o[0]?r-s.grid[0]:r+s.grid[0]:r)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,o,n){return n=n||this._uiHash(),e.ui.plugin.call(this,t,[o,n]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,o,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,o){var n=e(this).data("ui-draggable"),i=n.options,r=e.extend({},o,{item:n.element});n.sortables=[],e(i.connectToSortable).each(function(){var o=e.data(this,"ui-sortable");o&&!o.options.disabled&&(n.sortables.push({instance:o,shouldRevert:o.options.revert}),o.refreshPositions(),o._trigger("activate",t,r))})},stop:function(t,o){var n=e(this).data("ui-draggable"),i=e.extend({},o,{item:n.element});e.each(n.sortables,function(){this.instance.isOver?(this.instance.isOver=0,n.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===n.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,i))})},drag:function(t,o){var n=e(this).data("ui-draggable"),i=this;e.each(n.sortables,function(){var r=!1,s=this;this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(r=!0,e.each(n.sortables,function(){return this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this!==s&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(s.instance.element[0],this.instance.element[0])&&(r=!1),r})),r?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(i).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return o.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=n.offset.click.top,this.instance.offset.click.left=n.offset.click.left,this.instance.offset.parent.left-=n.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=n.offset.parent.top-this.instance.offset.parent.top,n._trigger("toSortable",t),n.dropped=this.instance.element,n.currentItem=n.element,this.instance.fromOutside=n),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),n._trigger("fromSortable",t),n.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),o=e(this).data("ui-draggable").options;t.css("cursor")&&(o._cursor=t.css("cursor")),t.css("cursor",o.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,o){var n=e(o.helper),i=e(this).data("ui-draggable").options;n.css("opacity")&&(i._opacity=n.css("opacity")),n.css("opacity",i.opacity)},stop:function(t,o){var n=e(this).data("ui-draggable").options;n._opacity&&e(o.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var o=e(this).data("ui-draggable"),n=o.options,i=!1;o.scrollParent[0]!==document&&"HTML"!==o.scrollParent[0].tagName?(n.axis&&"x"===n.axis||(o.overflowOffset.top+o.scrollParent[0].offsetHeight-t.pageY=0;u--)l=d.snapElements[u].left,a=l+d.snapElements[u].width,c=d.snapElements[u].top,g=c+d.snapElements[u].height,l-f>y||m>a+f||c-f>E||_>g+f||!e.contains(d.snapElements[u].item.ownerDocument,d.snapElements[u].item)?(d.snapElements[u].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,t,e.extend(d._uiHash(),{snapItem:d.snapElements[u].item})),d.snapElements[u].snapping=!1):("inner"!==p.snapMode&&(n=Math.abs(c-E)<=f,i=Math.abs(g-_)<=f,r=Math.abs(l-y)<=f,s=Math.abs(a-m)<=f,n&&(o.position.top=d._convertPositionTo("relative",{top:c-d.helperProportions.height,left:0}).top-d.margins.top),i&&(o.position.top=d._convertPositionTo("relative",{top:g,left:0}).top-d.margins.top),r&&(o.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left),s&&(o.position.left=d._convertPositionTo("relative",{top:0,left:a}).left-d.margins.left)),h=n||i||r||s,"outer"!==p.snapMode&&(n=Math.abs(c-_)<=f,i=Math.abs(g-E)<=f,r=Math.abs(l-m)<=f,s=Math.abs(a-y)<=f,n&&(o.position.top=d._convertPositionTo("relative",{top:c,left:0}).top-d.margins.top),i&&(o.position.top=d._convertPositionTo("relative",{top:g-d.helperProportions.height,left:0}).top-d.margins.top),r&&(o.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left),s&&(o.position.left=d._convertPositionTo("relative",{top:0,left:a-d.helperProportions.width}).left-d.margins.left)),!d.snapElements[u].snapping&&(n||i||r||s||h)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,t,e.extend(d._uiHash(),{snapItem:d.snapElements[u].item})),d.snapElements[u].snapping=n||i||r||s||h)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,o=this.data("ui-draggable").options,n=e.makeArray(e(o.stack)).sort(function(t,o){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(o).css("zIndex"),10)||0)});n.length&&(t=parseInt(e(n[0]).css("zIndex"),10)||0,e(n).each(function(o){e(this).css("zIndex",t+o)}),this.css("zIndex",t+n.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,o){var n=e(o.helper),i=e(this).data("ui-draggable").options;n.css("zIndex")&&(i._zIndex=n.css("zIndex")),n.css("zIndex",i.zIndex)},stop:function(t,o){var n=e(this).data("ui-draggable").options;n._zIndex&&e(o.helper).css("zIndex",n._zIndex)}})}(jQuery),function(e){function t(e,t,o){return e>t&&t+o>e}e.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,o=t.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(o)?o:function(e){return e.is(o)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,o=e.ui.ddmanager.droppables[this.options.scope];t=g&&u>=l&&a>=h&&d>=c;case"intersect":return g=h&&d>=a||c>=h&&d>=c||h>a&&c>d)&&(s>=g&&u>=s||l>=g&&u>=l||g>s&&l>u);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,o){var n,i,r=e.ui.ddmanager.droppables[t.options.scope]||[],s=o?o.type:null,l=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(n=0;n
"),l=this.$getTop(t.end.row,n);var c=t.end.column*n.characterWidth;e.push("
"),s=(t.end.row-t.start.row-1)*n.lineHeight,0>s||(l=this.$getTop(t.start.row+1,n),e.push("
"))},this.drawSingleLineMarker=function(e,t,o,n,i,r){var s=n.lineHeight,l=(t.end.column+(i||0)-t.start.column)*n.characterWidth,a=this.$getTop(t.start.row,n),c=this.$padding+t.start.column*n.characterWidth;e.push("
")},this.drawFullLineMarker=function(e,t,o,n,i){var r=this.$getTop(t.start.row,n),s=n.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,n)-r),e.push("
")},this.drawScreenLineMarker=function(e,t,o,n,i){var r=this.$getTop(t.start.row,n),s=n.lineHeight;e.push("
")}}).call(i.prototype),t.Marker=i}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t){var o=e("../lib/oop"),n=e("../lib/dom"),i=e("../lib/lang"),r=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,l=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$characterSize={width:0,height:0},this.checkForSizeChanges(),this.$pollSizeChanges() };(function(){o.implement(this,s),this.EOF_CHAR="¶",this.EOL_CHAR="¬",this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$characterSize.height||0},this.getCharacterWidth=function(){return this.$characterSize.width||0},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){var e=this;this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=r.isIE||r.isOldGecko?function(){var e=1e3;if(!this.$measureNode){var t=this.$measureNode=n.createElement("div"),o=t.style;if(o.width=o.height="auto",o.left=o.top=40*-e+"px",o.visibility="hidden",o.position="fixed",o.overflow="visible",o.whiteSpace="nowrap",t.innerHTML=i.stringRepeat("Xy",e),this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(t);else{for(var r=this.element.parentNode;!n.hasCssClass(r,"ace_editor");)r=r.parentNode;r.appendChild(t)}}if(!this.element.offsetWidth)return null;var o=this.$measureNode.style,s=n.computedStyle(this.element);for(var l in this.$fontStyles)o[l]=s[l];var a={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(2*e)};return 0==a.width||0==a.height?null:a}:function(){if(!this.$measureNode){var e=this.$measureNode=n.createElement("div"),t=e.style;t.width=t.height="auto",t.left=t.top="-100px",t.visibility="hidden",t.position="fixed",t.overflow="visible",t.whiteSpace="nowrap",e.innerHTML=i.stringRepeat("X",100);for(var o=this.element.parentNode;o&&!n.hasCssClass(o,"ace_editor");)o=o.parentNode;if(!o)return this.$measureNode=null;o.appendChild(e)}var r=this.$measureNode.getBoundingClientRect(),s={height:r.height,width:r.width/100};return 0==s.width||0==s.height?null:s},this.setSession=function(e){this.session=e,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],o=1;e+1>o;o++)this.showInvisibles?t.push(""+this.TAB_CHAR+i.stringRepeat(" ",o-1)+""):t.push(i.stringRepeat(" ",o));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide";if(this.showInvisibles){n+=" ace_invisible";var r=i.stringRepeat(this.SPACE_CHAR,this.tabSize),s=this.TAB_CHAR+i.stringRepeat(" ",this.tabSize-1)}else var r=i.stringRepeat(" ",this.tabSize),s=r;this.$tabStrings[" "]=""+r+"",this.$tabStrings[" "]=""+s+""}},this.updateLines=function(e,t,o){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;for(var i=Math.max(t,e.firstRow),r=Math.min(o,e.lastRow),s=this.element.childNodes,l=0,a=e.firstRow;i>a;a++){var c=this.session.getFoldLine(a);if(c){if(c.containsRow(i)){i=c.start.row;break}a=c.end.row}l++}for(var a=i,c=this.session.getNextFoldLine(a),g=c?c.start.row:1/0;a>g&&(a=c.end.row+1,c=this.session.getNextFoldLine(a,c),g=c?c.start.row:1/0),!(a>r);){var u=s[l++];if(u){var h=[];this.$renderLine(h,a,!this.$useLineGroups(),a==g?c:!1),n.setInnerHtml(u,h.join(""))}a++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow0;n--)o.removeChild(o.firstChild);if(t.lastRow>e.lastRow)for(var n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);n>0;n--)o.removeChild(o.lastChild);if(e.firstRowt.lastRow){var i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);o.appendChild(i)}},this.$renderLinesFragment=function(e,t,o){for(var i=this.element.ownerDocument.createDocumentFragment(),r=t,s=this.session.getNextFoldLine(r),l=s?s.start.row:1/0;r>l&&(r=s.end.row+1,s=this.session.getNextFoldLine(r,s),l=s?s.start.row:1/0),!(r>o);){var a=n.createElement("div"),c=[];if(this.$renderLine(c,r,!1,r==l?s:!1),a.innerHTML=c.join(""),this.$useLineGroups())a.className="ace_line_group",i.appendChild(a);else for(var g=a.childNodes;g.length;)i.appendChild(g[0]);r++}return i},this.update=function(e){this.config=e;for(var t=[],o=e.firstRow,i=e.lastRow,r=o,s=this.session.getNextFoldLine(r),l=s?s.start.row:1/0;r>l&&(r=s.end.row+1,s=this.session.getNextFoldLine(r,s),l=s?s.start.row:1/0),!(r>i);)this.$useLineGroups()&&t.push("
"),this.$renderLine(t,r,!1,r==l?s:!1),this.$useLineGroups()&&t.push("
"),r++;this.element=n.setInnerHtml(this.element,t.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,o,n){var r=this,s=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,l=function(e,o,n,s){if(o)return r.showInvisibles?""+i.stringRepeat(r.SPACE_CHAR,e.length)+"":i.stringRepeat(" ",e.length);if("&"==e)return"&";if("<"==e)return"<";if(" "==e){var l=r.session.getScreenTabSize(t+s);return t+=l-1,r.$tabStrings[l]}if(" "==e){var a=r.showInvisibles?"ace_cjk ace_invisible":"ace_cjk",c=r.showInvisibles?r.SPACE_CHAR:"";return t+=1,""+c+""}return n?""+r.SPACE_CHAR+"":(t+=1,""+e+"")},a=n.replace(s,l);if(this.$textToken[o.type])e.push(a);else{var c="ace_"+o.type.replace(/\./g," ace_"),g="";"fold"==o.type&&(g=" style='width:"+o.value.length*this.config.characterWidth+"px;' "),e.push("",a,"")}return t+n.length},this.renderIndentGuide=function(e,t,o){var n=t.search(this.$indentGuideRe);return 0>=n||n>=o?t:" "==t[0]?(n-=n%this.tabSize,e.push(i.stringRepeat(this.$tabStrings[" "],n/this.tabSize)),t.substr(n)):" "==t[0]?(e.push(i.stringRepeat(this.$tabStrings[" "],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,o,n){for(var i=0,r=0,s=o[0],l=0,a=0;a=s;)l=this.$renderToken(e,l,c,g.substring(0,s-i)),g=g.substring(s-i),i=s,n||e.push("
","
"),r++,l=0,s=o[r]||Number.MAX_VALUE;0!=g.length&&(i+=g.length,l=this.$renderToken(e,l,c,g))}}},this.$renderSimpleLine=function(e,t){var o=0,n=t[0],i=n.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(o=this.$renderToken(e,o,n,i));for(var r=1;r"),i.length){var r=this.session.getRowSplitData(t);r&&r.length?this.$renderWrappedLine(e,i,r,o):this.$renderSimpleLine(e,i)}this.showInvisibles&&(n&&(t=n.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),o||e.push("
")},this.$getFoldLineTokens=function(e,t){function o(e,t,o){for(var n=0,r=0;r+e[n].value.lengtho-t&&(s=s.substring(0,o-t)),i.push({type:e[n].type,value:s}),r=t+s.length,n+=1}for(;o>r&&no?i.push({type:e[n].type,value:s.substring(0,o-r)}):i.push(e[n]),r+=s.length,n+=1}}var n=this.session,i=[],r=n.getTokens(e);return t.walk(function(e,t,s,l,a){null!=e?i.push({type:"fold",value:e}):(a&&(r=n.getTokens(t)),r.length&&o(r,l,s))},t.end.row,this.session.getLine(t.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(l.prototype),t.Text=l}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t){var o=e("../lib/dom"),n=function(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),o.addCssClass(this.element,"ace_hidden-cursors")};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,e?o.addCssClass(this.element,"ace_smooth-blinking"):o.removeCssClass(this.element,"ace_smooth-blinking"),this.restartTimer())},this.addCursor=function(){var e=o.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,o.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,o.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&o.removeCssClass(this.element,"ace_smooth-blinking");for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity="";if(this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){o.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity=0}.bind(this),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity="";t()}.bind(this),this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(e),n=this.$padding+o.column*this.config.characterWidth,i=(o.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:n,top:i}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,o=0,n=0;(void 0===t||0===t.length)&&(t=[{cursor:null}]);for(var o=0,i=t.length;i>o;o++){var r=this.getPixelPosition(t[o].cursor,!0);if(!((r.top>e.height+e.offset||r.top<-e.offset)&&o>1)){var s=(this.cursors[n++]||this.addCursor()).style;s.left=r.left+"px",s.top=r.top+"px",s.width=e.characterWidth+"px",s.height=e.lineHeight+"px"}}for(;this.cursors.length>n;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=r,this.restartTimer()},this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?o.addCssClass(this.element,"ace_overwrite-cursors"):o.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(n.prototype),t.Cursor=n}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t){var o=e("./lib/oop"),n=e("./lib/dom"),i=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,s=function(e,t){this.element=n.createElement("div"),this.element.className="ace_scrollbar",this.inner=n.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),t.$scrollbarWidth=this.width=n.scrollbarWidth(e.ownerDocument),t.$scrollbarWidth=this.width=n.scrollbarWidth(e.ownerDocument),this.fullWidth=this.width,this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.setVisible(!1),this.element.style.overflowY="scroll",i.addListener(this.element,"scroll",this.onScrollV.bind(this)),i.addListener(this.element,"mousedown",i.preventDefault)},l=function(e,t){this.element=n.createElement("div"),this.element.className="ace_scrollbar-h",this.inner=n.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.height=t.$scrollbarWidth,this.fullHeight=this.height,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px",this.setVisible(!1),this.element.style.overflowX="scroll",i.addListener(this.element,"scroll",this.onScrollH.bind(this)),i.addListener(this.element,"mousedown",i.preventDefault)};(function(){o.implement(this,r),this.setVisible=function(e){e?(this.element.style.display="",this.fullWidth&&(this.width=this.fullWidth),this.fullHeight&&(this.height=this.fullHeight)):(this.element.style.display="none",this.height=this.width=0)},this.onScrollV=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.onScrollH=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getWidth=function(){return this.width},this.getHeight=function(){return this.height},this.setHeight=function(e){this.element.style.height=e+"px"},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}).call(s.prototype),l.prototype=s.prototype,t.ScrollBar=s,t.ScrollBarV=s,t.ScrollBarH=l}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t){var o=e("./lib/event"),n=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending){this.pending=!0;var t=this;o.nextFrame(function(){t.pending=!1;for(var e;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(n.prototype),t.RenderLoop=n}),define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t){function o(e,t,o){return p.$options.wrap=!0,p.$options.needle=t,p.$options.backwards=-1==o,p.find(e)}function n(e,t){return e.row==t.row&&e.column==t.column}function i(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",c),e.commands.addCommands(h.defaultCommands),r(e))}function r(e){function t(){n&&(e.renderer.setMouseCursor(""),n=!1)}var o=e.textInput.getElement(),n=!1;g.addListener(o,"keydown",function(o){18!=o.keyCode||o.ctrlKey||o.shiftKey||o.metaKey?n&&t():n||(e.renderer.setMouseCursor("crosshair"),n=!0)}),g.addListener(o,"keyup",t),g.addListener(o,"blur",t)}var s=e("./range_list").RangeList,l=e("./range").Range,a=e("./selection").Selection,c=e("./mouse/multi_select_handler").onMouseDown,g=e("./lib/event"),u=e("./lib/lang"),h=e("./commands/multi_select_commands");t.commands=h.defaultCommands.concat(h.multiSelectCommands);var d=e("./search").Search,p=new d,f=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(f.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0==this.rangeCount){var o=this.toOrientedRange();if(this.rangeList.add(o),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(o),this.$onAddRange(o)}e.cursor||(e.cursor=e.end);var n=this.rangeList.add(e);return this.$onAddRange(e),n.length&&this.$onRemoveRange(n),this.rangeCount>1&&!this.inMultiSelectMode&&(this._emit("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);return t?(this.$onRemoveRange(t),t[0]):void 0},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._emit("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var o=e.length;o--;){var n=this.ranges.indexOf(e[o]);this.ranges.splice(n,1)}this._emit("removeRange",{ranges:e}),0==this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._emit("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],o=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(o,t.cursor==t.start)}else{var o=this.getRange(),n=this.isBackwards(),i=o.start.row,r=o.end.row;if(i==r){if(n)var s=o.end,a=o.start;else var s=o.start,a=o.end;return this.addRange(l.fromPoints(a,a)),this.addRange(l.fromPoints(s,s)),void 0}var c=[],g=this.getLineRange(i,!0);g.start.column=o.start.column,c.push(g);for(var u=i+1;r>u;u++)c.push(this.getLineRange(u,!0));g=this.getLineRange(r,!0),g.end.column=o.end.column,c.push(g),c.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],o=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(o,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.selectionLead),i=this.session.documentToScreenPosition(this.selectionAnchor),r=this.rectangularRangeBlock(n,i);r.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,o){var i=[],r=e.columns&&(s=0),0>g&&(g=0),g==u&&(o=!0);for(var h=g;u>=h;h++){var d=l.fromPoints(this.session.screenToDocumentPosition(h,s),this.session.screenToDocumentPosition(h,a));if(d.isEmpty()){if(p&&n(d.end,p))break;var p=d.end}d.cursor=r?d.start:d.end,i.push(d)}if(c&&i.reverse(),!o){for(var f=i.length-1;i[f].isEmpty()&&f>0;)f--;if(f>0)for(var m=0;i[m].isEmpty();)m++;for(var y=f;y>=m;y--)i[y].isEmpty()&&i.splice(y,1)}return i}}.call(a.prototype);var m=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,o=e.length;o--;){var n=e[o];if(n.marker){this.session.removeMarker(n.marker);var i=t.indexOf(n);-1!=i&&t.splice(i,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onMultiSelectExec=function(e){var t=e.command,o=e.editor;if(o.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=o.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=o.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(o.exitMultiSelectMode(),n=t.exec(o,e.args||{})):n=t.multiSelectAction(o,e.args||{});else{var n=t.exec(o,e.args||{});o.multiSelect.addRange(o.multiSelect.toOrientedRange()),o.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,o){if(!this.inVirtualSelectionMode){var n,i=this.session,r=this.selection,s=r.rangeList,l=r._eventRegistry;r._eventRegistry={};var c=new a(i);this.inVirtualSelectionMode=!0;for(var g=s.ranges.length;g--;){if(o)for(;g>0&&s.ranges[g].start.row==s.ranges[g-1].end.row;)g--;c.fromOrientedRange(s.ranges[g]),this.selection=i.selection=c;var u=e.exec(this,t||{});void 0==!n&&(n=u),c.toOrientedRange(s.ranges[g])}c.detach(),this.selection=i.selection=r,this.inVirtualSelectionMode=!1,r._eventRegistry=l,r.mergeOverlappingRanges();var h=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),h&&h.from==h.to&&this.renderer.animateScrolling(h.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,o=[],n=0;no.length||t.length<2||!t[1])return this.commands.exec("insertstring",this,e);for(var n=o.length;n--;){var i=o[n];i.isEmpty()||this.session.remove(i),this.session.insert(i.start,t[n])}}},this.findAll=function(e,t,o){t=t||{},t.needle=e||t.needle,this.$search.set(t);var n=this.$search.findAll(this.session);if(!n.length)return 0;this.$blockScrolling+=1;var i=this.multiSelect;o||i.toSingleRange(n[0]);for(var r=n.length;r--;)i.addRange(n[r],!0);return this.$blockScrolling-=1,n.length},this.selectMoreLines=function(e,t){var o=this.selection.toOrientedRange(),n=o.cursor==o.end,i=this.session.documentToScreenPosition(o.cursor);this.selection.$desiredColumn&&(i.column=this.selection.$desiredColumn);var r=this.session.screenToDocumentPosition(i.row+e,i.column);if(o.isEmpty())var s=r;else var a=this.session.documentToScreenPosition(n?o.end:o.start),s=this.session.screenToDocumentPosition(a.row+e,a.column);if(n){var c=l.fromPoints(r,s);c.cursor=c.start}else{var c=l.fromPoints(s,r);c.cursor=c.end}if(c.desiredColumn=i.column,this.selection.inMultiSelectMode){if(t)var g=o.cursor}else this.selection.addRange(o);this.selection.addRange(c),g&&this.selection.substractPoint(g)},this.transposeSelections=function(e){for(var t=this.session,o=t.multiSelect,n=o.ranges,i=n.length;i--;){var r=n[i];if(r.isEmpty()){var s=t.getWordRange(r.start.row,r.start.column);r.start.row=s.start.row,r.start.column=s.start.column,r.end.row=s.end.row,r.end.column=s.end.column}}o.mergeOverlappingRanges();for(var l=[],i=n.length;i--;){var r=n[i];l.unshift(t.getTextRange(r))}0>e?l.unshift(l.pop()):l.push(l.shift());for(var i=n.length;i--;){var r=n[i],s=r.clone();t.replace(r,l[i]),r.start.row=s.start.row,r.start.column=s.start.column}},this.selectMore=function(e,t){var n=this.session,i=n.multiSelect,r=i.toOrientedRange();if(r.isEmpty()){var r=n.getWordRange(r.start.row,r.start.column);return r.cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),void 0}var s=n.getTextRange(r),l=o(n,s,e);l&&(l.cursor=-1==e?l.start:l.end,this.multiSelect.addRange(l)),t&&this.multiSelect.substractPoint(r.cursor)},this.alignCursors=function(){var e=this.session,t=e.multiSelect,o=t.ranges;if(o.length){var n=-1,i=o.filter(function(e){return e.cursor.row==n?!0:(n=e.cursor.row,void 0)});t.$onRemoveRange(i);var r=0,s=1/0,a=o.map(function(t){var o=t.cursor,n=e.getLine(o.row),i=n.substr(o.column).search(/\S/g);return-1==i&&(i=0),o.column>r&&(r=o.column),s>i&&(s=i),i});o.forEach(function(t,o){var n=t.cursor,i=r-n.column,c=a[o]-s;i>c?e.insert(n,u.stringRepeat(" ",i-c)):e.remove(new l(n.row,n.column,n.row,n.column-i+c)),t.start.column=t.end.column=r,t.start.row=t.end.row=n.row,t.cursor=t.end}),t.fromOrientedRange(o[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),g=c.start.row,h=c.end.row,d=this.session.doc.removeLines(g,h);d=this.$reAlignText(d),this.session.doc.insertLines(g,d),c.start.column=0,c.end.column=d[d.length-1].length,this.selection.setRange(c)}},this.$reAlignText=function(e){function t(e){return u.stringRepeat(" ",e)}function o(e){return e[2]?t(r)+e[2]+t(s-e[2].length+l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function n(e){return e[2]?t(r+s-e[2].length)+e[2]+t(l," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function i(e){return e[2]?t(r)+e[2]+t(l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var r,s,l,a=!0,c=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==r?(r=t[1].length,s=t[2].length,l=t[3].length,t):(r+s+l!=t[1].length+t[2].length+t[3].length&&(c=!1),r!=t[1].length&&(a=!1),r>t[1].length&&(r=t[1].length),st[3].length&&(l=t[3].length),t):[e]}).map(a?c?n:o:i)}}).call(m.prototype),t.onSessionChange=function(e){var t=e.session;t.multiSelect||(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t.multiSelect;var o=e.oldSession;o&&(o.multiSelect.removeEventListener("addRange",this.$onAddRange),o.multiSelect.removeEventListener("removeRange",this.$onRemoveRange),o.multiSelect.removeEventListener("multiSelect",this.$onMultiSelect),o.multiSelect.removeEventListener("singleSelect",this.$onSingleSelect)),t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=i,e("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(e){i(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",c)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",c))},value:!0}})}),define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event"],function(e,t){function o(e,t){return e.row==t.row&&e.column==t.column}function n(e){var t=e.domEvent,n=t.altKey,r=t.shiftKey,s=e.getAccelKey(),l=e.getButton();if(e.editor.inMultiSelectMode&&2==l)return e.editor.textInput.onContextMenu(e.domEvent),void 0;if(!s&&!n)return 0==l&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode(),void 0;var a=e.editor,c=a.selection,g=a.inMultiSelectMode,u=e.getDocumentPosition(),h=c.getCursor(),d=e.inSelection()||c.isEmpty()&&o(u,h),p=e.x,f=e.y,m=function(e){p=e.clientX,f=e.clientY},y=function(){var e=a.renderer.pixelToScreenCoordinates(p,f),t=_.screenToDocumentPosition(e.row,e.column);o(v,e)&&o(t,c.selectionLead)||(v=e,a.selection.moveCursorToPosition(t),a.selection.clearSelection(),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(C),C=c.rectangularRangeBlock(v,E),C.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers())},_=a.session,E=a.renderer.pixelToScreenCoordinates(p,f),v=E;if(!s||r||n||0!=l){if(n&&0==l){e.stop(),g&&!s?c.toSingleRange():!g&&s&&c.addRange();var C=[];r?(E=_.documentToScreenPosition(c.lead),y()):(c.moveCursorToPosition(u),c.clearSelection());var B=function(){clearInterval(b),a.removeSelectionMarkers(C);for(var e=0;e20&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(r.prototype);var s=function(e,t,o){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,s=Object.create(n),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),r&&setTimeout(a)};var a=function(){var e=l.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._emit(e.event,e.data)};s.postMessage=function(e){l.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},i.loadModule(["worker",t],function(e){for(r=new e[o](s);l.messageBuffer.length;)a()})};s.prototype=r.prototype,t.UIWorkerClient=s,t.WorkerClient=r}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t){var o=e("./range").Range,n=e("./lib/event_emitter").EventEmitter,i=e("./lib/oop"),r=function(e,t,o,n,i,r){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=o;var l=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=l.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){i.implement(this,n),this.setup=function(){var e=this,t=this.doc,n=this.session,i=this.$pos;this.pos=t.createAnchor(i.row,i.column),this.markerId=n.addMarker(new o(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(t){n.removeMarker(e.markerId),e.markerId=n.addMarker(new o(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(o){var n=t.createAnchor(o.row,o.column);e.others.push(n)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new o(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1),n.on("change",function(i){e.removeMarker(n.markerId),n.markerId=e.addMarker(new o(i.value.row,i.value.column,i.value.row,i.value.column+t.length),t.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&n.start.column<=this.pos.column+this.length+1){var r=n.start.column-this.pos.column;if(this.length+=i,!this.session.$fromUndo){if("insertText"===t.action)for(var s=this.others.length-1;s>=0;s--){var l=this.others[s],a={row:l.row,column:l.column+r};l.row===n.start.row&&n.start.column=0;s--){var l=this.others[s],a={row:l.row,column:l.column+r};l.row===n.start.row&&n.start.column=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;eo;o++)e.undo(!0)}}).call(r.prototype),t.PlaceHolder=r}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t){var o=e("../../range").Range,n=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,o){var n=e.getLine(o);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(){return null},this.indentationBlock=function(e,t,n){var i=/\S/,r=e.getLine(t),s=r.search(i);if(-1!=s){for(var l=n||r.length,a=e.getLength(),c=t,g=t;++t=u)break;g=t}}if(g>c){var h=e.getLine(g).length;return new o(c,l,g,h)}}},this.openingBracketBlock=function(e,t,n,i,r){var s={row:n,column:i+1},l=e.$findClosingBracket(t,s,r);if(l){var a=e.foldWidgets[l.row];return null==a&&(a=this.getFoldWidget(e,l.row)),"start"==a&&l.row>s.row&&(l.row--,l.column=e.getLine(l.row).length),o.fromPoints(s,l)}},this.closingBracketBlock=function(e,t,n,i){var r={row:n,column:i},s=e.$findOpeningBracket(t,r);if(s)return s.column++,r.column--,o.fromPoints(s,r)}}).call(n.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t){t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var o=e("../lib/dom");o.importCssString(t.cssText,t.cssClass)}),function(){window.require(["ace/ace"],function(e){e&&e.config.init(),window.ace||(window.ace={});for(var t in e)e.hasOwnProperty(t)&&(ace[t]=e[t])})}(),define("ace/theme/clouds",["require","exports","module","ace/lib/dom"],function(e,t){t.isDark=!1,t.cssClass="ace-clouds",t.cssText='.ace-clouds .ace_gutter {background: #ebebeb;color: #333}.ace-clouds .ace_print-margin {width: 1px;background: #e8e8e8}.ace-clouds {background-color: #FFFFFF;color: #000000}.ace-clouds .ace_cursor {color: #000000}.ace-clouds .ace_marker-layer .ace_selection {background: #BDD5FC}.ace-clouds.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;border-radius: 2px}.ace-clouds .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-clouds .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-clouds .ace_marker-layer .ace_active-line {background: #FFFBD1}.ace-clouds .ace_gutter-active-line {background-color : #dcdcdc}.ace-clouds .ace_marker-layer .ace_selected-word {border: 1px solid #BDD5FC}.ace-clouds .ace_invisible {color: #BFBFBF}.ace-clouds .ace_keyword,.ace-clouds .ace_meta,.ace-clouds .ace_support.ace_constant.ace_property-value {color: #AF956F}.ace-clouds .ace_keyword.ace_operator {color: #484848}.ace-clouds .ace_keyword.ace_other.ace_unit {color: #96DC5F}.ace-clouds .ace_constant.ace_language {color: #39946A}.ace-clouds .ace_constant.ace_numeric {color: #46A609}.ace-clouds .ace_constant.ace_character.ace_entity {color: #BF78CC}.ace-clouds .ace_invalid {background-color: #FF002A}.ace-clouds .ace_fold {background-color: #AF956F;border-color: #000000}.ace-clouds .ace_storage,.ace-clouds .ace_support.ace_class,.ace-clouds .ace_support.ace_function,.ace-clouds .ace_support.ace_other,.ace-clouds .ace_support.ace_type {color: #C52727}.ace-clouds .ace_string {color: #5D90CD}.ace-clouds .ace_comment {color: #BCC8BA}.ace-clouds .ace_entity.ace_name.ace_tag,.ace-clouds .ace_entity.ace_other.ace_attribute-name {color: #606060}.ace-clouds .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y}';var o=e("../lib/dom");o.importCssString(t.cssText,t.cssClass)}),define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/coffee"],function(e,t){var o=e("../lib/oop"),n=e("./text").Mode,i=(e("../tokenizer").Tokenizer,e("./ruby_highlight_rules").RubyHighlightRules),r=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../range").Range,l=e("./folding/coffee").FoldMode,a=function(){this.HighlightRules=i,this.$outdent=new r,this.foldingRules=new l};o.inherits(a,n),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,o){var n=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),r=i.tokens;if(r.length&&"comment"==r[r.length-1].type)return n;if("start"==e){var s=t.match(/^.*[\{\(\[]\s*$/),l=t.match(/^\s*(class|def)\s.*$/),a=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),c=t.match(/^\s*(if|else)\s*/);(s||l||a||c)&&(n+=o)}return n},this.checkOutdent=function(e,t,o){return/^\s+end$/.test(t+o)||/^\s+}$/.test(t+o)||/^\s+else$/.test(t+o)},this.autoOutdent=function(e,t,o){var n=this.$getIndent(t.getLine(o)),i=t.getTabString();n.slice(-i.length)==i&&t.remove(new s(o,n.length-i.length,o,n.length))}}.call(a.prototype),t.Mode=a}),define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t){var o=e("../lib/oop"),n=e("./text_highlight_rules").TextHighlightRules,i=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"},r=t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},s=t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},l=t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"},a=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},c=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"},g=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield",o="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING",n="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",g=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":o,"variable.language":n,"support.function":e,"invalid.deprecated":"debugger"},"identifier");this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",regex:"^=begin(?:$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},r,s,l,{token:"text",regex:"::"},{token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]+"},i,a,c,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:g,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,o){var n="-"==e[2]?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return o.push(n,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,o){return e==o[1]?(o.shift(),o.shift(),"support.class"):"string"},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,o){return e==o[1]?(o.shift(),o.shift(),"support.class"):"string"},regex:".*$",next:"start"}]}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end(?:$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}]},this.normalizeRules()};o.inherits(g,n),t.RubyHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t){var o=e("../range").Range,n=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var r=i[1].length,s=e.findMatchingBracket({row:t,column:r});if(!s||s.row==t)return 0;var l=this.$getIndent(e.getLine(s.row));e.replace(new o(t,0,t,r-1),l)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(n.prototype),t.MatchingBraceOutdent=n}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t){var o=e("../../lib/oop"),n=e("./fold_mode").FoldMode,i=e("../../range").Range,r=t.FoldMode=function(){};o.inherits(r,n),function(){this.getFoldWidgetRange=function(e,t,o){var n=this.indentationBlock(e,o);if(n)return n;var r=/\S/,s=e.getLine(o),l=s.search(r);if(-1!=l&&"#"==s[l]){for(var a=s.length,c=e.getLength(),g=o,u=o;++og){var d=e.getLine(u).length;return new i(g,a,u,d)}}},this.getFoldWidget=function(e,t,o){var n=e.getLine(o),i=n.search(/\S/),r=e.getLine(o+1),s=e.getLine(o-1),l=s.search(/\S/),a=r.search(/\S/);if(-1==i)return e.foldWidgets[o-1]=-1!=l&&a>l?"start":"","";if(-1==l){if(i==a&&"#"==n[i]&&"#"==r[i])return e.foldWidgets[o-1]="",e.foldWidgets[o+1]="","start"}else if(l==i&&"#"==n[i]&&"#"==s[i]&&-1==e.getLine(o-2).search(/\S/))return e.foldWidgets[o-1]="start",e.foldWidgets[o+1]="","";return e.foldWidgets[o-1]=-1!=l&&i>l?"start":"",a>i?"start":""}}.call(r.prototype)}),!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e,t=document.createElement("bootstrap"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(e in o)if(void 0!==t.style[e])return o[e]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',o=function(o){e(o).on("click",t,this.close)};o.prototype.close=function(t){function o(){n.trigger("closed").remove()}var n,i=e(this),r=i.attr("data-target");r||(r=i.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),n=e(r),t&&t.preventDefault(),n.length||(n=i.hasClass("alert")?i:i.parent()),n.trigger(t=e.Event("close")),t.isDefaultPrevented()||(n.removeClass("in"),e.support.transition&&n.hasClass("fade")?n.on(e.support.transition.end,o):o())};var n=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var n=e(this),i=n.data("alert");i||n.data("alert",i=new o(this)),"string"==typeof t&&i[t].call(n)})},e.fn.alert.Constructor=o,e.fn.alert.noConflict=function(){return e.fn.alert=n,this},e(document).on("click.alert.data-api",t,o.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,o){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,o)};t.prototype.setState=function(e){var t="disabled",o=this.$element,n=o.data(),i=o.is("input")?"val":"html";e+="Text",n.resetText||o.data("resetText",o[i]()),o[i](n[e]||this.options[e]),setTimeout(function(){"loadingText"==e?o.addClass(t).attr(t,t):o.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var o=e.fn.button;e.fn.button=function(o){return this.each(function(){var n=e(this),i=n.data("button"),r="object"==typeof o&&o;i||n.data("button",i=new t(this,r)),"toggle"==o?i.toggle():o&&i.setState(o)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=o,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var o=e(t.target);o.hasClass("btn")||(o=o.closest(".btn")),o.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,o){this.$element=e(t),this.options=o,"hover"==this.options.pause&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var o=this.$element.find(".item.active"),n=o.parent().children(),i=n.index(o),r=this;if(!(t>n.length-1||0>t))return this.sliding?this.$element.one("slid",function(){r.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(n[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(t,o){var n,i=this.$element.find(".item.active"),r=o||i[t](),s=this.interval,l="next"==t?"left":"right",a="next"==t?"first":"last",c=this;if(this.sliding=!0,s&&this.pause(),r=r.length?r:this.$element.find(".item")[a](),n=e.Event("slide",{relatedTarget:r[0]}),!r.hasClass("active")){if(e.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(n),n.isDefaultPrevented())return;r.addClass(t),r[0].offsetWidth,i.addClass(l),r.addClass(l),this.$element.one(e.support.transition.end,function(){r.removeClass([t,l].join(" ")).addClass("active"),i.removeClass(["active",l].join(" ")),c.sliding=!1,setTimeout(function(){c.$element.trigger("slid")},0)})}else{if(this.$element.trigger(n),n.isDefaultPrevented())return;i.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}}};var o=e.fn.carousel;e.fn.carousel=function(o){return this.each(function(){var n=e(this),i=n.data("carousel"),r=e.extend({},e.fn.carousel.defaults,"object"==typeof o&&o),s="string"==typeof o?o:r.slide;i||n.data("carousel",i=new t(this,r)),"number"==typeof o?i.to(o):s?i[s]():r.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=o,this},e(document).on("click.carousel.data-api","[data-slide]",function(t){var o,n=e(this),i=e(n.attr("data-target")||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,"")),r=e.extend({},i.data(),n.data());i.carousel(r),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,o){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,o),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,o,n,i;if(!this.transitioning){if(t=this.dimension(),o=e.camelCase(["scroll",t].join("-")),n=this.$parent&&this.$parent.find("> .accordion-group > .in"),n&&n.length){if(i=n.data("collapse"),i&&i.transitioning)return;n.collapse("hide"),i||n.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][o])}},hide:function(){var t;this.transitioning||(t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0))},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[null!==e?"addClass":"removeClass"]("collapse"),this},transition:function(t,o,n){var i=this,r=function(){"show"==o.type&&i.reset(),i.transitioning=0,i.$element.trigger(n)};this.$element.trigger(o),o.isDefaultPrevented()||(this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,r):r())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var o=e.fn.collapse;e.fn.collapse=function(o){return this.each(function(){var n=e(this),i=n.data("collapse"),r="object"==typeof o&&o;i||n.data("collapse",i=new t(this,r)),"string"==typeof o&&i[o]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=o,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var o,n=e(this),i=n.attr("data-target")||t.preventDefault()||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""),r=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(r)})}(window.jQuery),!function(e){"use strict";function t(){e(n).each(function(){o(e(this)).removeClass("open")})}function o(t){var o,n=t.attr("data-target");return n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),o=e(n),o.length||(o=t.parent()),o}var n="[data-toggle=dropdown]",i=function(t){var o=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){o.parent().removeClass("open")})};i.prototype={constructor:i,toggle:function(){var n,i,r=e(this);if(!r.is(".disabled, :disabled"))return n=o(r),i=n.hasClass("open"),t(),i||n.toggleClass("open"),r.focus(),!1},keydown:function(t){var n,i,r,s,l;if(/(38|40|27)/.test(t.keyCode)&&(n=e(this),t.preventDefault(),t.stopPropagation(),!n.is(".disabled, :disabled"))){if(r=o(n),s=r.hasClass("open"),!s||s&&27==t.keyCode)return n.click();i=e("[role=menu] li:not(.divider):visible a",r),i.length&&(l=i.index(i.filter(":focus")),38==t.keyCode&&l>0&&l--,40==t.keyCode&&l').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),n&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),n?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}};var o=e.fn.modal;e.fn.modal=function(o){return this.each(function(){var n=e(this),i=n.data("modal"),r=e.extend({},e.fn.modal.defaults,n.data(),"object"==typeof o&&o);i||n.data("modal",i=new t(this,r)),"string"==typeof o?i[o]():r.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=o,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var o=e(this),n=o.attr("href"),i=e(o.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,"")),r=i.data("modal")?"toggle":e.extend({remote:!/#/.test(n)&&n},i.data(),o.data());t.preventDefault(),i.modal(r).one("hide",function(){o.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,o,n){var i,r;this.type=t,this.$element=e(o),this.options=this.getOptions(n),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(i="hover"==this.options.trigger?"mouseenter":"focus",r="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var o=e(t.currentTarget)[this.type](this._options).data(this.type);return o.options.delay&&o.options.delay.show?(clearTimeout(this.timeout),o.hoverState="in",this.timeout=setTimeout(function(){"in"==o.hoverState&&o.show()},o.options.delay.show),void 0):o.show()},leave:function(t){var o=e(t.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),o.options.delay&&o.options.delay.hide?(o.hoverState="out",this.timeout=setTimeout(function(){"out"==o.hoverState&&o.hide()},o.options.delay.hide),void 0):o.hide()},show:function(){var e,t,o,n,i,r,s;if(this.hasContent()&&this.enabled){switch(e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),r="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(r),e.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),o=this.getPosition(t),n=e[0].offsetWidth,i=e[0].offsetHeight,t?r.split(" ")[1]:r){case"bottom":s={top:o.top+o.height,left:o.left+o.width/2-n/2};break;case"top":s={top:o.top-i,left:o.left+o.width/2-n/2};break;case"left":s={top:o.top+o.height/2-i/2,left:o.left-n};break;case"right":s={top:o.top+o.height/2-i/2,left:o.left+o.width}}e.offset(s).addClass(r).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function t(){var t=setTimeout(function(){o.off(e.support.transition.end).detach()},500);o.one(e.support.transition.end,function(){clearTimeout(t),o.detach()})}var o=this.tip();return o.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?t():o.detach(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,o=this.options;return e=t.attr("data-original-title")||("function"==typeof o.title?o.title.call(t[0]):o.title)},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var o=e(t.currentTarget)[this.type](this._options).data(this.type);o[o.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var o=e.fn.tooltip;e.fn.tooltip=function(o){return this.each(function(){var n=e(this),i=n.data("tooltip"),r="object"==typeof o&&o;i||n.data("tooltip",i=new t(this,r)),"string"==typeof o&&i[o]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover",title:"",delay:0,html:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=o,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),o=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](o),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,o=this.options;return e=t.attr("data-content")||("function"==typeof o.content?o.content.call(t[0]):o.content)},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var o=e.fn.popover;e.fn.popover=function(o){return this.each(function(){var n=e(this),i=n.data("popover"),r="object"==typeof o&&o;i||n.data("popover",i=new t(this,r)),"string"==typeof o&&i[o]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'

'}),e.fn.popover.noConflict=function(){return e.fn.popover=o,this}}(window.jQuery),!function(e){"use strict";function t(t,o){var n,i=e.proxy(this.process,this),r=e(t).is("body")?e(window):e(t);this.options=e.extend({},e.fn.scrollspy.defaults,o),this.$scrollElement=r.on("scroll.scroll-spy.data-api",i),this.selector=(this.options.target||(n=e(t).attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t,o=this;this.offsets=e([]),this.targets=e([]),t=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),i=/^#\w/.test(n)&&e(n);return i&&i.length&&[[i.position().top+o.$scrollElement.scrollTop(),n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){o.offsets.push(this[0]),o.targets.push(this[1])})},process:function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,o=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=o-this.$scrollElement.height(),i=this.offsets,r=this.targets,s=this.activeTarget;if(t>=n)return s!=(e=r.last()[0])&&this.activate(e);for(e=i.length;e--;)s!=r[e]&&t>=i[e]&&(!i[e+1]||t<=i[e+1])&&this.activate(r[e])},activate:function(t){var o,n;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',o=e(n).parent("li").addClass("active"),o.parent(".dropdown-menu").length&&(o=o.closest("li.dropdown").addClass("active")),o.trigger("activate")}};var o=e.fn.scrollspy;e.fn.scrollspy=function(o){return this.each(function(){var n=e(this),i=n.data("scrollspy"),r="object"==typeof o&&o;i||n.data("scrollspy",i=new t(this,r)),"string"==typeof o&&i[o]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=o,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t,o,n,i=this.element,r=i.closest("ul:not(.dropdown-menu)"),s=i.attr("data-target");s||(s=i.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,"")),i.parent("li").hasClass("active")||(t=r.find(".active:last a")[0],n=e.Event("show",{relatedTarget:t}),i.trigger(n),n.isDefaultPrevented()||(o=e(s),this.activate(i.parent("li"),r),this.activate(o,o.parent(),function(){i.trigger({type:"shown",relatedTarget:t})})))},activate:function(t,o,n){function i(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),n&&n()}var r=o.find("> .active"),s=n&&e.support.transition&&r.hasClass("fade");s?r.one(e.support.transition.end,i):i(),r.removeClass("in")}};var o=e.fn.tab;e.fn.tab=function(o){return this.each(function(){var n=e(this),i=n.data("tab");i||n.data("tab",i=new t(this)),"string"==typeof o&&i[o]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=o,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,o){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,o),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var t;return this.query=this.$element.val(),!this.query||this.query.length"+t+""})},render:function(t){var o=this;return t=e(t).map(function(t,n){return t=e(o.options.item).attr("data-value",n),t.find("a").html(o.highlighter(n)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(){var t=this.$menu.find(".active").removeClass("active"),o=t.next();o.length||(o=e(this.$menu.find("li")[0])),o.addClass("active")},prev:function(){var e=this.$menu.find(".active").removeClass("active"),t=e.prev();t.length||(t=this.$menu.find("li").last()),t.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t="function"==typeof this.$element[e]),t},move:function(e){if(this.shown){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()}},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){this.suppressKeyPressRepeat||this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(){var e=this;setTimeout(function(){e.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}};var o=e.fn.typeahead;e.fn.typeahead=function(o){return this.each(function(){var n=e(this),i=n.data("typeahead"),r="object"==typeof o&&o;i||n.data("typeahead",i=new t(this,r)),"string"==typeof o&&i[o]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'',item:'
  • ',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=o,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var o=e(this);o.data("typeahead")||(t.preventDefault(),o.typeahead(o.data()))})}(window.jQuery),!function(e){"use strict";var t=function(t,o){this.options=e.extend({},e.fn.affix.defaults,o),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t,o=e(document).height(),n=this.$window.scrollTop(),i=this.$element.offset(),r=this.options.offset,s=r.bottom,l=r.top,a="affix affix-top affix-bottom";"object"!=typeof r&&(s=l=r),"function"==typeof l&&(l=r.top()),"function"==typeof s&&(s=r.bottom()),t=null!=this.unpin&&n+this.unpin<=i.top?!1:null!=s&&i.top+this.$element.height()>=o-s?"bottom":null!=l&&l>=n?"top":!1,this.affixed!==t&&(this.affixed=t,this.unpin="bottom"==t?i.top-n:null,this.$element.removeClass(a).addClass("affix"+(t?"-"+t:"")))}};var o=e.fn.affix;e.fn.affix=function(o){return this.each(function(){var n=e(this),i=n.data("affix"),r="object"==typeof o&&o;i||n.data("affix",i=new t(this,r)),"string"==typeof o&&i[o]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=o,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),o=t.data();o.offset=o.offset||{},o.offsetBottom&&(o.offset.bottom=o.offsetBottom),o.offsetTop&&(o.offset.top=o.offsetTop),t.affix(o)})})}(window.jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e,t){var o=0,n=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var o,n=0;null!=(o=t[n]);n++)try{e(o).triggerHandler("remove")}catch(r){}i(t)},e.widget=function(t,o,n){var i,r,s,l,a={},c=t.split(".")[0];t=t.split(".")[1],i=c+"-"+t,n||(n=o,o=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[c]=e[c]||{},r=e[c][t],s=e[c][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new s(e,t)},e.extend(s,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),l=new o,l.options=e.widget.extend({},l.options),e.each(n,function(t,n){return e.isFunction(n)?(a[t]=function(){var e=function(){return o.prototype[t].apply(this,arguments)},i=function(e){return o.prototype[t].apply(this,e)};return function(){var t,o=this._super,r=this._superApply;return this._super=e,this._superApply=i,t=n.apply(this,arguments),this._super=o,this._superApply=r,t}}(),void 0):(a[t]=n,void 0)}),s.prototype=e.widget.extend(l,{widgetEventPrefix:r?l.widgetEventPrefix:t},a,{constructor:s,namespace:c,widgetName:t,widgetFullName:i}),r?(e.each(r._childConstructors,function(t,o){var n=o.prototype;e.widget(n.namespace+"."+n.widgetName,s,o._proto)}),delete r._childConstructors):o._childConstructors.push(s),e.widget.bridge(t,s)},e.widget.extend=function(o){for(var i,r,s=n.call(arguments,1),l=0,a=s.length;a>l;l++)for(i in s[l])r=s[l][i],s[l].hasOwnProperty(i)&&r!==t&&(o[i]=e.isPlainObject(r)?e.isPlainObject(o[i])?e.widget.extend({},o[i],r):e.widget.extend({},r):r);return o},e.widget.bridge=function(o,i){var r=i.prototype.widgetFullName||o;e.fn[o]=function(s){var l="string"==typeof s,a=n.call(arguments,1),c=this;return s=!l&&a.length?e.widget.extend.apply(null,[s].concat(a)):s,l?this.each(function(){var n,i=e.data(this,r);return i?e.isFunction(i[s])&&"_"!==s.charAt(0)?(n=i[s].apply(i,a),n!==i&&n!==t?(c=n&&n.jquery?c.pushStack(n.get()):n,!1):void 0):e.error("no such method '"+s+"' for "+o+" widget instance"):e.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+s+"'")}):this.each(function(){var t=e.data(this,r);t?t.option(s||{})._init():e.data(this,r,new i(s,this))}),c}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
    ",options:{disabled:!1,create:null},_createWidget:function(t,n){n=e(n||this.defaultElement||this)[0],this.element=e(n),this.uuid=o++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),n!==this&&(e.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===n&&this.destroy()}}),this.document=e(n.style?n.ownerDocument:n.document||n),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(o,n){var i,r,s,l=o;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof o)if(l={},i=o.split("."),o=i.shift(),i.length){for(r=l[o]=e.widget.extend({},this.options[o]),s=0;s'),n.attr("accept-charset",o.formAcceptCharset),r=/\?/.test(o.url)?"&":"?","DELETE"===o.type?(o.url=o.url+r+"_method=DELETE",o.type="POST"):"PUT"===o.type?(o.url=o.url+r+"_method=PUT",o.type="POST"):"PATCH"===o.type&&(o.url=o.url+r+"_method=PATCH",o.type="POST"),t+=1,i=e('').bind("load",function(){var t,r=e.isArray(o.paramName)?o.paramName:[o.paramName];i.unbind("load").bind("load",function(){var t;try{if(t=i.contents(),!t.length||!t[0].firstChild)throw new Error}catch(o){t=void 0}l(200,"success",{iframe:t}),e('').appendTo(n),window.setTimeout(function(){n.remove()},0)}),n.prop("target",i.prop("name")).prop("action",o.url).prop("method",o.type),o.formData&&e.each(o.formData,function(t,o){e('').prop("name",o.name).val(o.value).appendTo(n)}),o.fileInput&&o.fileInput.length&&"POST"===o.type&&(t=o.fileInput.clone(),o.fileInput.after(function(e){return t[e]}),o.paramName&&o.fileInput.each(function(t){e(this).prop("name",r[t]||o.paramName)}),n.append(o.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data")),n.submit(),t&&t.length&&o.fileInput.each(function(o,n){var i=e(t[o]);e(n).prop("name",i.prop("name")),i.replaceWith(n)})}),n.append(i).appendTo(document.body)},abort:function(){i&&i.unbind("load").prop("src","javascript".concat(":false;")),n&&n.remove()}}}}),e.ajaxSetup({converters:{"iframe text":function(t){return t&&e(t[0].body).text()},"iframe json":function(t){return t&&e.parseJSON(e(t[0].body).text())},"iframe html":function(t){return t&&e(t[0].body).html()},"iframe xml":function(t){var o=t&&t[0];return o&&e.isXMLDoc(o)?o:e.parseXML(o.XMLDocument&&o.XMLDocument.xml||e(o.body).html())},"iframe script":function(t){return t&&e.globalEval(e(t[0].body).text())}}})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery.ui.widget"],e):e(window.jQuery)}(function(e){"use strict";e.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||e('').prop("disabled")),e.support.xhrFileUpload=!(!window.XMLHttpRequestUpload||!window.FileReader),e.support.xhrFormDataFileUpload=!!window.FormData,e.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),e.widget("blueimp.fileupload",{options:{dropZone:e(document),pasteZone:e(document),fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(t,o){return t=this.messages[t]||t.toString(),o&&e.each(o,function(e,o){t=t.replace("{"+e+"}",o)}),t},formData:function(e){return e.serializeArray()},add:function(t,o){(o.autoUpload||o.autoUpload!==!1&&e(this).fileupload("option","autoUpload"))&&o.process().done(function(){o.submit()})},processData:!1,contentType:!1,cache:!1},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:e.support.blobSlice&&function(){var e=this.slice||this.webkitSlice||this.mozSlice;return e.apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(e,t,o){var n=e-this.timestamp;return(!this.bitrate||!o||n>o)&&(this.bitrate=(t-this.loaded)*(1e3/n)*8,this.loaded=t,this.timestamp=e),this.bitrate}},_isXHRUpload:function(t){return!t.forceIframeTransport&&(!t.multipart&&e.support.xhrFileUpload||e.support.xhrFormDataFileUpload)},_getFormData:function(t){var o;return"function"==typeof t.formData?t.formData(t.form):e.isArray(t.formData)?t.formData:"object"===e.type(t.formData)?(o=[],e.each(t.formData,function(e,t){o.push({name:e,value:t})}),o):[]},_getTotal:function(t){var o=0;return e.each(t,function(e,t){o+=t.size||1}),o},_initProgressObject:function(t){var o={loaded:0,total:0,bitrate:0};t._progress?e.extend(t._progress,o):t._progress=o},_initResponseObject:function(e){var t;if(e._response)for(t in e._response)e._response.hasOwnProperty(t)&&delete e._response[t];else e._response={}},_onProgress:function(e,t){if(e.lengthComputable){var o,n=Date.now?Date.now():(new Date).getTime();if(t._time&&t.progressInterval&&n-t._time").prop("href",t.url).prop("host");t.dataType="iframe "+(t.dataType||""),t.formData=this._getFormData(t),t.redirect&&o&&o!==location.host&&t.formData.push({name:t.redirectParamName||"redirect",value:t.redirect})},_initDataSettings:function(e){this._isXHRUpload(e)?(this._chunkedUpload(e,!0)||(e.data||this._initXHRData(e),this._initProgressListener(e)),e.postMessage&&(e.dataType="postmessage "+(e.dataType||""))):this._initIframeSettings(e)},_getParamName:function(t){var o=e(t.fileInput),n=t.paramName;return n?e.isArray(n)||(n=[n]):(n=[],o.each(function(){for(var t=e(this),o=t.prop("name")||"files[]",i=(t.prop("files")||[1]).length;i;)n.push(o),i-=1}),n.length||(n=[o.prop("name")||"files[]"])),n},_initFormSettings:function(t){t.form&&t.form.length||(t.form=e(t.fileInput.prop("form")),t.form.length||(t.form=e(this.options.fileInput.prop("form")))),t.paramName=this._getParamName(t),t.url||(t.url=t.form.prop("action")||location.href),t.type=(t.type||"string"===e.type(t.form.prop("method"))&&t.form.prop("method")||"").toUpperCase(),"POST"!==t.type&&"PUT"!==t.type&&"PATCH"!==t.type&&(t.type="POST"),t.formAcceptCharset||(t.formAcceptCharset=t.form.attr("accept-charset"))},_getAJAXSettings:function(t){var o=e.extend({},this.options,t);return this._initFormSettings(o),this._initDataSettings(o),o},_getDeferredState:function(e){return e.state?e.state():e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"},_enhancePromise:function(e){return e.success=e.done,e.error=e.fail,e.complete=e.always,e},_getXHRPromise:function(t,o,n){var i=e.Deferred(),r=i.promise();return o=o||this.options.context||r,t===!0?i.resolveWith(o,n):t===!1&&i.rejectWith(o,n),r.abort=i.promise,this._enhancePromise(r)},_addConvenienceMethods:function(t,o){var n=this,i=function(t){return e.Deferred().resolveWith(n,[t]).promise()};o.process=function(e,t){return(e||t)&&(o._processQueue=this._processQueue=(this._processQueue||i(this)).pipe(e,t)),this._processQueue||i(this)},o.submit=function(){return"pending"!==this.state()&&(o.jqXHR=this.jqXHR=n._trigger("submit",t,this)!==!1&&n._onSend(t,this)),this.jqXHR||n._getXHRPromise()},o.abort=function(){return this.jqXHR?this.jqXHR.abort():n._getXHRPromise()},o.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},o.progress=function(){return this._progress},o.response=function(){return this._response}},_getUploadedBytes:function(e){var t=e.getResponseHeader("Range"),o=t&&t.split("-"),n=o&&o.length>1&&parseInt(o[1],10);return n&&n+1},_chunkedUpload:function(t,o){t.uploadedBytes=t.uploadedBytes||0;var n,i,r=this,s=t.files[0],l=s.size,a=t.uploadedBytes,c=t.maxChunkSize||l,g=this._blobSlice,u=e.Deferred(),h=u.promise();return this._isXHRUpload(t)&&g&&(a||l>c)&&!t.data?o?!0:a>=l?(s.error=t.i18n("uploadedBytes"),this._getXHRPromise(!1,t.context,[null,"error",s.error])):(i=function(){var o=e.extend({},t),h=o._progress.loaded;o.blob=g.call(s,a,a+c,s.type),o.chunkSize=o.blob.size,o.contentRange="bytes "+a+"-"+(a+o.chunkSize-1)+"/"+l,r._initXHRData(o),r._initProgressListener(o),n=(r._trigger("chunksend",null,o)!==!1&&e.ajax(o)||r._getXHRPromise(!1,o.context)).done(function(n,s,c){a=r._getUploadedBytes(c)||a+o.chunkSize,h+o.chunkSize-o._progress.loaded&&r._onProgress(e.Event("progress",{lengthComputable:!0,loaded:a-o.uploadedBytes,total:a-o.uploadedBytes}),o),t.uploadedBytes=o.uploadedBytes=a,o.result=n,o.textStatus=s,o.jqXHR=c,r._trigger("chunkdone",null,o),r._trigger("chunkalways",null,o),l>a?i():u.resolveWith(o.context,[n,s,c])}).fail(function(e,t,n){o.jqXHR=e,o.textStatus=t,o.errorThrown=n,r._trigger("chunkfail",null,o),r._trigger("chunkalways",null,o),u.rejectWith(o.context,[e,t,n])})},this._enhancePromise(h),h.abort=function(){return n.abort() },i(),h):!1},_beforeSend:function(e,t){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(t),this._initProgressObject(t),t._progress.loaded=t.loaded=t.uploadedBytes||0,t._progress.total=t.total=this._getTotal(t.files)||1,t._progress.bitrate=t.bitrate=0,this._active+=1,this._progress.loaded+=t.loaded,this._progress.total+=t.total},_onDone:function(t,o,n,i){var r=i._progress.total,s=i._response;i._progress.loadedl._sending)for(var n=l._slots.shift();n;){if("pending"===l._getDeferredState(n)){n.resolve();break}n=l._slots.shift()}0===l._active&&l._trigger("stop")})};return this._beforeSend(t,a),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(r=e.Deferred(),this._slots.push(r),s=r.pipe(c)):(this._sequence=this._sequence.pipe(c,c),s=this._sequence),s.abort=function(){return i=[void 0,"abort","abort"],n?n.abort():(r&&r.rejectWith(a.context,i),c())},this._enhancePromise(s)):c()},_onAdd:function(t,o){var n,i,r,s,l=this,a=!0,c=e.extend({},this.options,o),g=c.limitMultiFileUploads,u=this._getParamName(c);if((c.singleFileUploads||g)&&this._isXHRUpload(c))if(!c.singleFileUploads&&g)for(r=[],n=[],s=0;s").append(o)[0].reset(),t.after(o).detach(),e.cleanData(t.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(e,n){return n===t[0]?o[0]:n}),t[0]===this.element[0]&&(this.element=o)},_handleFileTreeEntry:function(t,o){var n,i=this,r=e.Deferred(),s=function(e){e&&!e.entry&&(e.entry=t),r.resolve([e])};return o=o||"",t.isFile?t._file?(t._file.relativePath=o,r.resolve(t._file)):t.file(function(e){e.relativePath=o,r.resolve(e)},s):t.isDirectory?(n=t.createReader(),n.readEntries(function(e){i._handleFileTreeEntries(e,o+t.name+"/").done(function(e){r.resolve(e)}).fail(s)},s)):r.resolve([]),r.promise()},_handleFileTreeEntries:function(t,o){var n=this;return e.when.apply(e,e.map(t,function(e){return n._handleFileTreeEntry(e,o)})).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(t){t=t||{};var o=t.items;return o&&o.length&&(o[0].webkitGetAsEntry||o[0].getAsEntry)?this._handleFileTreeEntries(e.map(o,function(e){var t;return e.webkitGetAsEntry?(t=e.webkitGetAsEntry(),t&&(t._file=e.getAsFile()),t):e.getAsEntry()})):e.Deferred().resolve(e.makeArray(t.files)).promise()},_getSingleFileInputFiles:function(t){t=e(t);var o,n,i=t.prop("webkitEntries")||t.prop("entries");if(i&&i.length)return this._handleFileTreeEntries(i);if(o=e.makeArray(t.prop("files")),o.length)void 0===o[0].name&&o[0].fileName&&e.each(o,function(e,t){t.name=t.fileName,t.size=t.fileSize});else{if(n=t.prop("value"),!n)return e.Deferred().resolve([]).promise();o=[{name:n.replace(/^.*\\/,"")}]}return e.Deferred().resolve(o).promise()},_getFileInputFiles:function(t){return t instanceof e&&1!==t.length?e.when.apply(e,e.map(t,this._getSingleFileInputFiles)).pipe(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(t)},_onChange:function(t){var o=this,n={fileInput:e(t.target),form:e(t.target.form)};this._getFileInputFiles(n.fileInput).always(function(e){n.files=e,o.options.replaceFileInput&&o._replaceFileInput(n.fileInput),o._trigger("change",t,n)!==!1&&o._onAdd(t,n)})},_onPaste:function(t){var o=t.originalEvent&&t.originalEvent.clipboardData&&t.originalEvent.clipboardData.items,n={files:[]};o&&o.length&&(e.each(o,function(e,t){var o=t.getAsFile&&t.getAsFile();o&&n.files.push(o)}),this._trigger("paste",t,n)!==!1&&this._onAdd(t,n))},_onDrop:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var t=this,o=e.dataTransfer,n={};o&&o.files&&o.files.length&&(e.preventDefault(),this._getDroppedFiles(o).always(function(o){n.files=o,t._trigger("drop",e,n)!==!1&&t._onAdd(e,n)}))},_onDragOver:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var o=t.dataTransfer,n={dropEffect:"copy",preventDefault:!0};o&&-1!==e.inArray("Files",o.types)&&this._trigger("dragover",t,n)!==!1&&(o.dropEffect=n.dropEffect,n.preventDefault&&t.preventDefault())},_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop}),this._on(this.options.pasteZone,{paste:this._onPaste})),e.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_setOption:function(t,o){var n=-1!==e.inArray(t,this._specialOptions);n&&this._destroyEventHandlers(),this._super(t,o),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var t=this.options;void 0===t.fileInput?t.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):t.fileInput instanceof e||(t.fileInput=e(t.fileInput)),t.dropZone instanceof e||(t.dropZone=e(t.dropZone)),t.pasteZone instanceof e||(t.pasteZone=e(t.pasteZone))},_getRegExp:function(e){var t=e.split("/"),o=t.pop();return t.shift(),new RegExp(t.join("/"),o)},_isRegExpOption:function(t,o){return"url"!==t&&"string"===e.type(o)&&/^\/.*\/[igm]{0,3}$/.test(o)},_initDataAttributes:function(){var t=this,o=this.options;e.each(e(this.element[0].cloneNode(!1)).data(),function(e,n){t._isRegExpOption(e,n)&&(n=t._getRegExp(n)),o[e]=n})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(t){var o=this;t&&!this.options.disabled&&(t.fileInput&&!t.files?this._getFileInputFiles(t.fileInput).always(function(e){t.files=e,o._onAdd(null,t)}):(t.files=e.makeArray(t.files),this._onAdd(null,t)))},send:function(t){if(t&&!this.options.disabled){if(t.fileInput&&!t.files){var o,n,i=this,r=e.Deferred(),s=r.promise();return s.abort=function(){return n=!0,o?o.abort():(r.reject(null,"abort","abort"),s)},this._getFileInputFiles(t.fileInput).always(function(e){if(!n){if(!e.length)return r.reject(),void 0;t.files=e,o=i._onSend(null,t).then(function(e,t,o){r.resolve(e,t,o)},function(e,t,o){r.reject(e,t,o)})}}),this._enhancePromise(s)}if(t.files=e.makeArray(t.files),t.files.length)return this._onSend(null,t)}return this._getXHRPromise(!1,t&&t.context)}})});var COMPILED=!0,goog=goog||{};goog.global=this,goog.isDef=function(e){return void 0!==e},goog.exportPath_=function(e,t,o){e=e.split("."),o=o||goog.global,e[0]in o||!o.execScript||o.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)!e.length&&goog.isDef(t)?o[n]=t:o=o[n]?o[n]:o[n]={}},goog.define=function(e,t){var o=t;COMPILED||(goog.global.CLOSURE_UNCOMPILED_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES,e)?o=goog.global.CLOSURE_UNCOMPILED_DEFINES[e]:goog.global.CLOSURE_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES,e)&&(o=goog.global.CLOSURE_DEFINES[e])),goog.exportPath_(e,o)},goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG,goog.provide=function(e){if(!COMPILED&&goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){if(!COMPILED){delete goog.implicitNamespaces_[e];for(var o=e;(o=o.substring(0,o.lastIndexOf(".")))&&!goog.getObjectByName(o);)goog.implicitNamespaces_[o]=!0}goog.exportPath_(e,t)},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||-1==e.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");if(goog.moduleLoaderState_.moduleName=e,!COMPILED){if(goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');delete goog.implicitNamespaces_[e]}},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){return COMPILED?void 0:goog.isProvided_(e)?e in goog.loadedModules_?goog.loadedModules_[e]:goog.getObjectByName(e):null},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return null!=goog.moduleLoaderState_},goog.module.declareTestMethods=function(){if(!goog.isInModuleLoader_())throw Error("goog.module.declareTestMethods must be called from within a goog.module");goog.moduleLoaderState_.declareTestMethods=!0},goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(){},COMPILED||(goog.isProvided_=function(e){return e in goog.loadedModules_||!goog.implicitNamespaces_[e]&&goog.isDefAndNotNull(goog.getObjectByName(e))},goog.implicitNamespaces_={"goog.module":!0}),goog.getObjectByName=function(e,t){for(var o,n=e.split("."),i=t||goog.global;o=n.shift();){if(!goog.isDefAndNotNull(i[o]))return null;i=i[o]}return i},goog.globalize=function(e,t){var o,n=t||goog.global;for(o in e)n[o]=e[o]},goog.addDependency=function(e,t,o,n){if(goog.DEPENDENCIES_ENABLED){var i;e=e.replace(/\\/g,"/");for(var r=goog.dependencies_,s=0;i=t[s];s++)r.nameToPath[i]=e,r.pathIsModule[e]=!!n;for(n=0;t=o[n];n++)e in r.requires||(r.requires[e]={}),r.requires[e][t]=!0}},goog.ENABLE_DEBUG_LOADER=!0,goog.logToConsole_=function(e){goog.global.console&&goog.global.console.error(e)},goog.require=function(e){if(!COMPILED){if(goog.ENABLE_DEBUG_LOADER&&goog.IS_OLD_IE_&&goog.maybeProcessDeferredDep_(e),goog.isProvided_(e))return goog.isInModuleLoader_()?goog.module.getInternal_(e):null;if(goog.ENABLE_DEBUG_LOADER){var t=goog.getPathFromDeps_(e);if(t)return goog.included_[t]=!0,goog.writeScripts_(),null}throw e="goog.require could not find: "+e,goog.logToConsole_(e),Error(e)}},goog.basePath="",goog.nullFunction=function(){},goog.identityFunction=function(e){return e},goog.abstractMethod=function(){throw Error("unimplemented abstract method")},goog.addSingletonGetter=function(e){e.getInstance=function(){return e.instance_?e.instance_:(goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=e),e.instance_=new e)}},goog.instantiatedSingletons_=[],goog.LOAD_MODULE_USING_EVAL=!0,goog.SEAL_MODULE_EXPORTS=goog.DEBUG,goog.loadedModules_={},goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER,goog.DEPENDENCIES_ENABLED&&(goog.included_={},goog.dependencies_={pathIsModule:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var e=goog.global.document;return"undefined"!=typeof e&&"write"in e},goog.findBasePath_=function(){if(goog.global.CLOSURE_BASE_PATH)goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var e=goog.global.document.getElementsByTagName("script"),t=e.length-1;t>=0;--t){var o=e[t].src,n=o.lastIndexOf("?"),n=-1==n?o.length:n;if("base.js"==o.substr(n-7,7)){goog.basePath=o.substr(0,n-7);break}}},goog.importScript_=function(e,t){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(e,t)&&(goog.dependencies_.written[e]=!0)},goog.IS_OLD_IE_=goog.global.document&&goog.global.document.all&&!goog.global.atob,goog.importModule_=function(e){goog.importScript_("",'goog.retrieveAndExecModule_("'+e+'");')&&(goog.dependencies_.written[e]=!0)},goog.queuedModules_=[],goog.wrapModule_=function(e,t){return goog.LOAD_MODULE_USING_EVAL&&goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(t+"\n//# sourceURL="+e+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+t+"\n;return exports});\n//# sourceURL="+e+"\n"},goog.loadQueuedModules_=function(){var e=goog.queuedModules_.length;if(e>0){var t=goog.queuedModules_;goog.queuedModules_=[];for(var o=0;e>o;o++)goog.maybeProcessDeferredPath_(t[o])}},goog.maybeProcessDeferredDep_=function(e){goog.isDeferredModule_(e)&&goog.allDepsAreAvailable_(e)&&(e=goog.getPathFromDeps_(e),goog.maybeProcessDeferredPath_(goog.basePath+e))},goog.isDeferredModule_=function(e){return(e=goog.getPathFromDeps_(e))&&goog.dependencies_.pathIsModule[e]?goog.basePath+e in goog.dependencies_.deferred:!1},goog.allDepsAreAvailable_=function(e){if((e=goog.getPathFromDeps_(e))&&e in goog.dependencies_.requires)for(var t in goog.dependencies_.requires[e])if(!goog.isProvided_(t)&&!goog.isDeferredModule_(t))return!1;return!0},goog.maybeProcessDeferredPath_=function(e){if(e in goog.dependencies_.deferred){var t=goog.dependencies_.deferred[e];delete goog.dependencies_.deferred[e],goog.globalEval(t)}},goog.loadModule=function(e){var t=goog.moduleLoaderState_;try{goog.moduleLoaderState_={moduleName:void 0,declareTestMethods:!1};var o;if(goog.isFunction(e))o=e.call(goog.global,{});else{if(!goog.isString(e))throw Error("Invalid module definition");o=goog.loadModuleFromSource_.call(goog.global,e)}var n=goog.moduleLoaderState_.moduleName;if(!goog.isString(n)||!n)throw Error('Invalid module name "'+n+'"');if(goog.moduleLoaderState_.declareLegacyNamespace?goog.constructNamespace_(n,o):goog.SEAL_MODULE_EXPORTS&&Object.seal&&Object.seal(o),goog.loadedModules_[n]=o,goog.moduleLoaderState_.declareTestMethods)for(var i in o)(0===i.indexOf("test",0)||"tearDown"==i||"setUp"==i||"setUpPage"==i||"tearDownPage"==i)&&(goog.global[i]=o[i])}finally{goog.moduleLoaderState_=t}},goog.loadModuleFromSource_=function(a){return eval(a),{}},goog.writeScriptTag_=function(e,t){if(goog.inHtmlDocument_()){var o=goog.global.document;if("complete"==o.readyState){if(/\bdeps.js$/.test(e))return!1;throw Error('Cannot write "'+e+'" after document load')}var n=goog.IS_OLD_IE_;return void 0===t?n?(n=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ",o.write('")):o.write(''):o.write('"),!0}return!1},goog.lastNonModuleScriptIndex_=0,goog.onScriptLoad_=function(e,t){return"complete"==e.readyState&&goog.lastNonModuleScriptIndex_==t&&goog.loadQueuedModules_(),!0},goog.writeScripts_=function(){function e(t){if(!(t in i.written)){if(!(t in i.visited)&&(i.visited[t]=!0,t in i.requires))for(var r in i.requires[t])if(!goog.isProvided_(r)){if(!(r in i.nameToPath))throw Error("Undefined nameToPath for "+r);e(i.nameToPath[r])}t in n||(n[t]=!0,o.push(t))}}var t,o=[],n={},i=goog.dependencies_;for(t in goog.included_)i.written[t]||e(t);for(var r=0;r>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if("object"==t||"array"==t){if(e.clone)return e.clone();var o,t="array"==t?[]:{};for(o in e)t[o]=goog.cloneObject(e[o]);return t}return e},goog.bindNative_=function(e){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t){if(!e)throw Error();if(2=0&&e.indexOf(t,o)==o},goog.string.caseInsensitiveStartsWith=function(e,t){return 0==goog.string.caseInsensitiveCompare(t,e.substr(0,t.length))},goog.string.caseInsensitiveEndsWith=function(e,t){return 0==goog.string.caseInsensitiveCompare(t,e.substr(e.length-t.length,t.length))},goog.string.caseInsensitiveEquals=function(e,t){return e.toLowerCase()==t.toLowerCase()},goog.string.subs=function(e){for(var t=e.split("%s"),o="",n=Array.prototype.slice.call(arguments,1);n.length&&1=" "&&"~">=e||e>="€"&&"�">=e},goog.string.stripNewlines=function(e){return e.replace(/(\r\n|\r|\n)+/g," ")},goog.string.canonicalizeNewlines=function(e){return e.replace(/(\r\n|\r|\n)/g,"\n")},goog.string.normalizeWhitespace=function(e){return e.replace(/\xa0|\s/g," ")},goog.string.normalizeSpaces=function(e){return e.replace(/\xa0|[ \t]+/g," ")},goog.string.collapseBreakingSpaces=function(e){return e.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},goog.string.trim=goog.TRUSTED_SITE&&String.prototype.trim?function(e){return e.trim()}:function(e){return e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},goog.string.trimLeft=function(e){return e.replace(/^[\s\xa0]+/,"")},goog.string.trimRight=function(e){return e.replace(/[\s\xa0]+$/,"")},goog.string.caseInsensitiveCompare=function(e,t){var o=String(e).toLowerCase(),n=String(t).toLowerCase();return n>o?-1:o==n?0:1},goog.string.numerateCompareRegExp_=/(\.\d+)|(\d+)|(\D+)/g,goog.string.numerateCompare=function(e,t){if(e==t)return 0;if(!e)return-1;if(!t)return 1;for(var o=e.toLowerCase().match(goog.string.numerateCompareRegExp_),n=t.toLowerCase().match(goog.string.numerateCompareRegExp_),i=Math.min(o.length,n.length),r=0;i>r;r++){var s=o[r],l=n[r];if(s!=l)return o=parseInt(s,10),!isNaN(o)&&(n=parseInt(l,10),!isNaN(n)&&o-n)?o-n:l>s?-1:1}return o.length!=n.length?o.length-n.length:t>e?-1:1},goog.string.urlEncode=function(e){return encodeURIComponent(String(e))},goog.string.urlDecode=function(e){return decodeURIComponent(e.replace(/\+/g," "))},goog.string.newLineToBr=function(e,t){return e.replace(/(\r\n|\r|\n)/g,t?"
    ":"
    ")},goog.string.htmlEscape=function(e,t){if(t)e=e.replace(goog.string.AMP_RE_,"&").replace(goog.string.LT_RE_,"<").replace(goog.string.GT_RE_,">").replace(goog.string.QUOT_RE_,""").replace(goog.string.SINGLE_QUOTE_RE_,"'").replace(goog.string.NULL_RE_,"�"),goog.string.DETECT_DOUBLE_ESCAPING&&(e=e.replace(goog.string.E_RE_,"e"));else{if(!goog.string.ALL_RE_.test(e))return e;-1!=e.indexOf("&")&&(e=e.replace(goog.string.AMP_RE_,"&")),-1!=e.indexOf("<")&&(e=e.replace(goog.string.LT_RE_,"<")),-1!=e.indexOf(">")&&(e=e.replace(goog.string.GT_RE_,">")),-1!=e.indexOf('"')&&(e=e.replace(goog.string.QUOT_RE_,""")),-1!=e.indexOf("'")&&(e=e.replace(goog.string.SINGLE_QUOTE_RE_,"'")),-1!=e.indexOf("\x00")&&(e=e.replace(goog.string.NULL_RE_,"�")),goog.string.DETECT_DOUBLE_ESCAPING&&-1!=e.indexOf("e")&&(e=e.replace(goog.string.E_RE_,"e"))}return e},goog.string.AMP_RE_=/&/g,goog.string.LT_RE_=//g,goog.string.QUOT_RE_=/"/g,goog.string.SINGLE_QUOTE_RE_=/'/g,goog.string.NULL_RE_=/\x00/g,goog.string.E_RE_=/e/g,goog.string.ALL_RE_=goog.string.DETECT_DOUBLE_ESCAPING?/[\x00&<>"'e]/:/[\x00&<>"']/,goog.string.unescapeEntities=function(e){return goog.string.contains(e,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(e):goog.string.unescapePureXmlEntities_(e):e},goog.string.unescapeEntitiesWithDocument=function(e,t){return goog.string.contains(e,"&")?goog.string.unescapeEntitiesUsingDom_(e,t):e},goog.string.unescapeEntitiesUsingDom_=function(e,t){var o,n={"&":"&","<":"<",">":">",""":'"'};return o=t?t.createElement("div"):goog.global.document.createElement("div"),e.replace(goog.string.HTML_ENTITY_PATTERN_,function(e,t){var i=n[e];if(i)return i;if("#"==t.charAt(0)){var r=Number("0"+t.substr(1));isNaN(r)||(i=String.fromCharCode(r))}return i||(o.innerHTML=e+" ",i=o.firstChild.nodeValue.slice(0,-1)),n[e]=i})},goog.string.unescapePureXmlEntities_=function(e){return e.replace(/&([^;]+);/g,function(e,t){switch(t){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return'"';default:if("#"==t.charAt(0)){var o=Number("0"+t.substr(1));if(!isNaN(o))return String.fromCharCode(o)}return e}})},goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g,goog.string.whitespaceEscape=function(e,t){return goog.string.newLineToBr(e.replace(/ /g,"  "),t)},goog.string.preserveSpaces=function(e){return e.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)},goog.string.stripQuotes=function(e,t){for(var o=t.length,n=0;o>n;n++){var i=1==o?t:t.charAt(n);if(e.charAt(0)==i&&e.charAt(e.length-1)==i)return e.substring(1,e.length-1)}return e},goog.string.truncate=function(e,t,o){return o&&(e=goog.string.unescapeEntities(e)),e.length>t&&(e=e.substring(0,t-3)+"..."),o&&(e=goog.string.htmlEscape(e)),e},goog.string.truncateMiddle=function(e,t,o,n){if(o&&(e=goog.string.unescapeEntities(e)),n&&e.length>t){n>t&&(n=t);var i=e.length-n;e=e.substring(0,t-n)+"..."+e.substring(i)}else e.length>t&&(n=Math.floor(t/2),i=e.length-n,e=e.substring(0,n+t%2)+"..."+e.substring(i));return o&&(e=goog.string.htmlEscape(e)),e},goog.string.specialEscapeChars_={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"," ":"\\x0B",'"':'\\"',"\\":"\\\\"},goog.string.jsEscapeCache_={"'":"\\'"},goog.string.quote=function(e){if(e=String(e),e.quote)return e.quote();for(var t=['"'],o=0;o31&&127>i?n:goog.string.escapeChar(n))}return t.push('"'),t.join("")},goog.string.escapeString=function(e){for(var t=[],o=0;o31&&127>o?t=e:(256>o?(t="\\x",(16>o||o>256)&&(t+="0")):(t="\\u",4096>o&&(t+="0")),t+=o.toString(16).toUpperCase()),goog.string.jsEscapeCache_[e]=t},goog.string.contains=function(e,t){return-1!=e.indexOf(t)},goog.string.caseInsensitiveContains=function(e,t){return goog.string.contains(e.toLowerCase(),t.toLowerCase())},goog.string.countOf=function(e,t){return e&&t?e.split(t).length-1:0},goog.string.removeAt=function(e,t,o){var n=e;return t>=0&&t0&&(n=e.substr(0,t)+e.substr(t+o,e.length-t-o)),n},goog.string.remove=function(e,t){var o=new RegExp(goog.string.regExpEscape(t),"");return e.replace(o,"")},goog.string.removeAll=function(e,t){var o=new RegExp(goog.string.regExpEscape(t),"g"); return e.replace(o,"")},goog.string.regExpEscape=function(e){return String(e).replace(/([-()\[\]{}+?*.$\^|,:#s;s++){var l=n[s]||"",a=i[s]||"",c=RegExp("(\\d*)(\\D*)","g"),g=RegExp("(\\d*)(\\D*)","g");do{var u=c.exec(l)||["","",""],h=g.exec(a)||["","",""];if(0==u[0].length&&0==h[0].length)break;var o=0==u[1].length?0:parseInt(u[1],10),d=0==h[1].length?0:parseInt(h[1],10),o=goog.string.compareElements_(o,d)||goog.string.compareElements_(0==u[2].length,0==h[2].length)||goog.string.compareElements_(u[2],h[2])}while(0==o)}return o},goog.string.compareElements_=function(e,t){return t>e?-1:e>t?1:0},goog.string.HASHCODE_MAX_=4294967296,goog.string.hashCode=function(e){for(var t=0,o=0;o0&&e.length;)n.push(e.shift()),o--;return e.length&&n.push(e.join(t)),n},goog.string.editDistance=function(e,t){var o=[],n=[];if(e==t)return 0;if(!e.length||!t.length)return Math.max(e.length,t.length);for(var i=0;io?Math.max(0,e.length+o):o,goog.isString(e))return goog.isString(t)&&1==t.length?e.indexOf(t,o):-1;for(;oo&&(o=Math.max(0,e.length+o)),goog.isString(e))return goog.isString(t)&&1==t.length?e.lastIndexOf(t,o):-1;for(;o>=0;o--)if(o in e&&e[o]===t)return o;return-1},goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||goog.array.ARRAY_PROTOTYPE_.forEach)?function(e,t,o){goog.asserts.assert(null!=e.length),goog.array.ARRAY_PROTOTYPE_.forEach.call(e,t,o)}:function(e,t,o){for(var n=e.length,i=goog.isString(e)?e.split(""):e,r=0;n>r;r++)r in i&&t.call(o,i[r],r,e)},goog.array.forEachRight=function(e,t,o){for(var n=e.length,i=goog.isString(e)?e.split(""):e,n=n-1;n>=0;--n)n in i&&t.call(o,i[n],n,e)},goog.array.filter=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||goog.array.ARRAY_PROTOTYPE_.filter)?function(e,t,o){return goog.asserts.assert(null!=e.length),goog.array.ARRAY_PROTOTYPE_.filter.call(e,t,o)}:function(e,t,o){for(var n=e.length,i=[],r=0,s=goog.isString(e)?e.split(""):e,l=0;n>l;l++)if(l in s){var a=s[l];t.call(o,a,l,e)&&(i[r++]=a)}return i},goog.array.map=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||goog.array.ARRAY_PROTOTYPE_.map)?function(e,t,o){return goog.asserts.assert(null!=e.length),goog.array.ARRAY_PROTOTYPE_.map.call(e,t,o)}:function(e,t,o){for(var n=e.length,i=Array(n),r=goog.isString(e)?e.split(""):e,s=0;n>s;s++)s in r&&(i[s]=t.call(o,r[s],s,e));return i},goog.array.reduce=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||goog.array.ARRAY_PROTOTYPE_.reduce)?function(e,t,o,n){return goog.asserts.assert(null!=e.length),n&&(t=goog.bind(t,n)),goog.array.ARRAY_PROTOTYPE_.reduce.call(e,t,o)}:function(e,t,o,n){var i=o;return goog.array.forEach(e,function(o,r){i=t.call(n,i,o,r,e)}),i},goog.array.reduceRight=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||goog.array.ARRAY_PROTOTYPE_.reduceRight)?function(e,t,o,n){return goog.asserts.assert(null!=e.length),n&&(t=goog.bind(t,n)),goog.array.ARRAY_PROTOTYPE_.reduceRight.call(e,t,o)}:function(e,t,o,n){var i=o;return goog.array.forEachRight(e,function(o,r){i=t.call(n,i,o,r,e)}),i},goog.array.some=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||goog.array.ARRAY_PROTOTYPE_.some)?function(e,t,o){return goog.asserts.assert(null!=e.length),goog.array.ARRAY_PROTOTYPE_.some.call(e,t,o)}:function(e,t,o){for(var n=e.length,i=goog.isString(e)?e.split(""):e,r=0;n>r;r++)if(r in i&&t.call(o,i[r],r,e))return!0;return!1},goog.array.every=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||goog.array.ARRAY_PROTOTYPE_.every)?function(e,t,o){return goog.asserts.assert(null!=e.length),goog.array.ARRAY_PROTOTYPE_.every.call(e,t,o)}:function(e,t,o){for(var n=e.length,i=goog.isString(e)?e.split(""):e,r=0;n>r;r++)if(r in i&&!t.call(o,i[r],r,e))return!1;return!0},goog.array.count=function(e,t,o){var n=0;return goog.array.forEach(e,function(e,i,r){t.call(o,e,i,r)&&++n},o),n},goog.array.find=function(e,t,o){return t=goog.array.findIndex(e,t,o),0>t?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndex=function(e,t,o){for(var n=e.length,i=goog.isString(e)?e.split(""):e,r=0;n>r;r++)if(r in i&&t.call(o,i[r],r,e))return r;return-1},goog.array.findRight=function(e,t,o){return t=goog.array.findIndexRight(e,t,o),0>t?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndexRight=function(e,t,o){for(var n=e.length,i=goog.isString(e)?e.split(""):e,n=n-1;n>=0;n--)if(n in i&&t.call(o,i[n],n,e))return n;return-1},goog.array.contains=function(e,t){return 0<=goog.array.indexOf(e,t)},goog.array.isEmpty=function(e){return 0==e.length},goog.array.clear=function(e){if(!goog.isArray(e))for(var t=e.length-1;t>=0;t--)delete e[t];e.length=0},goog.array.insert=function(e,t){goog.array.contains(e,t)||e.push(t)},goog.array.insertAt=function(e,t,o){goog.array.splice(e,o,0,t)},goog.array.insertArrayAt=function(e,t,o){goog.partial(goog.array.splice,e,o,0).apply(null,t)},goog.array.insertBefore=function(e,t,o){var n;2==arguments.length||0>(n=goog.array.indexOf(e,o))?e.push(t):goog.array.insertAt(e,t,n)},goog.array.remove=function(e,t){var o,n=goog.array.indexOf(e,t);return(o=n>=0)&&goog.array.removeAt(e,n),o},goog.array.removeAt=function(e,t){return goog.asserts.assert(null!=e.length),1==goog.array.ARRAY_PROTOTYPE_.splice.call(e,t,1).length},goog.array.removeIf=function(e,t,o){return t=goog.array.findIndex(e,t,o),t>=0?(goog.array.removeAt(e,t),!0):!1},goog.array.removeAllIf=function(e,t,o){var n=0;return goog.array.forEachRight(e,function(i,r){t.call(o,i,r,e)&&goog.array.removeAt(e,r)&&n++}),n},goog.array.concat=function(){return goog.array.ARRAY_PROTOTYPE_.concat.apply(goog.array.ARRAY_PROTOTYPE_,arguments)},goog.array.join=function(){return goog.array.ARRAY_PROTOTYPE_.concat.apply(goog.array.ARRAY_PROTOTYPE_,arguments)},goog.array.toArray=function(e){var t=e.length;if(t>0){for(var o=Array(t),n=0;t>n;n++)o[n]=e[n];return o}return[]},goog.array.clone=goog.array.toArray,goog.array.extend=function(e){for(var t=1;tr;r++)e[n+r]=o[r]}else e.push(o)}},goog.array.splice=function(e){return goog.asserts.assert(null!=e.length),goog.array.ARRAY_PROTOTYPE_.splice.apply(e,goog.array.slice(arguments,1))},goog.array.slice=function(e,t,o){return goog.asserts.assert(null!=e.length),2>=arguments.length?goog.array.ARRAY_PROTOTYPE_.slice.call(e,t):goog.array.ARRAY_PROTOTYPE_.slice.call(e,t,o)},goog.array.removeDuplicates=function(e,t,o){t=t||e;var n=function(){return goog.isObject(s)?"o"+goog.getUid(s):(typeof s).charAt(0)+s};o=o||n;for(var n={},i=0,r=0;rs;){var a,c=s+l>>1;a=o?t.call(i,e[c],c,e):t(n,e[c]),a>0?s=c+1:(l=c,r=!a)}return r?s:~s},goog.array.sort=function(e,t){e.sort(t||goog.array.defaultCompare)},goog.array.stableSort=function(e,t){for(var o=0;o0||0==i&&o)return!1}return!0},goog.array.equals=function(e,t,o){if(!goog.isArrayLike(e)||!goog.isArrayLike(t)||e.length!=t.length)return!1;var n=e.length;o=o||goog.array.defaultCompareEquality;for(var i=0;n>i;i++)if(!o(e[i],t[i]))return!1;return!0},goog.array.compare3=function(e,t,o){o=o||goog.array.defaultCompare;for(var n=Math.min(e.length,t.length),i=0;n>i;i++){var r=o(e[i],t[i]);if(0!=r)return r}return goog.array.defaultCompare(e.length,t.length)},goog.array.defaultCompare=function(e,t){return e>t?1:t>e?-1:0},goog.array.defaultCompareEquality=function(e,t){return e===t},goog.array.binaryInsert=function(e,t,o){return o=goog.array.binarySearch(e,t,o),0>o?(goog.array.insertAt(e,t,-(o+1)),!0):!1},goog.array.binaryRemove=function(e,t,o){return t=goog.array.binarySearch(e,t,o),t>=0?goog.array.removeAt(e,t):!1},goog.array.bucket=function(e,t,o){for(var n={},i=0;io*(r-i))return[];if(o>0)for(e=i;r>e;e+=o)n.push(e);else for(e=i;e>r;e+=o)n.push(e);return n},goog.array.repeat=function(e,t){for(var o=[],n=0;t>n;n++)o[n]=e;return o},goog.array.flatten=function(){for(var e=[],t=0;t0?goog.array.ARRAY_PROTOTYPE_.unshift.apply(e,e.splice(-t,t)):0>t&&goog.array.ARRAY_PROTOTYPE_.push.apply(e,e.splice(0,-t))),e},goog.array.moveItem=function(e,t,o){goog.asserts.assert(t>=0&&t=0&&o=i.length)return e;o.push(i[t])}e.push(o)}},goog.array.shuffle=function(e,t){for(var o=t||Math.random,n=e.length-1;n>0;n--){var i=Math.floor(o()*(n+1)),r=e[n];e[n]=e[i],e[i]=r}},goog.math={},goog.math.randomInt=function(e){return Math.floor(Math.random()*e)},goog.math.uniformRandom=function(e,t){return e+Math.random()*(t-e)},goog.math.clamp=function(e,t,o){return Math.min(Math.max(e,t),o)},goog.math.modulo=function(e,t){var o=e%t;return 0>o*t?o+t:o},goog.math.lerp=function(e,t,o){return e+o*(t-e)},goog.math.nearlyEquals=function(e,t,o){return Math.abs(e-t)<=(o||1e-6)},goog.math.standardAngle=function(e){return goog.math.modulo(e,360)},goog.math.standardAngleInRadians=function(e){return goog.math.modulo(e,2*Math.PI)},goog.math.toRadians=function(e){return e*Math.PI/180},goog.math.toDegrees=function(e){return 180*e/Math.PI},goog.math.angleDx=function(e,t){return t*Math.cos(goog.math.toRadians(e))},goog.math.angleDy=function(e,t){return t*Math.sin(goog.math.toRadians(e))},goog.math.angle=function(e,t,o,n){return goog.math.standardAngle(goog.math.toDegrees(Math.atan2(n-t,o-e)))},goog.math.angleDifference=function(e,t){var o=goog.math.standardAngle(t)-goog.math.standardAngle(e);return o>180?o-=360:-180>=o&&(o=360+o),o},goog.math.sign=function(e){return 0==e?0:0>e?-1:1},goog.math.longestCommonSubsequence=function(e,t,o,n){o=o||function(e,t){return e==t},n=n||function(t){return e[t]};for(var i=e.length,r=t.length,s=[],l=0;i+1>l;l++)s[l]=[],s[l][0]=0;for(var a=0;r+1>a;a++)s[0][a]=0;for(l=1;i>=l;l++)for(a=1;r>=a;a++)s[l][a]=o(e[l-1],t[a-1])?s[l-1][a-1]+1:Math.max(s[l-1][a],s[l][a-1]);for(var c=[],l=i,a=r;l>0&&a>0;)o(e[l-1],t[a-1])?(c.unshift(n(l-1,a-1)),l--,a--):s[l-1][a]>s[l][a-1]?l--:a--;return c},goog.math.sum=function(){return goog.array.reduce(arguments,function(e,t){return e+t},0)},goog.math.average=function(){return goog.math.sum.apply(null,arguments)/arguments.length},goog.math.sampleVariance=function(){var e=arguments.length;if(2>e)return 0;var t=goog.math.average.apply(null,arguments);return goog.math.sum.apply(null,goog.array.map(arguments,function(e){return Math.pow(e-t,2)}))/(e-1)},goog.math.standardDeviation=function(){return Math.sqrt(goog.math.sampleVariance.apply(null,arguments))},goog.math.isInt=function(e){return isFinite(e)&&0==e%1},goog.math.isFiniteNumber=function(e){return isFinite(e)&&!isNaN(e)},goog.math.log10Floor=function(e){if(e>0){var t=Math.round(Math.log(e)*Math.LOG10E);return t-(parseFloat("1e"+t)>e)}return 0==e?-1/0:0/0},goog.math.safeFloor=function(e,t){return goog.asserts.assert(!goog.isDef(t)||t>0),Math.floor(e+(t||2e-15))},goog.math.safeCeil=function(e,t){return goog.asserts.assert(!goog.isDef(t)||t>0),Math.ceil(e-(t||2e-15))},goog.labs={},goog.labs.userAgent={},goog.labs.userAgent.util={},goog.labs.userAgent.util.getNativeUserAgentString_=function(){var e=goog.labs.userAgent.util.getNavigator_();return e&&(e=e.userAgent)?e:""},goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator},goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_(),goog.labs.userAgent.util.setUserAgent=function(e){goog.labs.userAgent.util.userAgent_=e||goog.labs.userAgent.util.getNativeUserAgentString_()},goog.labs.userAgent.util.getUserAgent=function(){return goog.labs.userAgent.util.userAgent_},goog.labs.userAgent.util.matchUserAgent=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.contains(t,e)},goog.labs.userAgent.util.matchUserAgentIgnoreCase=function(e){var t=goog.labs.userAgent.util.getUserAgent();return goog.string.caseInsensitiveContains(t,e)},goog.labs.userAgent.util.extractVersionTuples=function(e){for(var t,o=RegExp("(\\w[\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g"),n=[];t=o.exec(e);)n.push([t[1],t[2],t[3]||void 0]);return n},goog.object={},goog.object.forEach=function(e,t,o){for(var n in e)t.call(o,e[n],n,e)},goog.object.filter=function(e,t,o){var n,i={};for(n in e)t.call(o,e[n],n,e)&&(i[n]=e[n]);return i},goog.object.map=function(e,t,o){var n,i={};for(n in e)i[n]=t.call(o,e[n],n,e);return i},goog.object.some=function(e,t,o){for(var n in e)if(t.call(o,e[n],n,e))return!0;return!1},goog.object.every=function(e,t,o){for(var n in e)if(!t.call(o,e[n],n,e))return!1;return!0},goog.object.getCount=function(e){var t,o=0;for(t in e)o++;return o},goog.object.getAnyKey=function(e){for(var t in e)return t},goog.object.getAnyValue=function(e){for(var t in e)return e[t]},goog.object.contains=function(e,t){return goog.object.containsValue(e,t)},goog.object.getValues=function(e){var t,o=[],n=0;for(t in e)o[n++]=e[t];return o},goog.object.getKeys=function(e){var t,o=[],n=0;for(t in e)o[n++]=t;return o},goog.object.getValueByKeys=function(e,t){for(var o=goog.isArrayLike(t),n=o?t:arguments,o=o?0:1;oo;o+=2)t[arguments[o]]=arguments[o+1];return t},goog.object.createSet=function(){var e=arguments.length;if(1==e&&goog.isArray(arguments[0]))return goog.object.createSet.apply(null,arguments[0]);for(var t={},o=0;e>o;o++)t[arguments[o]]=!0;return t},goog.object.createImmutableView=function(e){var t=e;return Object.isFrozen&&!Object.isFrozen(e)&&(t=Object.create(e),Object.freeze(t)),t},goog.object.isImmutableView=function(e){return!!Object.isFrozen&&Object.isFrozen(e)},goog.labs.userAgent.browser={},goog.labs.userAgent.browser.matchOpera_=function(){return goog.labs.userAgent.util.matchUserAgent("Opera")||goog.labs.userAgent.util.matchUserAgent("OPR")},goog.labs.userAgent.browser.matchIE_=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.browser.matchFirefox_=function(){return goog.labs.userAgent.util.matchUserAgent("Firefox")},goog.labs.userAgent.browser.matchSafari_=function(){return goog.labs.userAgent.util.matchUserAgent("Safari")&&!goog.labs.userAgent.util.matchUserAgent("Chrome")&&!goog.labs.userAgent.util.matchUserAgent("CriOS")&&!goog.labs.userAgent.util.matchUserAgent("Android")},goog.labs.userAgent.browser.matchCoast_=function(){return goog.labs.userAgent.util.matchUserAgent("Coast")},goog.labs.userAgent.browser.matchIosWebview_=function(){return(goog.labs.userAgent.util.matchUserAgent("iPad")||goog.labs.userAgent.util.matchUserAgent("iPhone"))&&!goog.labs.userAgent.browser.matchSafari_()&&!goog.labs.userAgent.browser.matchChrome_()&&!goog.labs.userAgent.browser.matchCoast_()&&goog.labs.userAgent.util.matchUserAgent("AppleWebKit")},goog.labs.userAgent.browser.matchChrome_=function(){return goog.labs.userAgent.util.matchUserAgent("Chrome")||goog.labs.userAgent.util.matchUserAgent("CriOS")},goog.labs.userAgent.browser.matchAndroidBrowser_=function(){return!goog.labs.userAgent.browser.isChrome()&&goog.labs.userAgent.util.matchUserAgent("Android")},goog.labs.userAgent.browser.isOpera=goog.labs.userAgent.browser.matchOpera_,goog.labs.userAgent.browser.isIE=goog.labs.userAgent.browser.matchIE_,goog.labs.userAgent.browser.isFirefox=goog.labs.userAgent.browser.matchFirefox_,goog.labs.userAgent.browser.isSafari=goog.labs.userAgent.browser.matchSafari_,goog.labs.userAgent.browser.isCoast=goog.labs.userAgent.browser.matchCoast_,goog.labs.userAgent.browser.isIosWebview=goog.labs.userAgent.browser.matchIosWebview_,goog.labs.userAgent.browser.isChrome=goog.labs.userAgent.browser.matchChrome_,goog.labs.userAgent.browser.isAndroidBrowser=goog.labs.userAgent.browser.matchAndroidBrowser_,goog.labs.userAgent.browser.isSilk=function(){return goog.labs.userAgent.util.matchUserAgent("Silk")},goog.labs.userAgent.browser.getVersion=function(){function e(e){return e=goog.array.find(e,n),o[e]||""}var t=goog.labs.userAgent.util.getUserAgent();if(goog.labs.userAgent.browser.isIE())return goog.labs.userAgent.browser.getIEVersion_(t);var t=goog.labs.userAgent.util.extractVersionTuples(t),o={};goog.array.forEach(t,function(e){o[e[0]]=e[1]});var n=goog.partial(goog.object.containsKey,o);return goog.labs.userAgent.browser.isOpera()?e(["Version","Opera","OPR"]):goog.labs.userAgent.browser.isChrome()?e(["Chrome","CriOS"]):(t=t[2])&&t[1]||""},goog.labs.userAgent.browser.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.browser.getVersion(),e)},goog.labs.userAgent.browser.getIEVersion_=function(e){var t=/rv: *([\d\.]*)/.exec(e);if(t&&t[1])return t[1];var t="",o=/MSIE +([\d\.]+)/.exec(e);if(o&&o[1])if(e=/Trident\/(\d.\d)/.exec(e),"7.0"==o[1])if(e&&e[1])switch(e[1]){case"4.0":t="8.0";break;case"5.0":t="9.0";break;case"6.0":t="10.0";break;case"7.0":t="11.0"}else t="7.0";else t=o[1];return t},goog.labs.userAgent.engine={},goog.labs.userAgent.engine.isPresto=function(){return goog.labs.userAgent.util.matchUserAgent("Presto")},goog.labs.userAgent.engine.isTrident=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")},goog.labs.userAgent.engine.isWebKit=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")},goog.labs.userAgent.engine.isGecko=function(){return goog.labs.userAgent.util.matchUserAgent("Gecko")&&!goog.labs.userAgent.engine.isWebKit()&&!goog.labs.userAgent.engine.isTrident()},goog.labs.userAgent.engine.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent();if(e){var e=goog.labs.userAgent.util.extractVersionTuples(e),t=e[1];if(t)return"Gecko"==t[0]?goog.labs.userAgent.engine.getVersionForKey_(e,"Firefox"):t[1];var o,e=e[0];if(e&&(o=e[2])&&(o=/Trident\/([^\s;]+)/.exec(o)))return o[1]}return""},goog.labs.userAgent.engine.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(),e)},goog.labs.userAgent.engine.getVersionForKey_=function(e,t){var o=goog.array.find(e,function(e){return t==e[0]});return o&&o[1]||""},goog.labs.userAgent.platform={},goog.labs.userAgent.platform.isAndroid=function(){return goog.labs.userAgent.util.matchUserAgent("Android")},goog.labs.userAgent.platform.isIpod=function(){return goog.labs.userAgent.util.matchUserAgent("iPod")},goog.labs.userAgent.platform.isIphone=function(){return goog.labs.userAgent.util.matchUserAgent("iPhone")&&!goog.labs.userAgent.util.matchUserAgent("iPod")&&!goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIpad=function(){return goog.labs.userAgent.util.matchUserAgent("iPad")},goog.labs.userAgent.platform.isIos=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpad()||goog.labs.userAgent.platform.isIpod()},goog.labs.userAgent.platform.isMacintosh=function(){return goog.labs.userAgent.util.matchUserAgent("Macintosh")},goog.labs.userAgent.platform.isLinux=function(){return goog.labs.userAgent.util.matchUserAgent("Linux")},goog.labs.userAgent.platform.isWindows=function(){return goog.labs.userAgent.util.matchUserAgent("Windows")},goog.labs.userAgent.platform.isChromeOS=function(){return goog.labs.userAgent.util.matchUserAgent("CrOS")},goog.labs.userAgent.platform.getVersion=function(){var e=goog.labs.userAgent.util.getUserAgent(),t="";return goog.labs.userAgent.platform.isWindows()?(t=/Windows (?:NT|Phone) ([0-9.]+)/,t=(e=t.exec(e))?e[1]:"0.0"):goog.labs.userAgent.platform.isIos()?(t=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/,t=(e=t.exec(e))&&e[1].replace(/_/g,".")):goog.labs.userAgent.platform.isMacintosh()?(t=/Mac OS X ([0-9_.]+)/,t=(e=t.exec(e))?e[1].replace(/_/g,"."):"10"):goog.labs.userAgent.platform.isAndroid()?(t=/Android\s+([^\);]+)(\)|;)/,t=(e=t.exec(e))&&e[1]):goog.labs.userAgent.platform.isChromeOS()&&(t=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/,t=(e=t.exec(e))&&e[1]),t||""},goog.labs.userAgent.platform.isVersionOrHigher=function(e){return 0<=goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(),e)},goog.userAgent={},goog.userAgent.ASSUME_IE=!1,goog.userAgent.ASSUME_GECKO=!1,goog.userAgent.ASSUME_WEBKIT=!1,goog.userAgent.ASSUME_MOBILE_WEBKIT=!1,goog.userAgent.ASSUME_OPERA=!1,goog.userAgent.ASSUME_ANY_VERSION=!1,goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA,goog.userAgent.getUserAgentString=function(){return goog.labs.userAgent.util.getUserAgent()},goog.userAgent.getNavigator=function(){return goog.global.navigator||null},goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.labs.userAgent.browser.isOpera(),goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.labs.userAgent.browser.isIE(),goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO:goog.labs.userAgent.engine.isGecko(),goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.labs.userAgent.engine.isWebKit(),goog.userAgent.isMobile_=function(){return goog.userAgent.WEBKIT&&goog.labs.userAgent.util.matchUserAgent("Mobile")},goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.isMobile_(),goog.userAgent.SAFARI=goog.userAgent.WEBKIT,goog.userAgent.determinePlatform_=function(){var e=goog.userAgent.getNavigator();return e&&e.platform||""},goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_(),goog.userAgent.ASSUME_MAC=!1,goog.userAgent.ASSUME_WINDOWS=!1,goog.userAgent.ASSUME_LINUX=!1,goog.userAgent.ASSUME_X11=!1,goog.userAgent.ASSUME_ANDROID=!1,goog.userAgent.ASSUME_IPHONE=!1,goog.userAgent.ASSUME_IPAD=!1,goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD,goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh(),goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows(),goog.userAgent.isLegacyLinux_=function(){return goog.labs.userAgent.platform.isLinux()||goog.labs.userAgent.platform.isChromeOS()},goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.isLegacyLinux_(),goog.userAgent.isX11_=function(){var e=goog.userAgent.getNavigator();return!!e&&goog.string.contains(e.appVersion||"","X11")},goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.isX11_(),goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid(),goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone(),goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.determineVersion_=function(){var e,t=""; return goog.userAgent.OPERA&&goog.global.opera?(t=goog.global.opera.version,goog.isFunction(t)?t():t):(goog.userAgent.GECKO?e=/rv\:([^\);]+)(\)|;)/:goog.userAgent.IE?e=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:goog.userAgent.WEBKIT&&(e=/WebKit\/(\S+)/),e&&(t=(t=e.exec(goog.userAgent.getUserAgentString()))?t[1]:""),goog.userAgent.IE&&(e=goog.userAgent.getDocumentMode_(),e>parseFloat(t))?String(e):t)},goog.userAgent.getDocumentMode_=function(){var e=goog.global.document;return e?e.documentMode:void 0},goog.userAgent.VERSION=goog.userAgent.determineVersion_(),goog.userAgent.compare=function(e,t){return goog.string.compareVersions(e,t)},goog.userAgent.isVersionOrHigherCache_={},goog.userAgent.isVersionOrHigher=function(e){return goog.userAgent.ASSUME_ANY_VERSION||goog.userAgent.isVersionOrHigherCache_[e]||(goog.userAgent.isVersionOrHigherCache_[e]=0<=goog.string.compareVersions(goog.userAgent.VERSION,e))},goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher,goog.userAgent.isDocumentModeOrHigher=function(e){return goog.userAgent.IE&&goog.userAgent.DOCUMENT_MODE>=e},goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher,goog.userAgent.DOCUMENT_MODE=function(){var e=goog.global.document;return e&&goog.userAgent.IE?goog.userAgent.getDocumentMode_()||("CSS1Compat"==e.compatMode?parseInt(goog.userAgent.VERSION,10):5):void 0}(),goog.math.Size=function(e,t){this.width=e,this.height=t},goog.math.Size.equals=function(e,t){return e==t?!0:e&&t?e.width==t.width&&e.height==t.height:!1},goog.math.Size.prototype.clone=function(){return new goog.math.Size(this.width,this.height)},goog.DEBUG&&(goog.math.Size.prototype.toString=function(){return"("+this.width+" x "+this.height+")"}),goog.math.Size.prototype.getLongest=function(){return Math.max(this.width,this.height)},goog.math.Size.prototype.getShortest=function(){return Math.min(this.width,this.height)},goog.math.Size.prototype.area=function(){return this.width*this.height},goog.math.Size.prototype.perimeter=function(){return 2*(this.width+this.height)},goog.math.Size.prototype.aspectRatio=function(){return this.width/this.height},goog.math.Size.prototype.isEmpty=function(){return!this.area()},goog.math.Size.prototype.ceil=function(){return this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},goog.math.Size.prototype.fitsInside=function(e){return this.width<=e.width&&this.height<=e.height},goog.math.Size.prototype.floor=function(){return this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},goog.math.Size.prototype.round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this},goog.math.Size.prototype.scale=function(e,t){var o=goog.isNumber(t)?t:e;return this.width*=e,this.height*=o,this},goog.math.Size.prototype.scaleToFit=function(e){return e=this.aspectRatio()>e.aspectRatio()?e.width/this.width:e.height/this.height,this.scale(e)},goog.debug.entryPointRegistry={},goog.debug.EntryPointMonitor=function(){},goog.debug.entryPointRegistry.refList_=[],goog.debug.entryPointRegistry.monitors_=[],goog.debug.entryPointRegistry.monitorsMayExist_=!1,goog.debug.entryPointRegistry.register=function(e){if(goog.debug.entryPointRegistry.refList_[goog.debug.entryPointRegistry.refList_.length]=e,goog.debug.entryPointRegistry.monitorsMayExist_)for(var t=goog.debug.entryPointRegistry.monitors_,o=0;oe;++e){var o=arguments[e];goog.isArrayLike(o)?goog.disposeAll.apply(null,o):goog.dispose(o)}},goog.events.EventId=function(e){this.id=e},goog.events.EventId.prototype.toString=function(){return this.id},goog.events.Event=function(e,t){this.type=e instanceof goog.events.EventId?String(e):e,this.currentTarget=this.target=t,this.defaultPrevented=this.propagationStopped_=!1,this.returnValue_=!0},goog.events.Event.prototype.disposeInternal=function(){},goog.events.Event.prototype.dispose=function(){},goog.events.Event.prototype.stopPropagation=function(){this.propagationStopped_=!0},goog.events.Event.prototype.preventDefault=function(){this.defaultPrevented=!0,this.returnValue_=!1},goog.events.Event.stopPropagation=function(e){e.stopPropagation()},goog.events.Event.preventDefault=function(e){e.preventDefault()},goog.events.getVendorPrefixedName_=function(e){return goog.userAgent.WEBKIT?"webkit"+e:goog.userAgent.OPERA?"o"+e.toLowerCase():e.toLowerCase()},goog.events.EventType={CLICK:"click",RIGHTCLICK:"rightclick",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",SELECTSTART:"selectstart",WHEEL:"wheel",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",BLUR:"blur",FOCUS:"focus",DEACTIVATE:"deactivate",FOCUSIN:goog.userAgent.IE?"focusin":"DOMFocusIn",FOCUSOUT:goog.userAgent.IE?"focusout":"DOMFocusOut",CHANGE:"change",SELECT:"select",SUBMIT:"submit",INPUT:"input",PROPERTYCHANGE:"propertychange",DRAGSTART:"dragstart",DRAG:"drag",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",DRAGEND:"dragend",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel",BEFOREUNLOAD:"beforeunload",CONSOLEMESSAGE:"consolemessage",CONTEXTMENU:"contextmenu",DOMCONTENTLOADED:"DOMContentLoaded",ERROR:"error",HELP:"help",LOAD:"load",LOSECAPTURE:"losecapture",ORIENTATIONCHANGE:"orientationchange",READYSTATECHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",UNLOAD:"unload",HASHCHANGE:"hashchange",PAGEHIDE:"pagehide",PAGESHOW:"pageshow",POPSTATE:"popstate",COPY:"copy",PASTE:"paste",CUT:"cut",BEFORECOPY:"beforecopy",BEFORECUT:"beforecut",BEFOREPASTE:"beforepaste",ONLINE:"online",OFFLINE:"offline",MESSAGE:"message",CONNECT:"connect",ANIMATIONSTART:goog.events.getVendorPrefixedName_("AnimationStart"),ANIMATIONEND:goog.events.getVendorPrefixedName_("AnimationEnd"),ANIMATIONITERATION:goog.events.getVendorPrefixedName_("AnimationIteration"),TRANSITIONEND:goog.events.getVendorPrefixedName_("TransitionEnd"),POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTERCANCEL:"pointercancel",POINTERMOVE:"pointermove",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",MSGESTURECHANGE:"MSGestureChange",MSGESTUREEND:"MSGestureEnd",MSGESTUREHOLD:"MSGestureHold",MSGESTURESTART:"MSGestureStart",MSGESTURETAP:"MSGestureTap",MSGOTPOINTERCAPTURE:"MSGotPointerCapture",MSINERTIASTART:"MSInertiaStart",MSLOSTPOINTERCAPTURE:"MSLostPointerCapture",MSPOINTERCANCEL:"MSPointerCancel",MSPOINTERDOWN:"MSPointerDown",MSPOINTERENTER:"MSPointerEnter",MSPOINTERHOVER:"MSPointerHover",MSPOINTERLEAVE:"MSPointerLeave",MSPOINTERMOVE:"MSPointerMove",MSPOINTEROUT:"MSPointerOut",MSPOINTEROVER:"MSPointerOver",MSPOINTERUP:"MSPointerUp",TEXT:"text",TEXTINPUT:"textInput",COMPOSITIONSTART:"compositionstart",COMPOSITIONUPDATE:"compositionupdate",COMPOSITIONEND:"compositionend",EXIT:"exit",LOADABORT:"loadabort",LOADCOMMIT:"loadcommit",LOADREDIRECT:"loadredirect",LOADSTART:"loadstart",LOADSTOP:"loadstop",RESPONSIVE:"responsive",SIZECHANGED:"sizechanged",UNRESPONSIVE:"unresponsive",VISIBILITYCHANGE:"visibilitychange",STORAGE:"storage",DOMSUBTREEMODIFIED:"DOMSubtreeModified",DOMNODEINSERTED:"DOMNodeInserted",DOMNODEREMOVED:"DOMNodeRemoved",DOMNODEREMOVEDFROMDOCUMENT:"DOMNodeRemovedFromDocument",DOMNODEINSERTEDINTODOCUMENT:"DOMNodeInsertedIntoDocument",DOMATTRMODIFIED:"DOMAttrModified",DOMCHARACTERDATAMODIFIED:"DOMCharacterDataModified"},goog.reflect={},goog.reflect.object=function(e,t){return t},goog.reflect.sinkValue=function(e){return goog.reflect.sinkValue[" "](e),e},goog.reflect.sinkValue[" "]=goog.nullFunction,goog.reflect.canAccessProperty=function(e,t){try{return goog.reflect.sinkValue(e[t]),!0}catch(o){}return!1},goog.events.BrowserEvent=function(e,t){goog.events.Event.call(this,e?e.type:""),this.relatedTarget=this.currentTarget=this.target=null,this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0,this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.platformModifierKey=!1,this.event_=null,e&&this.init(e,t)},goog.inherits(goog.events.BrowserEvent,goog.events.Event),goog.events.BrowserEvent.MouseButton={LEFT:0,MIDDLE:1,RIGHT:2},goog.events.BrowserEvent.IEButtonMap=[1,4,2],goog.events.BrowserEvent.prototype.init=function(e,t){var o=this.type=e.type;this.target=e.target||e.srcElement,this.currentTarget=t;var n=e.relatedTarget;n?goog.userAgent.GECKO&&(goog.reflect.canAccessProperty(n,"nodeName")||(n=null)):o==goog.events.EventType.MOUSEOVER?n=e.fromElement:o==goog.events.EventType.MOUSEOUT&&(n=e.toElement),this.relatedTarget=n,this.offsetX=goog.userAgent.WEBKIT||void 0!==e.offsetX?e.offsetX:e.layerX,this.offsetY=goog.userAgent.WEBKIT||void 0!==e.offsetY?e.offsetY:e.layerY,this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0,this.button=e.button,this.keyCode=e.keyCode||0,this.charCode=e.charCode||("keypress"==o?e.keyCode:0),this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.platformModifierKey=goog.userAgent.MAC?e.metaKey:e.ctrlKey,this.state=e.state,this.event_=e,e.defaultPrevented&&this.preventDefault()},goog.events.BrowserEvent.prototype.isButton=function(e){return goog.events.BrowserFeature.HAS_W3C_BUTTON?this.event_.button==e:"click"==this.type?e==goog.events.BrowserEvent.MouseButton.LEFT:!!(this.event_.button&goog.events.BrowserEvent.IEButtonMap[e])},goog.events.BrowserEvent.prototype.isMouseActionButton=function(){return this.isButton(goog.events.BrowserEvent.MouseButton.LEFT)&&!(goog.userAgent.WEBKIT&&goog.userAgent.MAC&&this.ctrlKey)},goog.events.BrowserEvent.prototype.stopPropagation=function(){goog.events.BrowserEvent.superClass_.stopPropagation.call(this),this.event_.stopPropagation?this.event_.stopPropagation():this.event_.cancelBubble=!0},goog.events.BrowserEvent.prototype.preventDefault=function(){goog.events.BrowserEvent.superClass_.preventDefault.call(this);var e=this.event_;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,goog.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(t){}},goog.events.BrowserEvent.prototype.getBrowserEvent=function(){return this.event_},goog.events.BrowserEvent.prototype.disposeInternal=function(){},goog.events.Listenable=function(){},goog.events.Listenable.IMPLEMENTED_BY_PROP="closure_listenable_"+(1e6*Math.random()|0),goog.events.Listenable.addImplementation=function(e){e.prototype[goog.events.Listenable.IMPLEMENTED_BY_PROP]=!0},goog.events.Listenable.isImplementedBy=function(e){return!(!e||!e[goog.events.Listenable.IMPLEMENTED_BY_PROP])},goog.events.ListenableKey=function(){},goog.events.ListenableKey.counter_=0,goog.events.ListenableKey.reserveKey=function(){return++goog.events.ListenableKey.counter_},goog.events.Listener=function(e,t,o,n,i,r){goog.events.Listener.ENABLE_MONITORING&&(this.creationStack=Error().stack),this.listener=e,this.proxy=t,this.src=o,this.type=n,this.capture=!!i,this.handler=r,this.key=goog.events.ListenableKey.reserveKey(),this.removed=this.callOnce=!1},goog.events.Listener.ENABLE_MONITORING=!1,goog.events.Listener.prototype.markAsRemoved=function(){this.removed=!0,this.handler=this.src=this.proxy=this.listener=null},goog.events.ListenerMap=function(e){this.src=e,this.listeners={},this.typeCount_=0},goog.events.ListenerMap.prototype.getTypeCount=function(){return this.typeCount_},goog.events.ListenerMap.prototype.getListenerCount=function(){var e,t=0;for(e in this.listeners)t+=this.listeners[e].length;return t},goog.events.ListenerMap.prototype.add=function(e,t,o,n,i){var r=e.toString();e=this.listeners[r],e||(e=this.listeners[r]=[],this.typeCount_++);var s=goog.events.ListenerMap.findListenerIndex_(e,t,n,i);return s>-1?(t=e[s],o||(t.callOnce=!1)):(t=new goog.events.Listener(t,null,this.src,r,!!n,i),t.callOnce=o,e.push(t)),t},goog.events.ListenerMap.prototype.remove=function(e,t,o,n){if(e=e.toString(),!(e in this.listeners))return!1;var i=this.listeners[e];return t=goog.events.ListenerMap.findListenerIndex_(i,t,o,n),t>-1?(i[t].markAsRemoved(),goog.array.removeAt(i,t),0==i.length&&(delete this.listeners[e],this.typeCount_--),!0):!1},goog.events.ListenerMap.prototype.removeByKey=function(e){var t=e.type;if(!(t in this.listeners))return!1;var o=goog.array.remove(this.listeners[t],e);return o&&(e.markAsRemoved(),0==this.listeners[t].length&&(delete this.listeners[t],this.typeCount_--)),o},goog.events.ListenerMap.prototype.removeAll=function(e){e=e&&e.toString();var t,o=0;for(t in this.listeners)if(!e||t==e){for(var n=this.listeners[t],i=0;i-1?e[i]:null},goog.events.ListenerMap.prototype.hasListener=function(e,t){var o=goog.isDef(e),n=o?e.toString():"",i=goog.isDef(t);return goog.object.some(this.listeners,function(e){for(var r=0;r=0;s--){n.currentTarget=o[s];var l=goog.events.fireListeners_(o[s],r,!0,n),i=i&&l}for(s=0;!n.propagationStopped_&&se.keyCode||void 0!=e.returnValue},goog.events.uniqueIdCounter_=0,goog.events.getUniqueId=function(e){return e+"_"+goog.events.uniqueIdCounter_++},goog.events.getListenerMap_=function(e){return e=e[goog.events.LISTENER_MAP_PROP_],e instanceof goog.events.ListenerMap?e:null},goog.events.LISTENER_WRAPPER_PROP_="__closure_events_fn_"+(1e9*Math.random()>>>0),goog.events.wrapListener=function(e){return goog.asserts.assert(e,"Listener can not be null."),goog.isFunction(e)?e:(goog.asserts.assert(e.handleEvent,"An object listener must have handleEvent method."),e[goog.events.LISTENER_WRAPPER_PROP_]||(e[goog.events.LISTENER_WRAPPER_PROP_]=function(t){return e.handleEvent(t)}),e[goog.events.LISTENER_WRAPPER_PROP_])},goog.debug.entryPointRegistry.register(function(e){goog.events.handleBrowserEvent_=e(goog.events.handleBrowserEvent_)}),goog.Thenable=function(){},goog.Thenable.prototype.then=function(){},goog.Thenable.IMPLEMENTED_BY_PROP="$goog_Thenable",goog.Thenable.addImplementation=function(e){goog.exportProperty(e.prototype,"then",e.prototype.then),COMPILED?e.prototype[goog.Thenable.IMPLEMENTED_BY_PROP]=!0:e.prototype.$goog_Thenable=!0},goog.Thenable.isImplementedBy=function(e){if(!e)return!1;try{return COMPILED?!!e[goog.Thenable.IMPLEMENTED_BY_PROP]:!!e.$goog_Thenable}catch(t){return!1}},goog.functions={},goog.functions.constant=function(e){return function(){return e}},goog.functions.FALSE=goog.functions.constant(!1),goog.functions.TRUE=goog.functions.constant(!0),goog.functions.NULL=goog.functions.constant(null),goog.functions.identity=function(e){return e},goog.functions.error=function(e){return function(){throw Error(e)}},goog.functions.fail=function(e){return function(){throw e}},goog.functions.lock=function(e,t){return t=t||0,function(){return e.apply(this,Array.prototype.slice.call(arguments,0,t))}},goog.functions.nth=function(e){return function(){return arguments[e]}},goog.functions.withReturnValue=function(e,t){return goog.functions.sequence(e,goog.functions.constant(t))},goog.functions.equalTo=function(e,t){return function(o){return t?e==o:e===o}},goog.functions.compose=function(){var e=arguments,t=e.length;return function(){var o;t&&(o=e[t-1].apply(this,arguments));for(var n=t-2;n>=0;n--)o=e[n].call(this,o);return o}},goog.functions.sequence=function(){var e=arguments,t=e.length;return function(){for(var o,n=0;t>n;n++)o=e[n].apply(this,arguments);return o}},goog.functions.and=function(){var e=arguments,t=e.length;return function(){for(var o=0;t>o;o++)if(!e[o].apply(this,arguments))return!1;return!0}},goog.functions.or=function(){var e=arguments,t=e.length;return function(){for(var o=0;t>o;o++)if(e[o].apply(this,arguments))return!0;return!1}},goog.functions.not=function(e){return function(){return!e.apply(this,arguments)}},goog.functions.create=function(e){var t=function(){};return t.prototype=e.prototype,t=new t,e.apply(t,Array.prototype.slice.call(arguments,1)),t},goog.functions.CACHE_RETURN_VALUE=!0,goog.functions.cacheReturnValue=function(e){var t,o=!1;return function(){return goog.functions.CACHE_RETURN_VALUE?(o||(t=e(),o=!0),t):e()}},goog.async={},goog.async.throwException=function(e){goog.global.setTimeout(function(){throw e},0)},goog.async.nextTick=function(e,t,o){var n=e;t&&(n=goog.bind(e,t)),n=goog.async.nextTick.wrapCallback_(n),!goog.isFunction(goog.global.setImmediate)||!o&&goog.global.Window&&goog.global.Window.prototype.setImmediate==goog.global.setImmediate?(goog.async.nextTick.setImmediate_||(goog.async.nextTick.setImmediate_=goog.async.nextTick.getSetImmediateEmulator_()),goog.async.nextTick.setImmediate_(n)):goog.global.setImmediate(n)},goog.async.nextTick.getSetImmediateEmulator_=function(){var e=goog.global.MessageChannel;if("undefined"==typeof e&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&(e=function(){var e=document.createElement("iframe");e.style.display="none",e.src="",document.documentElement.appendChild(e);var t=e.contentWindow,e=t.document;e.open(),e.write(""),e.close();var o="callImmediate"+Math.random(),n="file:"==t.location.protocol?"*":t.location.protocol+"//"+t.location.host,e=goog.bind(function(e){"*"!=n&&e.origin!=n||e.data!=o||this.port1.onmessage()},this);t.addEventListener("message",e,!1),this.port1={},this.port2={postMessage:function(){t.postMessage(o,n)}}}),"undefined"!=typeof e&&!goog.labs.userAgent.browser.isIE()){var t=new e,o={},n=o;return t.port1.onmessage=function(){if(goog.isDef(o.next)){o=o.next;var e=o.cb;o.cb=null,e()}},function(e){n.next={cb:e},n=n.next,t.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("script")?function(e){var t=document.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,t.parentNode.removeChild(t),t=null,e(),e=null},document.documentElement.appendChild(t)}:function(e){goog.global.setTimeout(e,0)}},goog.async.nextTick.wrapCallback_=goog.functions.identity,goog.debug.entryPointRegistry.register(function(e){goog.async.nextTick.wrapCallback_=e}),goog.testing={},goog.testing.watchers={},goog.testing.watchers.resetWatchers_=[],goog.testing.watchers.signalClockReset=function(){for(var e=goog.testing.watchers.resetWatchers_,t=0;t=0&&n>1));r++);i>=0&&(this.state_==goog.Promise.State_.PENDING&&1==n?this.cancelInternal_(t):(n=this.callbackEntries_.splice(i,1)[0],this.executeCallback_(n,goog.Promise.State_.REJECTED,t)))}},goog.Promise.prototype.addCallbackEntry_=function(e){this.callbackEntries_&&this.callbackEntries_.length||this.state_!=goog.Promise.State_.FULFILLED&&this.state_!=goog.Promise.State_.REJECTED||this.scheduleCallbacks_(),this.callbackEntries_||(this.callbackEntries_=[]),this.callbackEntries_.push(e)},goog.Promise.prototype.addChildPromise_=function(e,t,o){var n={child:null,onFulfilled:null,onRejected:null};return n.child=new goog.Promise(function(i,r){n.onFulfilled=e?function(t){try{var n=e.call(o,t);i(n)}catch(s){r(s)}}:i,n.onRejected=t?function(e){try{var n=t.call(o,e);!goog.isDef(n)&&e instanceof goog.Promise.CancellationError?r(e):i(n)}catch(s){r(s)}}:r}),n.child.parent_=this,this.addCallbackEntry_(n),n.child},goog.Promise.prototype.unblockAndFulfill_=function(e){goog.asserts.assert(this.state_==goog.Promise.State_.BLOCKED),this.state_=goog.Promise.State_.PENDING,this.resolve_(goog.Promise.State_.FULFILLED,e)},goog.Promise.prototype.unblockAndReject_=function(e){goog.asserts.assert(this.state_==goog.Promise.State_.BLOCKED),this.state_=goog.Promise.State_.PENDING,this.resolve_(goog.Promise.State_.REJECTED,e)},goog.Promise.prototype.resolve_=function(e,t){if(this.state_==goog.Promise.State_.PENDING){if(this==t)e=goog.Promise.State_.REJECTED,t=new TypeError("Promise cannot resolve to itself");else{if(goog.Thenable.isImplementedBy(t))return this.state_=goog.Promise.State_.BLOCKED,t.then(this.unblockAndFulfill_,this.unblockAndReject_,this),void 0;if(goog.isObject(t))try{var o=t.then;if(goog.isFunction(o))return this.tryThen_(t,o),void 0}catch(n){e=goog.Promise.State_.REJECTED,t=n}}this.result_=t,this.state_=e,this.scheduleCallbacks_(),e!=goog.Promise.State_.REJECTED||t instanceof goog.Promise.CancellationError||goog.Promise.addUnhandledRejection_(this,t)}},goog.Promise.prototype.tryThen_=function(e,t){this.state_=goog.Promise.State_.BLOCKED;var o=this,n=!1,i=function(e){n||(n=!0,o.unblockAndFulfill_(e))},r=function(e){n||(n=!0,o.unblockAndReject_(e))};try{t.call(e,i,r)}catch(s){r(s)}},goog.Promise.prototype.scheduleCallbacks_=function(){this.executing_||(this.executing_=!0,goog.async.run(this.executeCallbacks_,this))},goog.Promise.prototype.executeCallbacks_=function(){for(;this.callbackEntries_&&this.callbackEntries_.length;){var e=this.callbackEntries_;this.callbackEntries_=[];for(var t=0;t=0;n--)t.push(o.stack_[n]);t.push("Value: ["+(o.state_==goog.Promise.State_.REJECTED?"REJECTED":"FULFILLED")+"] <"+String(o.result_)+">")}e.stack+="\n\n"+t.join("\n")}},goog.Promise.prototype.removeUnhandledRejection_=function(){if(0=0;s--)r=t.currentTarget=o[s],i=r.fireListeners(n,!0,t)&&i;if(t.propagationStopped_||(r=t.currentTarget=e,i=r.fireListeners(n,!0,t)&&i,t.propagationStopped_||(i=r.fireListeners(n,!1,t)&&i)),o)for(s=0;!t.propagationStopped_&&s0&&egoog.Timer.MAX_TIMEOUT_?goog.Timer.INVALID_TIMEOUT_ID_:goog.Timer.defaultTimerObject.setTimeout(e,t||0)},goog.Timer.clear=function(e){goog.Timer.defaultTimerObject.clearTimeout(e)},goog.Timer.promise=function(e,t){var o=null;return new goog.Promise(function(n,i){o=goog.Timer.callOnce(function(){n(t)},e),o==goog.Timer.INVALID_TIMEOUT_ID_&&i(Error("Failed to schedule timer."))}).thenCatch(function(e){throw goog.Timer.clear(o),e})},goog.math.Coordinate=function(e,t){this.x=goog.isDef(e)?e:0,this.y=goog.isDef(t)?t:0},goog.math.Coordinate.prototype.clone=function(){return new goog.math.Coordinate(this.x,this.y)},goog.DEBUG&&(goog.math.Coordinate.prototype.toString=function(){return"("+this.x+", "+this.y+")"}),goog.math.Coordinate.equals=function(e,t){return e==t?!0:e&&t?e.x==t.x&&e.y==t.y:!1},goog.math.Coordinate.distance=function(e,t){var o=e.x-t.x,n=e.y-t.y;return Math.sqrt(o*o+n*n)},goog.math.Coordinate.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},goog.math.Coordinate.azimuth=function(e){return goog.math.angle(0,0,e.x,e.y)},goog.math.Coordinate.squaredDistance=function(e,t){var o=e.x-t.x,n=e.y-t.y;return o*o+n*n},goog.math.Coordinate.difference=function(e,t){return new goog.math.Coordinate(e.x-t.x,e.y-t.y)},goog.math.Coordinate.sum=function(e,t){return new goog.math.Coordinate(e.x+t.x,e.y+t.y)},goog.math.Coordinate.prototype.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},goog.math.Coordinate.prototype.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},goog.math.Coordinate.prototype.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},goog.math.Coordinate.prototype.translate=function(e,t){return e instanceof goog.math.Coordinate?(this.x+=e.x,this.y+=e.y):(this.x+=e,goog.isNumber(t)&&(this.y+=t)),this},goog.math.Coordinate.prototype.scale=function(e,t){var o=goog.isNumber(t)?t:e;return this.x*=e,this.y*=o,this},goog.math.Coordinate.prototype.rotateRadians=function(e,t){var o=t||new goog.math.Coordinate(0,0),n=this.x,i=this.y,r=Math.cos(e),s=Math.sin(e);this.x=(n-o.x)*r-(i-o.y)*s+o.x,this.y=(n-o.x)*s+(i-o.y)*r+o.y},goog.math.Coordinate.prototype.rotateDegrees=function(e,t){this.rotateRadians(goog.math.toRadians(e),t)},goog.math.Box=function(e,t,o,n){this.top=e,this.right=t,this.bottom=o,this.left=n},goog.math.Box.boundingBox=function(){for(var e=new goog.math.Box(arguments[0].y,arguments[0].x,arguments[0].y,arguments[0].x),t=1;t=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom:t.x>=e.left&&t.x<=e.right&&t.y>=e.top&&t.y<=e.bottom:!1},goog.math.Box.relativePositionX=function(e,t){return t.xe.right?t.x-e.right:0},goog.math.Box.relativePositionY=function(e,t){return t.ye.bottom?t.y-e.bottom:0},goog.math.Box.distance=function(e,t){var o=goog.math.Box.relativePositionX(e,t),n=goog.math.Box.relativePositionY(e,t);return Math.sqrt(o*o+n*n)},goog.math.Box.intersects=function(e,t){return e.left<=t.right&&t.left<=e.right&&e.top<=t.bottom&&t.top<=e.bottom},goog.math.Box.intersectsWithPadding=function(e,t,o){return e.left<=t.right+o&&t.left<=e.right+o&&e.top<=t.bottom+o&&t.top<=e.bottom+o},goog.math.Box.prototype.ceil=function(){return this.top=Math.ceil(this.top),this.right=Math.ceil(this.right),this.bottom=Math.ceil(this.bottom),this.left=Math.ceil(this.left),this},goog.math.Box.prototype.floor=function(){return this.top=Math.floor(this.top),this.right=Math.floor(this.right),this.bottom=Math.floor(this.bottom),this.left=Math.floor(this.left),this},goog.math.Box.prototype.round=function(){return this.top=Math.round(this.top),this.right=Math.round(this.right),this.bottom=Math.round(this.bottom),this.left=Math.round(this.left),this},goog.math.Box.prototype.translate=function(e,t){return e instanceof goog.math.Coordinate?(this.left+=e.x,this.right+=e.x,this.top+=e.y,this.bottom+=e.y):(this.left+=e,this.right+=e,goog.isNumber(t)&&(this.top+=t,this.bottom+=t)),this},goog.math.Box.prototype.scale=function(e,t){var o=goog.isNumber(t)?t:e;return this.left*=e,this.right*=e,this.top*=o,this.bottom*=o,this},goog.math.Rect=function(e,t,o,n){this.left=e,this.top=t,this.width=o,this.height=n},goog.math.Rect.prototype.clone=function(){return new goog.math.Rect(this.left,this.top,this.width,this.height)},goog.math.Rect.prototype.toBox=function(){return new goog.math.Box(this.top,this.left+this.width,this.top+this.height,this.left)},goog.math.Rect.createFromBox=function(e){return new goog.math.Rect(e.left,e.top,e.right-e.left,e.bottom-e.top)},goog.DEBUG&&(goog.math.Rect.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"}),goog.math.Rect.equals=function(e,t){return e==t?!0:e&&t?e.left==t.left&&e.width==t.width&&e.top==t.top&&e.height==t.height:!1},goog.math.Rect.prototype.intersection=function(e){var t=Math.max(this.left,e.left),o=Math.min(this.left+this.width,e.left+e.width);if(o>=t){var n=Math.max(this.top,e.top);if(e=Math.min(this.top+this.height,e.top+e.height),e>=n)return this.left=t,this.top=n,this.width=o-t,this.height=e-n,!0}return!1},goog.math.Rect.intersection=function(e,t){var o=Math.max(e.left,t.left),n=Math.min(e.left+e.width,t.left+t.width);if(n>=o){var i=Math.max(e.top,t.top),r=Math.min(e.top+e.height,t.top+t.height);if(r>=i)return new goog.math.Rect(o,i,n-o,r-i)}return null},goog.math.Rect.intersects=function(e,t){return e.left<=t.left+t.width&&t.left<=e.left+e.width&&e.top<=t.top+t.height&&t.top<=e.top+e.height},goog.math.Rect.prototype.intersects=function(e){return goog.math.Rect.intersects(this,e)},goog.math.Rect.difference=function(e,t){var o=goog.math.Rect.intersection(e,t);if(!o||!o.height||!o.width)return[e.clone()];var o=[],n=e.top,i=e.height,r=e.left+e.width,s=e.top+e.height,l=t.left+t.width,a=t.top+t.height;return t.top>e.top&&(o.push(new goog.math.Rect(e.left,e.top,e.width,t.top-e.top)),n=t.top,i-=t.top-e.top),s>a&&(o.push(new goog.math.Rect(e.left,a,e.width,s-a)),i=a-n),t.left>e.left&&o.push(new goog.math.Rect(e.left,n,t.left-e.left,i)),r>l&&o.push(new goog.math.Rect(l,n,r-l,i)),o},goog.math.Rect.prototype.difference=function(e){return goog.math.Rect.difference(this,e)},goog.math.Rect.prototype.boundingRect=function(e){var t=Math.max(this.left+this.width,e.left+e.width),o=Math.max(this.top+this.height,e.top+e.height);this.left=Math.min(this.left,e.left),this.top=Math.min(this.top,e.top),this.width=t-this.left,this.height=o-this.top},goog.math.Rect.boundingRect=function(e,t){if(!e||!t)return null;var o=e.clone();return o.boundingRect(t),o},goog.math.Rect.prototype.contains=function(e){return e instanceof goog.math.Rect?this.left<=e.left&&this.left+this.width>=e.left+e.width&&this.top<=e.top&&this.top+this.height>=e.top+e.height:e.x>=this.left&&e.x<=this.left+this.width&&e.y>=this.top&&e.y<=this.top+this.height},goog.math.Rect.prototype.squaredDistance=function(e){var t=e.x]/.test(e),"Forbidden characters in style string: "+e)},goog.html.SafeStyle.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_},goog.DEBUG&&(goog.html.SafeStyle.prototype.toString=function(){return"SafeStyle{"+this.privateDoNotAccessOrElseSafeStyleWrappedValue_+"}"}),goog.html.SafeStyle.unwrap=function(e){return e instanceof goog.html.SafeStyle&&e.constructor===goog.html.SafeStyle&&e.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeStyleWrappedValue_:(goog.asserts.fail("expected object of type SafeStyle, got '"+e+"'"),"type_error:SafeStyle")},goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.SafeStyle;return t.privateDoNotAccessOrElseSafeStyleWrappedValue_=e,t},goog.html.SafeStyle.EMPTY=goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(""),goog.html.SafeStyle.INNOCUOUS_STRING="zClosurez",goog.html.SafeStyle.create=function(e){var t,o="";for(t in e){if(!/^[-_a-zA-Z0-9]+$/.test(t))throw Error("Name allows only [-_a-zA-Z0-9], got: "+t);var n=e[t];null!=n&&(n instanceof goog.string.Const?(n=goog.string.Const.unwrap(n),goog.asserts.assert(!/[{;}]/.test(n),"Value does not allow [{;}].")):goog.html.SafeStyle.VALUE_RE_.test(n)||(goog.asserts.fail("String value allows only [-.%_!# a-zA-Z0-9], got: "+n),n=goog.html.SafeStyle.INNOCUOUS_STRING),o+=t+":"+n+";")}return o?(goog.html.SafeStyle.checkStyle_(o),goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(o)):goog.html.SafeStyle.EMPTY},goog.html.SafeStyle.VALUE_RE_=/^[-.%_!# a-zA-Z0-9]+$/,goog.html.SafeStyle.concat=function(){var e="",t=function(o){goog.isArray(o)?goog.array.forEach(o,t):e+=goog.html.SafeStyle.unwrap(o)};return goog.array.forEach(arguments,t),e?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(e):goog.html.SafeStyle.EMPTY},goog.i18n={},goog.i18n.bidi={},goog.i18n.bidi.FORCE_RTL=!1,goog.i18n.bidi.IS_RTL=goog.i18n.bidi.FORCE_RTL||("ar"==goog.LOCALE.substring(0,2).toLowerCase()||"fa"==goog.LOCALE.substring(0,2).toLowerCase()||"he"==goog.LOCALE.substring(0,2).toLowerCase()||"iw"==goog.LOCALE.substring(0,2).toLowerCase()||"ps"==goog.LOCALE.substring(0,2).toLowerCase()||"sd"==goog.LOCALE.substring(0,2).toLowerCase()||"ug"==goog.LOCALE.substring(0,2).toLowerCase()||"ur"==goog.LOCALE.substring(0,2).toLowerCase()||"yi"==goog.LOCALE.substring(0,2).toLowerCase())&&(2==goog.LOCALE.length||"-"==goog.LOCALE.substring(2,3)||"_"==goog.LOCALE.substring(2,3))||3<=goog.LOCALE.length&&"ckb"==goog.LOCALE.substring(0,3).toLowerCase()&&(3==goog.LOCALE.length||"-"==goog.LOCALE.substring(3,4)||"_"==goog.LOCALE.substring(3,4)),goog.i18n.bidi.Format={LRE:"‪",RLE:"‫",PDF:"‬",LRM:"‎",RLM:"‏"},goog.i18n.bidi.Dir={LTR:1,RTL:-1,NEUTRAL:0},goog.i18n.bidi.RIGHT="right",goog.i18n.bidi.LEFT="left",goog.i18n.bidi.I18N_RIGHT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.LEFT:goog.i18n.bidi.RIGHT,goog.i18n.bidi.I18N_LEFT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,goog.i18n.bidi.toDir=function(e,t){return"number"==typeof e?e>0?goog.i18n.bidi.Dir.LTR:0>e?goog.i18n.bidi.Dir.RTL:t?null:goog.i18n.bidi.Dir.NEUTRAL:null==e?null:e?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.ltrChars_="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",goog.i18n.bidi.rtlChars_="֑-߿‏יִ-﷿ﹰ-ﻼ",goog.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g,goog.i18n.bidi.stripHtmlIfNeeded_=function(e,t){return t?e.replace(goog.i18n.bidi.htmlSkipReg_,""):e},goog.i18n.bidi.rtlCharReg_=new RegExp("["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.ltrCharReg_=new RegExp("["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.hasAnyRtl=function(e,t){return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.hasRtlChar=goog.i18n.bidi.hasAnyRtl,goog.i18n.bidi.hasAnyLtr=function(e,t){return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.ltrRe_=new RegExp("^["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlRe_=new RegExp("^["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.isRtlChar=function(e){return goog.i18n.bidi.rtlRe_.test(e)},goog.i18n.bidi.isLtrChar=function(e){return goog.i18n.bidi.ltrRe_.test(e)},goog.i18n.bidi.isNeutralChar=function(e){return!goog.i18n.bidi.isLtrChar(e)&&!goog.i18n.bidi.isRtlChar(e)},goog.i18n.bidi.ltrDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.rtlChars_+"]*["+goog.i18n.bidi.ltrChars_+"]"),goog.i18n.bidi.rtlDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.ltrChars_+"]*["+goog.i18n.bidi.rtlChars_+"]"),goog.i18n.bidi.startsWithRtl=function(e,t){return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlText=goog.i18n.bidi.startsWithRtl,goog.i18n.bidi.startsWithLtr=function(e,t){return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrText=goog.i18n.bidi.startsWithLtr,goog.i18n.bidi.isRequiredLtrRe_=/^http:\/\/.*/,goog.i18n.bidi.isNeutralText=function(e,t){return e=goog.i18n.bidi.stripHtmlIfNeeded_(e,t),goog.i18n.bidi.isRequiredLtrRe_.test(e)||!goog.i18n.bidi.hasAnyLtr(e)&&!goog.i18n.bidi.hasAnyRtl(e)},goog.i18n.bidi.ltrExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.ltrChars_+"][^"+goog.i18n.bidi.rtlChars_+"]*$"),goog.i18n.bidi.rtlExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.rtlChars_+"][^"+goog.i18n.bidi.ltrChars_+"]*$"),goog.i18n.bidi.endsWithLtr=function(e,t){return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isLtrExitText=goog.i18n.bidi.endsWithLtr,goog.i18n.bidi.endsWithRtl=function(e,t){return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(e,t))},goog.i18n.bidi.isRtlExitText=goog.i18n.bidi.endsWithRtl,goog.i18n.bidi.rtlLocalesRe_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,goog.i18n.bidi.isRtlLanguage=function(e){return goog.i18n.bidi.rtlLocalesRe_.test(e)},goog.i18n.bidi.bracketGuardHtmlRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?(>)+)/g,goog.i18n.bidi.bracketGuardTextRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g,goog.i18n.bidi.guardBracketInHtml=function(e,t){return(void 0===t?goog.i18n.bidi.hasAnyRtl(e):t)?e.replace(goog.i18n.bidi.bracketGuardHtmlRe_,"$&"):e.replace(goog.i18n.bidi.bracketGuardHtmlRe_,"$&")},goog.i18n.bidi.guardBracketInText=function(e,t){var o=(void 0===t?goog.i18n.bidi.hasAnyRtl(e):t)?goog.i18n.bidi.Format.RLM:goog.i18n.bidi.Format.LRM;return e.replace(goog.i18n.bidi.bracketGuardTextRe_,o+"$&"+o)},goog.i18n.bidi.enforceRtlInHtml=function(e){return"<"==e.charAt(0)?e.replace(/<\w+/,"$& dir=rtl"):"\n"+e+""},goog.i18n.bidi.enforceRtlInText=function(e){return goog.i18n.bidi.Format.RLE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.enforceLtrInHtml=function(e){return"<"==e.charAt(0)?e.replace(/<\w+/,"$& dir=ltr"):"\n"+e+""},goog.i18n.bidi.enforceLtrInText=function(e){return goog.i18n.bidi.Format.LRE+e+goog.i18n.bidi.Format.PDF},goog.i18n.bidi.dimensionsRe_=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g,goog.i18n.bidi.leftRe_=/left/gi,goog.i18n.bidi.rightRe_=/right/gi,goog.i18n.bidi.tempRe_=/%%%%/g,goog.i18n.bidi.mirrorCSS=function(e){return e.replace(goog.i18n.bidi.dimensionsRe_,":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_,"%%%%").replace(goog.i18n.bidi.rightRe_,goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_,goog.i18n.bidi.RIGHT)},goog.i18n.bidi.doubleQuoteSubstituteRe_=/([\u0591-\u05f2])"/g,goog.i18n.bidi.singleQuoteSubstituteRe_=/([\u0591-\u05f2])'/g,goog.i18n.bidi.normalizeHebrewQuote=function(e){return e.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_,"$1״").replace(goog.i18n.bidi.singleQuoteSubstituteRe_,"$1׳")},goog.i18n.bidi.wordSeparatorRe_=/\s+/,goog.i18n.bidi.hasNumeralsRe_=/\d/,goog.i18n.bidi.rtlDetectionThreshold_=.4,goog.i18n.bidi.estimateDirection=function(e,t){for(var o=0,n=0,i=!1,r=goog.i18n.bidi.stripHtmlIfNeeded_(e,t).split(goog.i18n.bidi.wordSeparatorRe_),s=0;sgoog.i18n.bidi.rtlDetectionThreshold_?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR},goog.i18n.bidi.detectRtlDirectionality=function(e,t){return goog.i18n.bidi.estimateDirection(e,t)==goog.i18n.bidi.Dir.RTL},goog.i18n.bidi.setElementDirAndAlign=function(e,t){e&&(t=goog.i18n.bidi.toDir(t))&&(e.style.textAlign=t==goog.i18n.bidi.Dir.RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,e.dir=t==goog.i18n.bidi.Dir.RTL?"rtl":"ltr")},goog.i18n.bidi.DirectionalString=function(){},goog.html.SafeUrl=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="",this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.SafeUrl.INNOCUOUS_STRING="about:invalid#zClosurez",goog.html.SafeUrl.prototype.implementsGoogStringTypedString=!0,goog.html.SafeUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_},goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.DEBUG&&(goog.html.SafeUrl.prototype.toString=function(){return"SafeUrl{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"}),goog.html.SafeUrl.unwrap=function(e){return e instanceof goog.html.SafeUrl&&e.constructor===goog.html.SafeUrl&&e.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeHtmlWrappedValue_:(goog.asserts.fail("expected object of type SafeUrl, got '"+e+"'"),"type_error:SafeUrl")},goog.html.SafeUrl.fromConstant=function(e){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.SAFE_URL_PATTERN_=/^(?:(?:https?|mailto):|[^&:/?#]*(?:[/?#]|$))/i,goog.html.SafeUrl.sanitize=function(e){return e instanceof goog.html.SafeUrl?e:(e=e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),e=goog.html.SAFE_URL_PATTERN_.test(e)?goog.html.SafeUrl.normalize_(e):goog.html.SafeUrl.INNOCUOUS_STRING,goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e))},goog.html.SafeUrl.normalize_=function(e){try{var t=encodeURI(e)}catch(o){return goog.html.SafeUrl.INNOCUOUS_STRING}return t.replace(goog.html.SafeUrl.NORMALIZE_MATCHER_,function(e){return goog.html.SafeUrl.NORMALIZE_REPLACER_MAP_[e]})},goog.html.SafeUrl.NORMALIZE_MATCHER_=/[()']|%5B|%5D|%25/g,goog.html.SafeUrl.NORMALIZE_REPLACER_MAP_={"'":"%27","(":"%28",")":"%29","%5B":"[","%5D":"]","%25":"%"},goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.SafeUrl;return t.privateDoNotAccessOrElseSafeHtmlWrappedValue_=e,t},goog.html.TrustedResourceUrl=function(){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_="",this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_},goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString=!0,goog.html.TrustedResourceUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_},goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.TrustedResourceUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR},goog.DEBUG&&(goog.html.TrustedResourceUrl.prototype.toString=function(){return"TrustedResourceUrl{"+this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+"}"}),goog.html.TrustedResourceUrl.unwrap=function(e){return e instanceof goog.html.TrustedResourceUrl&&e.constructor===goog.html.TrustedResourceUrl&&e.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_:(goog.asserts.fail("expected object of type TrustedResourceUrl, got '"+e+"'"),"type_error:TrustedResourceUrl")},goog.html.TrustedResourceUrl.fromConstant=function(e){return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(e))},goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse=function(e){var t=new goog.html.TrustedResourceUrl;return t.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=e,t},goog.html.SafeHtml=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="",this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_,this.dir_=null},goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString=!0,goog.html.SafeHtml.prototype.getDirection=function(){return this.dir_},goog.html.SafeHtml.prototype.implementsGoogStringTypedString=!0,goog.html.SafeHtml.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_},goog.DEBUG&&(goog.html.SafeHtml.prototype.toString=function(){return"SafeHtml{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"}),goog.html.SafeHtml.unwrap=function(e){return e instanceof goog.html.SafeHtml&&e.constructor===goog.html.SafeHtml&&e.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_?e.privateDoNotAccessOrElseSafeHtmlWrappedValue_:(goog.asserts.fail("expected object of type SafeHtml, got '"+e+"'"),"type_error:SafeHtml")},goog.html.SafeHtml.htmlEscape=function(e){if(e instanceof goog.html.SafeHtml)return e;var t=null;return e.implementsGoogI18nBidiDirectionalString&&(t=e.getDirection()),e=e.implementsGoogStringTypedString?e.getTypedStringValue():String(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.htmlEscape(e),t)},goog.html.SafeHtml.htmlEscapePreservingNewlines=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.newLineToBr(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces=function(e){return e instanceof goog.html.SafeHtml?e:(e=goog.html.SafeHtml.htmlEscape(e),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.whitespaceEscape(goog.html.SafeHtml.unwrap(e)),e.getDirection()))},goog.html.SafeHtml.from=goog.html.SafeHtml.htmlEscape,goog.html.SafeHtml.VALID_NAMES_IN_TAG_=/^[a-zA-Z0-9-]+$/,goog.html.SafeHtml.URL_ATTRIBUTES_=goog.object.createSet("action","cite","data","formaction","href","manifest","poster","src"),goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_=goog.object.createSet("embed","iframe","link","script","style","template"),goog.html.SafeHtml.create=function(e,t,o){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(e))throw Error("Invalid tag name <"+e+">.");if(e.toLowerCase()in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_)throw Error("Tag name <"+e+"> is not allowed for SafeHtml.");return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(e,t,o)},goog.html.SafeHtml.getAttrNameAndValue_=function(e,t,o){if(o instanceof goog.string.Const)o=goog.string.Const.unwrap(o);else if("style"==t.toLowerCase())o=goog.html.SafeHtml.getStyleValue_(o);else{if(/^on/i.test(t))throw Error('Attribute "'+t+'" requires goog.string.Const value, "'+o+'" given.');if(t.toLowerCase()in goog.html.SafeHtml.URL_ATTRIBUTES_)if(o instanceof goog.html.TrustedResourceUrl)o=goog.html.TrustedResourceUrl.unwrap(o);else{if(!(o instanceof goog.html.SafeUrl))throw Error('Attribute "'+t+'" on tag "'+e+'" requires goog.html.SafeUrl or goog.string.Const value, "'+o+'" given.');o=goog.html.SafeUrl.unwrap(o)}}return o.implementsGoogStringTypedString&&(o=o.getTypedStringValue()),goog.asserts.assert(goog.isString(o)||goog.isNumber(o),"String or number value expected, got "+typeof o+" with value: "+o),t+'="'+goog.string.htmlEscape(String(o))+'"'},goog.html.SafeHtml.getStyleValue_=function(e){if(!goog.isObject(e))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof e+" given: "+e);return e instanceof goog.html.SafeStyle||(e=goog.html.SafeStyle.create(e)),goog.html.SafeStyle.unwrap(e)},goog.html.SafeHtml.createWithDir=function(e,t,o,n){return t=goog.html.SafeHtml.create(t,o,n),t.dir_=e,t},goog.html.SafeHtml.concat=function(){var e=goog.i18n.bidi.Dir.NEUTRAL,t="",o=function(n){goog.isArray(n)?goog.array.forEach(n,o):(n=goog.html.SafeHtml.htmlEscape(n),t+=goog.html.SafeHtml.unwrap(n),n=n.getDirection(),e==goog.i18n.bidi.Dir.NEUTRAL?e=n:n!=goog.i18n.bidi.Dir.NEUTRAL&&e!=n&&(e=null))};return goog.array.forEach(arguments,o),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(t,e)},goog.html.SafeHtml.concatWithDir=function(e){var t=goog.html.SafeHtml.concat(goog.array.slice(arguments,1));return t.dir_=e,t},goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={},goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse=function(e,t){var o=new goog.html.SafeHtml;return o.privateDoNotAccessOrElseSafeHtmlWrappedValue_=e,o.dir_=t,o},goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse=function(e,t,o){var n=null,i="<"+e;if(t)for(var r in t){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(r))throw Error('Invalid attribute name "'+r+'".');var s=t[r];goog.isDefAndNotNull(s)&&(i+=" "+goog.html.SafeHtml.getAttrNameAndValue_(e,r,s))}return goog.isDef(o)?goog.isArray(o)||(o=[o]):o=[],goog.dom.tags.isVoidTag(e.toLowerCase())?(goog.asserts.assert(!o.length,"Void tag <"+e+"> does not allow content."),i+=">"):(n=goog.html.SafeHtml.concat(o),i+=">"+goog.html.SafeHtml.unwrap(n)+"",n=n.getDirection()),(e=t&&t.dir)&&(n=/^(ltr|rtl|auto)$/i.test(e)?goog.i18n.bidi.Dir.NEUTRAL:null),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(i,n)},goog.html.SafeHtml.EMPTY=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("",goog.i18n.bidi.Dir.NEUTRAL),goog.dom.safe={},goog.dom.safe.setInnerHtml=function(e,t){e.innerHTML=goog.html.SafeHtml.unwrap(t)},goog.dom.safe.setOuterHtml=function(e,t){e.outerHTML=goog.html.SafeHtml.unwrap(t)},goog.dom.safe.documentWrite=function(e,t){e.write(goog.html.SafeHtml.unwrap(t))},goog.dom.safe.setAnchorHref=function(e,t){var o;o=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitize(t),e.href=goog.html.SafeUrl.unwrap(o)},goog.dom.safe.setLocationHref=function(e,t){var o;o=t instanceof goog.html.SafeUrl?t:goog.html.SafeUrl.sanitize(t),e.href=goog.html.SafeUrl.unwrap(o)},goog.dom.ASSUME_QUIRKS_MODE=!1,goog.dom.ASSUME_STANDARDS_MODE=!1,goog.dom.COMPAT_MODE_KNOWN_=goog.dom.ASSUME_QUIRKS_MODE||goog.dom.ASSUME_STANDARDS_MODE,goog.dom.getDomHelper=function(e){return e?new goog.dom.DomHelper(goog.dom.getOwnerDocument(e)):goog.dom.defaultDomHelper_||(goog.dom.defaultDomHelper_=new goog.dom.DomHelper)},goog.dom.getDocument=function(){return document},goog.dom.getElement=function(e){return goog.dom.getElementHelper_(document,e)},goog.dom.getElementHelper_=function(e,t){return goog.isString(t)?e.getElementById(t):t},goog.dom.getRequiredElement=function(e){return goog.dom.getRequiredElementHelper_(document,e)},goog.dom.getRequiredElementHelper_=function(e,t){goog.asserts.assertString(t);var o=goog.dom.getElementHelper_(e,t);return o=goog.asserts.assertElement(o,"No element found with id: "+t)},goog.dom.$=goog.dom.getElement,goog.dom.getElementsByTagNameAndClass=function(e,t,o){return goog.dom.getElementsByTagNameAndClass_(document,e,t,o)},goog.dom.getElementsByClass=function(e,t){var o=t||document;return goog.dom.canUseQuerySelector_(o)?o.querySelectorAll("."+e):goog.dom.getElementsByTagNameAndClass_(document,"*",e,t)},goog.dom.getElementByClass=function(e,t){var o=t||document,n=null;return(n=goog.dom.canUseQuerySelector_(o)?o.querySelector("."+e):goog.dom.getElementsByTagNameAndClass_(document,"*",e,t)[0])||null},goog.dom.getRequiredElementByClass=function(e,t){var o=goog.dom.getElementByClass(e,t);return goog.asserts.assert(o,"No element found with className: "+e)},goog.dom.canUseQuerySelector_=function(e){return!(!e.querySelectorAll||!e.querySelector)},goog.dom.getElementsByTagNameAndClass_=function(e,t,o,n){if(e=n||e,t=t&&"*"!=t?t.toUpperCase():"",goog.dom.canUseQuerySelector_(e)&&(t||o))return e.querySelectorAll(t+(o?"."+o:""));if(o&&e.getElementsByClassName){if(e=e.getElementsByClassName(o),t){n={};for(var i,r=0,s=0;i=e[s];s++)t==i.nodeName&&(n[r++]=i);return n.length=r,n}return e}if(e=e.getElementsByTagName(t||"*"),o){for(n={},s=r=0;i=e[s];s++)t=i.className,"function"==typeof t.split&&goog.array.contains(t.split(/\s+/),o)&&(n[r++]=i);return n.length=r,n}return e},goog.dom.$$=goog.dom.getElementsByTagNameAndClass,goog.dom.setProperties=function(e,t){goog.object.forEach(t,function(t,o){"style"==o?e.style.cssText=t:"class"==o?e.className=t:"for"==o?e.htmlFor=t:o in goog.dom.DIRECT_ATTRIBUTE_MAP_?e.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[o],t):goog.string.startsWith(o,"aria-")||goog.string.startsWith(o,"data-")?e.setAttribute(o,t):e[o]=t})},goog.dom.DIRECT_ATTRIBUTE_MAP_={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},goog.dom.getViewportSize=function(e){return goog.dom.getViewportSize_(e||window)},goog.dom.getViewportSize_=function(e){return e=e.document,e=goog.dom.isCss1CompatMode_(e)?e.documentElement:e.body,new goog.math.Size(e.clientWidth,e.clientHeight)},goog.dom.getDocumentHeight=function(){return goog.dom.getDocumentHeight_(window)},goog.dom.getDocumentHeight_=function(e){var t=e.document,o=0;if(t){var o=t.body,n=t.documentElement;if(!n||!o)return 0;if(e=goog.dom.getViewportSize_(e).height,goog.dom.isCss1CompatMode_(t)&&n.scrollHeight)o=n.scrollHeight!=e?n.scrollHeight:n.offsetHeight;else{var t=n.scrollHeight,i=n.offsetHeight;n.clientHeight!=i&&(t=o.scrollHeight,i=o.offsetHeight),o=t>e?t>i?t:i:i>t?t:i}}return o},goog.dom.getPageScroll=function(e){return goog.dom.getDomHelper((e||goog.global||window).document).getDocumentScroll()},goog.dom.getDocumentScroll=function(){return goog.dom.getDocumentScroll_(document)},goog.dom.getDocumentScroll_=function(e){var t=goog.dom.getDocumentScrollElement_(e);return e=goog.dom.getWindow_(e),goog.userAgent.IE&&goog.userAgent.isVersionOrHigher("10")&&e.pageYOffset!=t.scrollTop?new goog.math.Coordinate(t.scrollLeft,t.scrollTop):new goog.math.Coordinate(e.pageXOffset||t.scrollLeft,e.pageYOffset||t.scrollTop)},goog.dom.getDocumentScrollElement=function(){return goog.dom.getDocumentScrollElement_(document)},goog.dom.getDocumentScrollElement_=function(e){return!goog.userAgent.WEBKIT&&goog.dom.isCss1CompatMode_(e)?e.documentElement:e.body||e.documentElement},goog.dom.getWindow=function(e){return e?goog.dom.getWindow_(e):window},goog.dom.getWindow_=function(e){return e.parentWindow||e.defaultView},goog.dom.createDom=function(){return goog.dom.createDom_(document,arguments)},goog.dom.createDom_=function(e,t){var o=t[0],n=t[1];if(!goog.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES&&n&&(n.name||n.type)){if(o=["<",o],n.name&&o.push(' name="',goog.string.htmlEscape(n.name),'"'),n.type){o.push(' type="',goog.string.htmlEscape(n.type),'"');var i={};goog.object.extend(i,n),delete i.type,n=i}o.push(">"),o=o.join("")}return o=e.createElement(o),n&&(goog.isString(n)?o.className=n:goog.isArray(n)?o.className=n.join(" "):goog.dom.setProperties(o,n)),2"],r=0;o>r;r++)i.push(n?"
    ":"");for(i.push(""),i=i.join(""),o=["
     
    "],r=0;t>r;r++)o.push(i);return o.push("
    "),e=e.createElement(goog.dom.TagName.DIV),e.innerHTML=o.join(""),e.removeChild(e.firstChild)},goog.dom.safeHtmlToNode=function(e){return goog.dom.safeHtmlToNode_(document,e)},goog.dom.safeHtmlToNode_=function(e,t){var o=e.createElement("div");return goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT?(goog.dom.safe.setInnerHtml(o,goog.html.SafeHtml.concat(goog.html.SafeHtml.create("br"),t)),o.removeChild(o.firstChild)):goog.dom.safe.setInnerHtml(o,t),goog.dom.childrenToNode_(e,o)},goog.dom.htmlToDocumentFragment=function(e){return goog.dom.htmlToDocumentFragment_(document,e)},goog.dom.htmlToDocumentFragment_=function(e,t){var o=e.createElement("div");return goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT?(o.innerHTML="
    "+t,o.removeChild(o.firstChild)):o.innerHTML=t,goog.dom.childrenToNode_(e,o)},goog.dom.childrenToNode_=function(e,t){if(1==t.childNodes.length)return t.removeChild(t.firstChild);for(var o=e.createDocumentFragment();t.firstChild;)o.appendChild(t.firstChild);return o},goog.dom.isCss1CompatMode=function(){return goog.dom.isCss1CompatMode_(document)},goog.dom.isCss1CompatMode_=function(e){return goog.dom.COMPAT_MODE_KNOWN_?goog.dom.ASSUME_STANDARDS_MODE:"CSS1Compat"==e.compatMode},goog.dom.canHaveChildren=function(e){if(e.nodeType!=goog.dom.NodeType.ELEMENT)return!1;switch(e.tagName){case goog.dom.TagName.APPLET:case goog.dom.TagName.AREA:case goog.dom.TagName.BASE:case goog.dom.TagName.BR:case goog.dom.TagName.COL:case goog.dom.TagName.COMMAND:case goog.dom.TagName.EMBED:case goog.dom.TagName.FRAME:case goog.dom.TagName.HR:case goog.dom.TagName.IMG:case goog.dom.TagName.INPUT:case goog.dom.TagName.IFRAME:case goog.dom.TagName.ISINDEX:case goog.dom.TagName.KEYGEN:case goog.dom.TagName.LINK:case goog.dom.TagName.NOFRAMES:case goog.dom.TagName.NOSCRIPT:case goog.dom.TagName.META:case goog.dom.TagName.OBJECT:case goog.dom.TagName.PARAM:case goog.dom.TagName.SCRIPT:case goog.dom.TagName.SOURCE:case goog.dom.TagName.STYLE:case goog.dom.TagName.TRACK:case goog.dom.TagName.WBR:return!1}return!0},goog.dom.appendChild=function(e,t){e.appendChild(t)},goog.dom.append=function(e){goog.dom.append_(goog.dom.getOwnerDocument(e),e,arguments,1)},goog.dom.removeChildren=function(e){for(var t;t=e.firstChild;)e.removeChild(t)},goog.dom.insertSiblingBefore=function(e,t){t.parentNode&&t.parentNode.insertBefore(e,t)},goog.dom.insertSiblingAfter=function(e,t){t.parentNode&&t.parentNode.insertBefore(e,t.nextSibling)},goog.dom.insertChildAt=function(e,t,o){e.insertBefore(t,e.childNodes[o]||null)},goog.dom.removeNode=function(e){return e&&e.parentNode?e.parentNode.removeChild(e):null},goog.dom.replaceNode=function(e,t){var o=t.parentNode;o&&o.replaceChild(e,t)},goog.dom.flattenElement=function(e){var t,o=e.parentNode;if(o&&o.nodeType!=goog.dom.NodeType.DOCUMENT_FRAGMENT){if(e.removeNode)return e.removeNode(!1);for(;t=e.firstChild;)o.insertBefore(t,e);return goog.dom.removeNode(e)}},goog.dom.getChildren=function(e){return goog.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE&&void 0!=e.children?e.children:goog.array.filter(e.childNodes,function(e){return e.nodeType==goog.dom.NodeType.ELEMENT})},goog.dom.getFirstElementChild=function(e){return void 0!=e.firstElementChild?e.firstElementChild:goog.dom.getNextElementNode_(e.firstChild,!0)},goog.dom.getLastElementChild=function(e){return void 0!=e.lastElementChild?e.lastElementChild:goog.dom.getNextElementNode_(e.lastChild,!1)},goog.dom.getNextElementSibling=function(e){return void 0!=e.nextElementSibling?e.nextElementSibling:goog.dom.getNextElementNode_(e.nextSibling,!0)},goog.dom.getPreviousElementSibling=function(e){return void 0!=e.previousElementSibling?e.previousElementSibling:goog.dom.getNextElementNode_(e.previousSibling,!1)},goog.dom.getNextElementNode_=function(e,t){for(;e&&e.nodeType!=goog.dom.NodeType.ELEMENT;)e=t?e.nextSibling:e.previousSibling;return e},goog.dom.getNextNode=function(e){if(!e)return null;if(e.firstChild)return e.firstChild;for(;e&&!e.nextSibling;)e=e.parentNode;return e?e.nextSibling:null},goog.dom.getPreviousNode=function(e){if(!e)return null;if(!e.previousSibling)return e.parentNode;for(e=e.previousSibling;e&&e.lastChild;)e=e.lastChild;return e},goog.dom.isNodeLike=function(e){return goog.isObject(e)&&0e;e++){for(var i=[],r=arguments[e];r;)i.unshift(r),r=r.parentNode;o.push(i),n=Math.min(n,i.length)}for(i=null,e=0;n>e;e++){for(var r=o[0][e],s=1;t>s;s++)if(r!=o[s][e])return i;i=r}return i},goog.dom.getOwnerDocument=function(e){return goog.asserts.assert(e,"Node cannot be null or undefined."),e.nodeType==goog.dom.NodeType.DOCUMENT?e:e.ownerDocument||e.document},goog.dom.getFrameContentDocument=function(e){return e.contentDocument||e.contentWindow.document},goog.dom.getFrameContentWindow=function(e){return e.contentWindow||goog.dom.getWindow(goog.dom.getFrameContentDocument(e))},goog.dom.setTextContent=function(e,t){if(goog.asserts.assert(null!=e,"goog.dom.setTextContent expects a non-null value for node"),"textContent"in e)e.textContent=t;else if(e.nodeType==goog.dom.NodeType.TEXT)e.data=t;else if(e.firstChild&&e.firstChild.nodeType==goog.dom.NodeType.TEXT){for(;e.lastChild!=e.firstChild;)e.removeChild(e.lastChild);e.firstChild.data=t}else{goog.dom.removeChildren(e);var o=goog.dom.getOwnerDocument(e);e.appendChild(o.createTextNode(String(t)))}},goog.dom.getOuterHtml=function(e){if("outerHTML"in e)return e.outerHTML;var t=goog.dom.getOwnerDocument(e).createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML},goog.dom.findNode=function(e,t){var o=[];return goog.dom.findNodes_(e,t,o,!0)?o[0]:void 0},goog.dom.findNodes=function(e,t){var o=[];return goog.dom.findNodes_(e,t,o,!1),o},goog.dom.findNodes_=function(e,t,o,n){if(null!=e)for(e=e.firstChild;e;){if(t(e)&&(o.push(e),n)||goog.dom.findNodes_(e,t,o,n))return!0;e=e.nextSibling}return!1},goog.dom.TAGS_TO_IGNORE_={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},goog.dom.PREDEFINED_TAG_VALUES_={IMG:" ",BR:"\n"},goog.dom.isFocusableTabIndex=function(e){return goog.dom.hasSpecifiedTabIndex_(e)&&goog.dom.isTabIndexFocusable_(e)},goog.dom.setFocusableTabIndex=function(e,t){t?e.tabIndex=0:(e.tabIndex=-1,e.removeAttribute("tabIndex"))},goog.dom.isFocusable=function(e){var t;return(t=goog.dom.nativelySupportsFocus_(e)?!e.disabled&&(!goog.dom.hasSpecifiedTabIndex_(e)||goog.dom.isTabIndexFocusable_(e)):goog.dom.isFocusableTabIndex(e))&&goog.userAgent.IE?goog.dom.hasNonZeroBoundingRect_(e):t},goog.dom.hasSpecifiedTabIndex_=function(e){return e=e.getAttributeNode("tabindex"),goog.isDefAndNotNull(e)&&e.specified},goog.dom.isTabIndexFocusable_=function(e){return e=e.tabIndex,goog.isNumber(e)&&e>=0&&32768>e},goog.dom.nativelySupportsFocus_=function(e){return e.tagName==goog.dom.TagName.A||e.tagName==goog.dom.TagName.INPUT||e.tagName==goog.dom.TagName.TEXTAREA||e.tagName==goog.dom.TagName.SELECT||e.tagName==goog.dom.TagName.BUTTON},goog.dom.hasNonZeroBoundingRect_=function(e){return e=goog.isFunction(e.getBoundingClientRect)?e.getBoundingClientRect():{height:e.offsetHeight,width:e.offsetWidth},goog.isDefAndNotNull(e)&&0n;)if(i=e.pop(),!(i.nodeName in goog.dom.TAGS_TO_IGNORE_))if(i.nodeType==goog.dom.NodeType.TEXT)var r=i.nodeValue.replace(/(\r\n|\r|\n)/g,"").replace(/ +/g," "),n=n+r.length;else if(i.nodeName in goog.dom.PREDEFINED_TAG_VALUES_)n+=goog.dom.PREDEFINED_TAG_VALUES_[i.nodeName].length;else for(r=i.childNodes.length-1;r>=0;r--)e.push(i.childNodes[r]);return goog.isObject(o)&&(o.remainder=i?i.nodeValue.length+t-n-1:0,o.node=i),i},goog.dom.isNodeList=function(e){if(e&&"number"==typeof e.length){if(goog.isObject(e))return"function"==typeof e.item||"string"==typeof e.item;if(goog.isFunction(e))return"function"==typeof e.item}return!1},goog.dom.getAncestorByTagNameAndClass=function(e,t,o,n){if(!t&&!o)return null;var i=t?t.toUpperCase():null;return goog.dom.getAncestor(e,function(e){return(!i||e.nodeName==i)&&(!o||goog.isString(e.className)&&goog.array.contains(e.className.split(/\s+/),o))},!0,n)},goog.dom.getAncestorByClass=function(e,t,o){return goog.dom.getAncestorByTagNameAndClass(e,null,t,o)},goog.dom.getAncestor=function(e,t,o,n){o||(e=e.parentNode),o=null==n;for(var i=0;e&&(o||n>=i);){if(t(e))return e;e=e.parentNode,i++}return null},goog.dom.getActiveElement=function(e){try{return e&&e.activeElement}catch(t){}return null},goog.dom.getPixelRatio=function(){var e=goog.dom.getWindow(),t=goog.userAgent.GECKO&&goog.userAgent.MOBILE;return goog.isDef(e.devicePixelRatio)&&!t?e.devicePixelRatio:e.matchMedia?goog.dom.matchesPixelRatio_(.75)||goog.dom.matchesPixelRatio_(1.5)||goog.dom.matchesPixelRatio_(2)||goog.dom.matchesPixelRatio_(3)||1:1},goog.dom.matchesPixelRatio_=function(e){return goog.dom.getWindow().matchMedia("(-webkit-min-device-pixel-ratio: "+e+"),(min--moz-device-pixel-ratio: "+e+"),(min-resolution: "+e+"dppx)").matches?e:0},goog.dom.DomHelper=function(e){this.document_=e||goog.global.document||document},goog.dom.DomHelper.prototype.getDomHelper=goog.dom.getDomHelper,goog.dom.DomHelper.prototype.setDocument=function(e){this.document_=e},goog.dom.DomHelper.prototype.getDocument=function(){return this.document_},goog.dom.DomHelper.prototype.getElement=function(e){return goog.dom.getElementHelper_(this.document_,e)},goog.dom.DomHelper.prototype.getRequiredElement=function(e){return goog.dom.getRequiredElementHelper_(this.document_,e)},goog.dom.DomHelper.prototype.$=goog.dom.DomHelper.prototype.getElement,goog.dom.DomHelper.prototype.getElementsByTagNameAndClass=function(e,t,o){return goog.dom.getElementsByTagNameAndClass_(this.document_,e,t,o)},goog.dom.DomHelper.prototype.getElementsByClass=function(e,t){return goog.dom.getElementsByClass(e,t||this.document_)},goog.dom.DomHelper.prototype.getElementByClass=function(e,t){return goog.dom.getElementByClass(e,t||this.document_)},goog.dom.DomHelper.prototype.getRequiredElementByClass=function(e,t){return goog.dom.getRequiredElementByClass(e,t||this.document_)},goog.dom.DomHelper.prototype.$$=goog.dom.DomHelper.prototype.getElementsByTagNameAndClass,goog.dom.DomHelper.prototype.setProperties=goog.dom.setProperties,goog.dom.DomHelper.prototype.getViewportSize=function(e){return goog.dom.getViewportSize(e||this.getWindow())},goog.dom.DomHelper.prototype.getDocumentHeight=function(){return goog.dom.getDocumentHeight_(this.getWindow())},goog.dom.DomHelper.prototype.createDom=function(){return goog.dom.createDom_(this.document_,arguments)},goog.dom.DomHelper.prototype.$dom=goog.dom.DomHelper.prototype.createDom,goog.dom.DomHelper.prototype.createElement=function(e){return this.document_.createElement(e)},goog.dom.DomHelper.prototype.createTextNode=function(e){return this.document_.createTextNode(String(e))},goog.dom.DomHelper.prototype.createTable=function(e,t,o){return goog.dom.createTable_(this.document_,e,t,!!o)},goog.dom.DomHelper.prototype.safeHtmlToNode=function(e){return goog.dom.safeHtmlToNode_(this.document_,e)},goog.dom.DomHelper.prototype.htmlToDocumentFragment=function(e){return goog.dom.htmlToDocumentFragment_(this.document_,e)},goog.dom.DomHelper.prototype.isCss1CompatMode=function(){return goog.dom.isCss1CompatMode_(this.document_)},goog.dom.DomHelper.prototype.getWindow=function(){return goog.dom.getWindow_(this.document_)},goog.dom.DomHelper.prototype.getDocumentScrollElement=function(){return goog.dom.getDocumentScrollElement_(this.document_)},goog.dom.DomHelper.prototype.getDocumentScroll=function(){return goog.dom.getDocumentScroll_(this.document_)},goog.dom.DomHelper.prototype.getActiveElement=function(e){return goog.dom.getActiveElement(e||this.document_)},goog.dom.DomHelper.prototype.appendChild=goog.dom.appendChild,goog.dom.DomHelper.prototype.append=goog.dom.append,goog.dom.DomHelper.prototype.canHaveChildren=goog.dom.canHaveChildren,goog.dom.DomHelper.prototype.removeChildren=goog.dom.removeChildren,goog.dom.DomHelper.prototype.insertSiblingBefore=goog.dom.insertSiblingBefore,goog.dom.DomHelper.prototype.insertSiblingAfter=goog.dom.insertSiblingAfter,goog.dom.DomHelper.prototype.insertChildAt=goog.dom.insertChildAt,goog.dom.DomHelper.prototype.removeNode=goog.dom.removeNode,goog.dom.DomHelper.prototype.replaceNode=goog.dom.replaceNode,goog.dom.DomHelper.prototype.flattenElement=goog.dom.flattenElement,goog.dom.DomHelper.prototype.getChildren=goog.dom.getChildren,goog.dom.DomHelper.prototype.getFirstElementChild=goog.dom.getFirstElementChild,goog.dom.DomHelper.prototype.getLastElementChild=goog.dom.getLastElementChild,goog.dom.DomHelper.prototype.getNextElementSibling=goog.dom.getNextElementSibling,goog.dom.DomHelper.prototype.getPreviousElementSibling=goog.dom.getPreviousElementSibling,goog.dom.DomHelper.prototype.getNextNode=goog.dom.getNextNode,goog.dom.DomHelper.prototype.getPreviousNode=goog.dom.getPreviousNode,goog.dom.DomHelper.prototype.isNodeLike=goog.dom.isNodeLike,goog.dom.DomHelper.prototype.isElement=goog.dom.isElement,goog.dom.DomHelper.prototype.isWindow=goog.dom.isWindow,goog.dom.DomHelper.prototype.getParentElement=goog.dom.getParentElement,goog.dom.DomHelper.prototype.contains=goog.dom.contains,goog.dom.DomHelper.prototype.compareNodeOrder=goog.dom.compareNodeOrder,goog.dom.DomHelper.prototype.findCommonAncestor=goog.dom.findCommonAncestor,goog.dom.DomHelper.prototype.getOwnerDocument=goog.dom.getOwnerDocument,goog.dom.DomHelper.prototype.getFrameContentDocument=goog.dom.getFrameContentDocument,goog.dom.DomHelper.prototype.getFrameContentWindow=goog.dom.getFrameContentWindow,goog.dom.DomHelper.prototype.setTextContent=goog.dom.setTextContent,goog.dom.DomHelper.prototype.getOuterHtml=goog.dom.getOuterHtml,goog.dom.DomHelper.prototype.findNode=goog.dom.findNode,goog.dom.DomHelper.prototype.findNodes=goog.dom.findNodes,goog.dom.DomHelper.prototype.isFocusableTabIndex=goog.dom.isFocusableTabIndex,goog.dom.DomHelper.prototype.setFocusableTabIndex=goog.dom.setFocusableTabIndex,goog.dom.DomHelper.prototype.isFocusable=goog.dom.isFocusable,goog.dom.DomHelper.prototype.getTextContent=goog.dom.getTextContent,goog.dom.DomHelper.prototype.getNodeTextLength=goog.dom.getNodeTextLength,goog.dom.DomHelper.prototype.getNodeTextOffset=goog.dom.getNodeTextOffset,goog.dom.DomHelper.prototype.getNodeAtOffset=goog.dom.getNodeAtOffset,goog.dom.DomHelper.prototype.isNodeList=goog.dom.isNodeList,goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass=goog.dom.getAncestorByTagNameAndClass,goog.dom.DomHelper.prototype.getAncestorByClass=goog.dom.getAncestorByClass,goog.dom.DomHelper.prototype.getAncestor=goog.dom.getAncestor,goog.dom.vendor={},goog.dom.vendor.getVendorJsPrefix=function(){return goog.userAgent.WEBKIT?"Webkit":goog.userAgent.GECKO?"Moz":goog.userAgent.IE?"ms":goog.userAgent.OPERA?"O":null },goog.dom.vendor.getVendorPrefix=function(){return goog.userAgent.WEBKIT?"-webkit":goog.userAgent.GECKO?"-moz":goog.userAgent.IE?"-ms":goog.userAgent.OPERA?"-o":null},goog.dom.vendor.getPrefixedPropertyName=function(e,t){if(t&&e in t)return e;var o=goog.dom.vendor.getVendorJsPrefix();return o?(o=o.toLowerCase(),o+=goog.string.toTitleCase(e),!goog.isDef(t)||o in t?o:null):null},goog.dom.vendor.getPrefixedEventType=function(e){return((goog.dom.vendor.getVendorJsPrefix()||"")+e).toLowerCase()},goog.style={},goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS=!1,goog.style.setStyle=function(e,t,o){if(goog.isString(t))goog.style.setStyle_(e,o,t);else for(var n in t)goog.style.setStyle_(e,t[n],n)},goog.style.setStyle_=function(e,t,o){(o=goog.style.getVendorJsStyleName_(e,o))&&(e.style[o]=t)},goog.style.getVendorJsStyleName_=function(e,t){var o=goog.string.toCamelCase(t);if(void 0===e.style[o]){var n=goog.dom.vendor.getVendorJsPrefix()+goog.string.toTitleCase(o);if(void 0!==e.style[n])return n}return o},goog.style.getVendorStyleName_=function(e,t){var o=goog.string.toCamelCase(t);return void 0===e.style[o]&&(o=goog.dom.vendor.getVendorJsPrefix()+goog.string.toTitleCase(o),void 0!==e.style[o])?goog.dom.vendor.getVendorPrefix()+"-"+t:t},goog.style.getStyle=function(e,t){var o=e.style[goog.string.toCamelCase(t)];return"undefined"!=typeof o?o:e.style[goog.style.getVendorJsStyleName_(e,t)]||""},goog.style.getComputedStyle=function(e,t){var o=goog.dom.getOwnerDocument(e);return o.defaultView&&o.defaultView.getComputedStyle&&(o=o.defaultView.getComputedStyle(e,null))?o[t]||o.getPropertyValue(t)||"":""},goog.style.getCascadedStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:null},goog.style.getStyle_=function(e,t){return goog.style.getComputedStyle(e,t)||goog.style.getCascadedStyle(e,t)||e.style&&e.style[t]},goog.style.getComputedBoxSizing=function(e){return goog.style.getStyle_(e,"boxSizing")||goog.style.getStyle_(e,"MozBoxSizing")||goog.style.getStyle_(e,"WebkitBoxSizing")||null},goog.style.getComputedPosition=function(e){return goog.style.getStyle_(e,"position")},goog.style.getBackgroundColor=function(e){return goog.style.getStyle_(e,"backgroundColor")},goog.style.getComputedOverflowX=function(e){return goog.style.getStyle_(e,"overflowX")},goog.style.getComputedOverflowY=function(e){return goog.style.getStyle_(e,"overflowY")},goog.style.getComputedZIndex=function(e){return goog.style.getStyle_(e,"zIndex")},goog.style.getComputedTextAlign=function(e){return goog.style.getStyle_(e,"textAlign")},goog.style.getComputedCursor=function(e){return goog.style.getStyle_(e,"cursor")},goog.style.getComputedTransform=function(e){var t=goog.style.getVendorStyleName_(e,"transform");return goog.style.getStyle_(e,t)||goog.style.getStyle_(e,"transform")},goog.style.setPosition=function(e,t,o){var n,i=goog.userAgent.GECKO&&(goog.userAgent.MAC||goog.userAgent.X11)&&goog.userAgent.isVersionOrHigher("1.9");t instanceof goog.math.Coordinate?(n=t.x,t=t.y):(n=t,t=o),e.style.left=goog.style.getPixelStyleValue_(n,i),e.style.top=goog.style.getPixelStyleValue_(t,i)},goog.style.getPosition=function(e){return new goog.math.Coordinate(e.offsetLeft,e.offsetTop)},goog.style.getClientViewportElement=function(e){return e=e?goog.dom.getOwnerDocument(e):goog.dom.getDocument(),!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9)||goog.dom.getDomHelper(e).isCss1CompatMode()?e.documentElement:e.body},goog.style.getViewportPageOffset=function(e){var t=e.body;return e=e.documentElement,new goog.math.Coordinate(t.scrollLeft||e.scrollLeft,t.scrollTop||e.scrollTop)},goog.style.getBoundingClientRect_=function(e){var t;try{t=e.getBoundingClientRect()}catch(o){return{left:0,top:0,right:0,bottom:0}}return goog.userAgent.IE&&e.ownerDocument.body&&(e=e.ownerDocument,t.left-=e.documentElement.clientLeft+e.body.clientLeft,t.top-=e.documentElement.clientTop+e.body.clientTop),t},goog.style.getOffsetParent=function(e){if(goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(8))return e.offsetParent;var t=goog.dom.getOwnerDocument(e),o=goog.style.getStyle_(e,"position"),n="fixed"==o||"absolute"==o;for(e=e.parentNode;e&&e!=t;e=e.parentNode)if(o=goog.style.getStyle_(e,"position"),n=n&&"static"==o&&e!=t.documentElement&&e!=t.body,!n&&(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight||"fixed"==o||"absolute"==o||"relative"==o))return e;return null},goog.style.getVisibleRectForElement=function(e){for(var t=new goog.math.Box(0,1/0,1/0,0),o=goog.dom.getDomHelper(e),n=o.getDocument().body,i=o.getDocument().documentElement,r=o.getDocumentScrollElement();e=goog.style.getOffsetParent(e);)if(!(goog.userAgent.IE&&0==e.clientWidth||goog.userAgent.WEBKIT&&0==e.clientHeight&&e==n)&&e!=n&&e!=i&&"visible"!=goog.style.getStyle_(e,"overflow")){var s=goog.style.getPageOffset(e),l=goog.style.getClientLeftTop(e);s.x+=l.x,s.y+=l.y,t.top=Math.max(t.top,s.y),t.right=Math.min(t.right,s.x+e.clientWidth),t.bottom=Math.min(t.bottom,s.y+e.clientHeight),t.left=Math.max(t.left,s.x)}return n=r.scrollLeft,r=r.scrollTop,t.left=Math.max(t.left,n),t.top=Math.max(t.top,r),o=o.getViewportSize(),t.right=Math.min(t.right,n+o.width),t.bottom=Math.min(t.bottom,r+o.height),0<=t.top&&0<=t.left&&t.bottom>t.top&&t.right>t.left?t:null},goog.style.getContainerOffsetToScrollInto=function(e,t,o){var n=goog.style.getPageOffset(e),i=goog.style.getPageOffset(t),r=goog.style.getBorderBox(t),s=n.x-i.x-r.left,n=n.y-i.y-r.top,i=t.clientWidth-e.offsetWidth;return e=t.clientHeight-e.offsetHeight,r=t.scrollLeft,t=t.scrollTop,o?(r+=s-i/2,t+=n-e/2):(r+=Math.min(s,Math.max(s-i,0)),t+=Math.min(n,Math.max(n-e,0))),new goog.math.Coordinate(r,t)},goog.style.scrollIntoContainerView=function(e,t,o){e=goog.style.getContainerOffsetToScrollInto(e,t,o),t.scrollLeft=e.x,t.scrollTop=e.y},goog.style.getClientLeftTop=function(e){if(goog.userAgent.GECKO&&!goog.userAgent.isVersionOrHigher("1.9")){var t=parseFloat(goog.style.getComputedStyle(e,"borderLeftWidth"));if(goog.style.isRightToLeft(e))var o=e.offsetWidth-e.clientWidth-t-parseFloat(goog.style.getComputedStyle(e,"borderRightWidth")),t=t+o;return new goog.math.Coordinate(t,parseFloat(goog.style.getComputedStyle(e,"borderTopWidth")))}return new goog.math.Coordinate(e.clientLeft,e.clientTop)},goog.style.getPageOffset=function(e){var t,o=goog.dom.getOwnerDocument(e),n=goog.style.getStyle_(e,"position");goog.asserts.assertObject(e,"Parameter is required");var i=!goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS&&goog.userAgent.GECKO&&o.getBoxObjectFor&&!e.getBoundingClientRect&&"absolute"==n&&(t=o.getBoxObjectFor(e))&&(0>t.screenX||0>t.screenY),r=new goog.math.Coordinate(0,0),s=goog.style.getClientViewportElement(o);if(e==s)return r;if(goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS||e.getBoundingClientRect)t=goog.style.getBoundingClientRect_(e),e=goog.dom.getDomHelper(o).getDocumentScroll(),r.x=t.left+e.x,r.y=t.top+e.y;else if(o.getBoxObjectFor&&!i)t=o.getBoxObjectFor(e),e=o.getBoxObjectFor(s),r.x=t.screenX-e.screenX,r.y=t.screenY-e.screenY;else{t=e;do{if(r.x+=t.offsetLeft,r.y+=t.offsetTop,t!=e&&(r.x+=t.clientLeft||0,r.y+=t.clientTop||0),goog.userAgent.WEBKIT&&"fixed"==goog.style.getComputedPosition(t)){r.x+=o.body.scrollLeft,r.y+=o.body.scrollTop;break}t=t.offsetParent}while(t&&t!=e);for((goog.userAgent.OPERA||goog.userAgent.WEBKIT&&"absolute"==n)&&(r.y-=o.body.offsetTop),t=e;(t=goog.style.getOffsetParent(t))&&t!=o.body&&t!=s;)r.x-=t.scrollLeft,goog.userAgent.OPERA&&"TR"==t.tagName||(r.y-=t.scrollTop)}return r},goog.style.getPageOffsetLeft=function(e){return goog.style.getPageOffset(e).x},goog.style.getPageOffsetTop=function(e){return goog.style.getPageOffset(e).y},goog.style.getFramedPageOffset=function(e,t){var o=new goog.math.Coordinate(0,0),n=goog.dom.getWindow(goog.dom.getOwnerDocument(e)),i=e;do{var r=n==t?goog.style.getPageOffset(i):goog.style.getClientPositionForElement_(goog.asserts.assert(i));o.x+=r.x,o.y+=r.y}while(n&&n!=t&&(i=n.frameElement)&&(n=n.parent));return o},goog.style.translateRectForAnotherFrame=function(e,t,o){if(t.getDocument()!=o.getDocument()){var n=t.getDocument().body;o=goog.style.getFramedPageOffset(n,o.getWindow()),o=goog.math.Coordinate.difference(o,goog.style.getPageOffset(n)),!goog.userAgent.IE||goog.userAgent.isDocumentModeOrHigher(9)||t.isCss1CompatMode()||(o=goog.math.Coordinate.difference(o,t.getDocumentScroll())),e.left+=o.x,e.top+=o.y}},goog.style.getRelativePosition=function(e,t){var o=goog.style.getClientPosition(e),n=goog.style.getClientPosition(t);return new goog.math.Coordinate(o.x-n.x,o.y-n.y)},goog.style.getClientPositionForElement_=function(e){var t;if(goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS||e.getBoundingClientRect)t=goog.style.getBoundingClientRect_(e),t=new goog.math.Coordinate(t.left,t.top);else{t=goog.dom.getDomHelper(e).getDocumentScroll();var o=goog.style.getPageOffset(e);t=new goog.math.Coordinate(o.x-t.x,o.y-t.y)}return goog.userAgent.GECKO&&!goog.userAgent.isVersionOrHigher(12)?goog.math.Coordinate.sum(t,goog.style.getCssTranslation(e)):t},goog.style.getClientPosition=function(e){if(goog.asserts.assert(e),e.nodeType==goog.dom.NodeType.ELEMENT)return goog.style.getClientPositionForElement_(e);var t=goog.isFunction(e.getBrowserEvent),o=e;return e.targetTouches&&e.targetTouches.length?o=e.targetTouches[0]:t&&e.getBrowserEvent().targetTouches&&e.getBrowserEvent().targetTouches.length&&(o=e.getBrowserEvent().targetTouches[0]),new goog.math.Coordinate(o.clientX,o.clientY)},goog.style.setPageOffset=function(e,t,o){var n=goog.style.getPageOffset(e);t instanceof goog.math.Coordinate&&(o=t.y,t=t.x),goog.style.setPosition(e,e.offsetLeft+(t-n.x),e.offsetTop+(o-n.y))},goog.style.setSize=function(e,t,o){if(t instanceof goog.math.Size)o=t.height,t=t.width;else if(void 0==o)throw Error("missing height argument");goog.style.setWidth(e,t),goog.style.setHeight(e,o)},goog.style.getPixelStyleValue_=function(e,t){return"number"==typeof e&&(e=(t?Math.round(e):e)+"px"),e},goog.style.setHeight=function(e,t){e.style.height=goog.style.getPixelStyleValue_(t,!0)},goog.style.setWidth=function(e,t){e.style.width=goog.style.getPixelStyleValue_(t,!0)},goog.style.getSize=function(e){return goog.style.evaluateWithTemporaryDisplay_(goog.style.getSizeWithDisplay_,e)},goog.style.evaluateWithTemporaryDisplay_=function(e,t){if("none"!=goog.style.getStyle_(t,"display"))return e(t);var o=t.style,n=o.display,i=o.visibility,r=o.position;o.visibility="hidden",o.position="absolute",o.display="inline";var s=e(t);return o.display=n,o.position=r,o.visibility=i,s},goog.style.getSizeWithDisplay_=function(e){var t=e.offsetWidth,o=e.offsetHeight,n=goog.userAgent.WEBKIT&&!t&&!o;return goog.isDef(t)&&!n||!e.getBoundingClientRect?new goog.math.Size(t,o):(e=goog.style.getBoundingClientRect_(e),new goog.math.Size(e.right-e.left,e.bottom-e.top))},goog.style.getTransformedSize=function(e){return e.getBoundingClientRect?(e=goog.style.evaluateWithTemporaryDisplay_(goog.style.getBoundingClientRect_,e),new goog.math.Size(e.right-e.left,e.bottom-e.top)):null},goog.style.getBounds=function(e){var t=goog.style.getPageOffset(e);return e=goog.style.getSize(e),new goog.math.Rect(t.x,t.y,e.width,e.height)},goog.style.toCamelCase=function(e){return goog.string.toCamelCase(String(e))},goog.style.toSelectorCase=function(e){return goog.string.toSelectorCase(e)},goog.style.getOpacity=function(e){var t=e.style;return e="","opacity"in t?e=t.opacity:"MozOpacity"in t?e=t.MozOpacity:"filter"in t&&(t=t.filter.match(/alpha\(opacity=([\d.]+)\)/))&&(e=String(t[1]/100)),""==e?e:Number(e)},goog.style.setOpacity=function(e,t){var o=e.style;"opacity"in o?o.opacity=t:"MozOpacity"in o?o.MozOpacity=t:"filter"in o&&(o.filter=""===t?"":"alpha(opacity="+100*t+")")},goog.style.setTransparentBackgroundImage=function(e,t){var o=e.style;goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?o.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+t+'", sizingMethod="crop")':(o.backgroundImage="url("+t+")",o.backgroundPosition="top left",o.backgroundRepeat="no-repeat")},goog.style.clearTransparentBackgroundImage=function(e){e=e.style,"filter"in e?e.filter="":e.backgroundImage="none"},goog.style.showElement=function(e,t){goog.style.setElementShown(e,t)},goog.style.setElementShown=function(e,t){e.style.display=t?"":"none"},goog.style.isElementShown=function(e){return"none"!=e.style.display},goog.style.installStyles=function(e,t){var o=goog.dom.getDomHelper(t),n=null,i=o.getDocument();return goog.userAgent.IE&&i.createStyleSheet?(n=i.createStyleSheet(),goog.style.setStyles(n,e)):(i=o.getElementsByTagNameAndClass("head")[0],i||(n=o.getElementsByTagNameAndClass("body")[0],i=o.createDom("head"),n.parentNode.insertBefore(i,n)),n=o.createDom("style"),goog.style.setStyles(n,e),o.appendChild(i,n)),n},goog.style.uninstallStyles=function(e){goog.dom.removeNode(e.ownerNode||e.owningElement||e)},goog.style.setStyles=function(e,t){goog.userAgent.IE&&goog.isDef(e.cssText)?e.cssText=t:e.innerHTML=t},goog.style.setPreWrap=function(e){e=e.style,goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?(e.whiteSpace="pre",e.wordWrap="break-word"):e.whiteSpace=goog.userAgent.GECKO?"-moz-pre-wrap":"pre-wrap"},goog.style.setInlineBlock=function(e){e=e.style,e.position="relative",goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?(e.zoom="1",e.display="inline"):e.display=goog.userAgent.GECKO?goog.userAgent.isVersionOrHigher("1.9a")?"inline-block":"-moz-inline-box":"inline-block"},goog.style.isRightToLeft=function(e){return"rtl"==goog.style.getStyle_(e,"direction")},goog.style.unselectableStyle_=goog.userAgent.GECKO?"MozUserSelect":goog.userAgent.WEBKIT?"WebkitUserSelect":null,goog.style.isUnselectable=function(e){return goog.style.unselectableStyle_?"none"==e.style[goog.style.unselectableStyle_].toLowerCase():goog.userAgent.IE||goog.userAgent.OPERA?"on"==e.getAttribute("unselectable"):!1},goog.style.setUnselectable=function(e,t,o){o=o?null:e.getElementsByTagName("*");var n=goog.style.unselectableStyle_;if(n){if(t=t?"none":"",e.style[n]=t,o){e=0;for(var i;i=o[e];e++)i.style[n]=t}}else if((goog.userAgent.IE||goog.userAgent.OPERA)&&(t=t?"on":"",e.setAttribute("unselectable",t),o))for(e=0;i=o[e];e++)i.setAttribute("unselectable",t)},goog.style.getBorderBoxSize=function(e){return new goog.math.Size(e.offsetWidth,e.offsetHeight)},goog.style.setBorderBoxSize=function(e,t){var o=goog.dom.getOwnerDocument(e),n=goog.dom.getDomHelper(o).isCss1CompatMode();if(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10")||n&&goog.userAgent.isVersionOrHigher("8"))goog.style.setBoxSizingSize_(e,t,"border-box");else if(o=e.style,n){var n=goog.style.getPaddingBox(e),i=goog.style.getBorderBox(e);o.pixelWidth=t.width-i.left-n.left-n.right-i.right,o.pixelHeight=t.height-i.top-n.top-n.bottom-i.bottom}else o.pixelWidth=t.width,o.pixelHeight=t.height},goog.style.getContentBoxSize=function(e){var t=goog.dom.getOwnerDocument(e),o=goog.userAgent.IE&&e.currentStyle;return o&&goog.dom.getDomHelper(t).isCss1CompatMode()&&"auto"!=o.width&&"auto"!=o.height&&!o.boxSizing?(t=goog.style.getIePixelValue_(e,o.width,"width","pixelWidth"),e=goog.style.getIePixelValue_(e,o.height,"height","pixelHeight"),new goog.math.Size(t,e)):(o=goog.style.getBorderBoxSize(e),t=goog.style.getPaddingBox(e),e=goog.style.getBorderBox(e),new goog.math.Size(o.width-e.left-t.left-t.right-e.right,o.height-e.top-t.top-t.bottom-e.bottom))},goog.style.setContentBoxSize=function(e,t){var o=goog.dom.getOwnerDocument(e),n=goog.dom.getDomHelper(o).isCss1CompatMode();if(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10")||n&&goog.userAgent.isVersionOrHigher("8"))goog.style.setBoxSizingSize_(e,t,"content-box");else if(o=e.style,n)o.pixelWidth=t.width,o.pixelHeight=t.height;else{var n=goog.style.getPaddingBox(e),i=goog.style.getBorderBox(e);o.pixelWidth=t.width+i.left+n.left+n.right+i.right,o.pixelHeight=t.height+i.top+n.top+n.bottom+i.bottom}},goog.style.setBoxSizingSize_=function(e,t,o){e=e.style,goog.userAgent.GECKO?e.MozBoxSizing=o:goog.userAgent.WEBKIT?e.WebkitBoxSizing=o:e.boxSizing=o,e.width=Math.max(t.width,0)+"px",e.height=Math.max(t.height,0)+"px"},goog.style.getIePixelValue_=function(e,t,o,n){if(/^\d+px?$/.test(t))return parseInt(t,10);var i=e.style[o],r=e.runtimeStyle[o];return e.runtimeStyle[o]=e.currentStyle[o],e.style[o]=t,t=e.style[n],e.style[o]=i,e.runtimeStyle[o]=r,t},goog.style.getIePixelDistance_=function(e,t){var o=goog.style.getCascadedStyle(e,t);return o?goog.style.getIePixelValue_(e,o,"left","pixelLeft"):0},goog.style.getBox_=function(e,t){if(goog.userAgent.IE){var o=goog.style.getIePixelDistance_(e,t+"Left"),n=goog.style.getIePixelDistance_(e,t+"Right"),i=goog.style.getIePixelDistance_(e,t+"Top"),r=goog.style.getIePixelDistance_(e,t+"Bottom");return new goog.math.Box(i,n,r,o)}return o=goog.style.getComputedStyle(e,t+"Left"),n=goog.style.getComputedStyle(e,t+"Right"),i=goog.style.getComputedStyle(e,t+"Top"),r=goog.style.getComputedStyle(e,t+"Bottom"),new goog.math.Box(parseFloat(i),parseFloat(n),parseFloat(r),parseFloat(o))},goog.style.getPaddingBox=function(e){return goog.style.getBox_(e,"padding")},goog.style.getMarginBox=function(e){return goog.style.getBox_(e,"margin")},goog.style.ieBorderWidthKeywords_={thin:2,medium:4,thick:6},goog.style.getIePixelBorder_=function(e,t){if("none"==goog.style.getCascadedStyle(e,t+"Style"))return 0;var o=goog.style.getCascadedStyle(e,t+"Width");return o in goog.style.ieBorderWidthKeywords_?goog.style.ieBorderWidthKeywords_[o]:goog.style.getIePixelValue_(e,o,"left","pixelLeft")},goog.style.getBorderBox=function(e){if(goog.userAgent.IE&&!goog.userAgent.isDocumentModeOrHigher(9)){var t=goog.style.getIePixelBorder_(e,"borderLeft"),o=goog.style.getIePixelBorder_(e,"borderRight"),n=goog.style.getIePixelBorder_(e,"borderTop");return e=goog.style.getIePixelBorder_(e,"borderBottom"),new goog.math.Box(n,o,e,t)}return t=goog.style.getComputedStyle(e,"borderLeftWidth"),o=goog.style.getComputedStyle(e,"borderRightWidth"),n=goog.style.getComputedStyle(e,"borderTopWidth"),e=goog.style.getComputedStyle(e,"borderBottomWidth"),new goog.math.Box(parseFloat(n),parseFloat(o),parseFloat(e),parseFloat(t))},goog.style.getFontFamily=function(e){var t=goog.dom.getOwnerDocument(e),o="";if(t.body.createTextRange&&goog.dom.contains(t,e)){t=t.body.createTextRange(),t.moveToElementText(e);try{o=t.queryCommandValue("FontName")}catch(n){o=""}}return o||(o=goog.style.getStyle_(e,"fontFamily")),e=o.split(","),1t||t>this.getChildCount())throw Error(goog.ui.Component.Error.CHILD_INDEX_OUT_OF_BOUNDS);this.childIndex_&&this.children_||(this.childIndex_={},this.children_=[]),e.getParent()==this?(goog.object.set(this.childIndex_,e.getId(),e),goog.array.remove(this.children_,e)):goog.object.add(this.childIndex_,e.getId(),e),e.setParent(this),goog.array.insertAt(this.children_,e,t),e.inDocument_&&this.inDocument_&&e.getParent()==this?(o=this.getContentElement(),t=o.childNodes[t]||null,t!=e.getElement()&&o.insertBefore(e.getElement(),t)):o?(this.element_||this.createDom(),t=this.getChildAt(t+1),e.render_(this.getContentElement(),t?t.element_:null)):this.inDocument_&&!e.inDocument_&&e.element_&&e.element_.parentNode&&e.element_.parentNode.nodeType==goog.dom.NodeType.ELEMENT&&e.enterDocument()},goog.ui.Component.prototype.getContentElement=function(){return this.element_},goog.ui.Component.prototype.isRightToLeft=function(){return null==this.rightToLeft_&&(this.rightToLeft_=goog.style.isRightToLeft(this.inDocument_?this.element_:this.dom_.getDocument().body)),this.rightToLeft_},goog.ui.Component.prototype.setRightToLeft=function(e){if(this.inDocument_)throw Error(goog.ui.Component.Error.ALREADY_RENDERED);this.rightToLeft_=e},goog.ui.Component.prototype.hasChildren=function(){return!!this.children_&&0!=this.children_.length},goog.ui.Component.prototype.getChildCount=function(){return this.children_?this.children_.length:0},goog.ui.Component.prototype.getChildIds=function(){var e=[];return this.forEachChild(function(t){e.push(t.getId())}),e},goog.ui.Component.prototype.getChild=function(e){return this.childIndex_&&e?goog.object.get(this.childIndex_,e)||null:null },goog.ui.Component.prototype.getChildAt=function(e){return this.children_?this.children_[e]||null:null},goog.ui.Component.prototype.forEachChild=function(e,t){this.children_&&goog.array.forEach(this.children_,e,t)},goog.ui.Component.prototype.indexOfChild=function(e){return this.children_&&e?goog.array.indexOf(this.children_,e):-1},goog.ui.Component.prototype.removeChild=function(e,t){if(e){var o=goog.isString(e)?e:e.getId();e=this.getChild(o),o&&e&&(goog.object.remove(this.childIndex_,o),goog.array.remove(this.children_,e),t&&(e.exitDocument(),e.element_&&goog.dom.removeNode(e.element_)),e.setParent(null))}if(!e)throw Error(goog.ui.Component.Error.NOT_OUR_CHILD);return e},goog.ui.Component.prototype.removeChildAt=function(e,t){return this.removeChild(this.getChildAt(e),t)},goog.ui.Component.prototype.removeChildren=function(e){for(var t=[];this.hasChildren();)t.push(this.removeChildAt(0,e));return t},goog.a11y={},goog.a11y.aria={},goog.a11y.aria.Role={ALERT:"alert",ALERTDIALOG:"alertdialog",APPLICATION:"application",ARTICLE:"article",BANNER:"banner",BUTTON:"button",CHECKBOX:"checkbox",COLUMNHEADER:"columnheader",COMBOBOX:"combobox",COMPLEMENTARY:"complementary",CONTENTINFO:"contentinfo",DEFINITION:"definition",DIALOG:"dialog",DIRECTORY:"directory",DOCUMENT:"document",FORM:"form",GRID:"grid",GRIDCELL:"gridcell",GROUP:"group",HEADING:"heading",IMG:"img",LINK:"link",LIST:"list",LISTBOX:"listbox",LISTITEM:"listitem",LOG:"log",MAIN:"main",MARQUEE:"marquee",MATH:"math",MENU:"menu",MENUBAR:"menubar",MENU_ITEM:"menuitem",MENU_ITEM_CHECKBOX:"menuitemcheckbox",MENU_ITEM_RADIO:"menuitemradio",NAVIGATION:"navigation",NOTE:"note",OPTION:"option",PRESENTATION:"presentation",PROGRESSBAR:"progressbar",RADIO:"radio",RADIOGROUP:"radiogroup",REGION:"region",ROW:"row",ROWGROUP:"rowgroup",ROWHEADER:"rowheader",SCROLLBAR:"scrollbar",SEARCH:"search",SEPARATOR:"separator",SLIDER:"slider",SPINBUTTON:"spinbutton",STATUS:"status",TAB:"tab",TAB_LIST:"tablist",TAB_PANEL:"tabpanel",TEXTBOX:"textbox",TIMER:"timer",TOOLBAR:"toolbar",TOOLTIP:"tooltip",TREE:"tree",TREEGRID:"treegrid",TREEITEM:"treeitem"},goog.a11y.aria.State={ACTIVEDESCENDANT:"activedescendant",ATOMIC:"atomic",AUTOCOMPLETE:"autocomplete",BUSY:"busy",CHECKED:"checked",CONTROLS:"controls",DESCRIBEDBY:"describedby",DISABLED:"disabled",DROPEFFECT:"dropeffect",EXPANDED:"expanded",FLOWTO:"flowto",GRABBED:"grabbed",HASPOPUP:"haspopup",HIDDEN:"hidden",INVALID:"invalid",LABEL:"label",LABELLEDBY:"labelledby",LEVEL:"level",LIVE:"live",MULTILINE:"multiline",MULTISELECTABLE:"multiselectable",ORIENTATION:"orientation",OWNS:"owns",POSINSET:"posinset",PRESSED:"pressed",READONLY:"readonly",RELEVANT:"relevant",REQUIRED:"required",SELECTED:"selected",SETSIZE:"setsize",SORT:"sort",VALUEMAX:"valuemax",VALUEMIN:"valuemin",VALUENOW:"valuenow",VALUETEXT:"valuetext"},goog.a11y.aria.AutoCompleteValues={INLINE:"inline",LIST:"list",BOTH:"both",NONE:"none"},goog.a11y.aria.DropEffectValues={COPY:"copy",MOVE:"move",LINK:"link",EXECUTE:"execute",POPUP:"popup",NONE:"none"},goog.a11y.aria.LivePriority={OFF:"off",POLITE:"polite",ASSERTIVE:"assertive"},goog.a11y.aria.OrientationValues={VERTICAL:"vertical",HORIZONTAL:"horizontal"},goog.a11y.aria.RelevantValues={ADDITIONS:"additions",REMOVALS:"removals",TEXT:"text",ALL:"all"},goog.a11y.aria.SortValues={ASCENDING:"ascending",DESCENDING:"descending",NONE:"none",OTHER:"other"},goog.a11y.aria.CheckedValues={TRUE:"true",FALSE:"false",MIXED:"mixed",UNDEFINED:"undefined"},goog.a11y.aria.ExpandedValues={TRUE:"true",FALSE:"false",UNDEFINED:"undefined"},goog.a11y.aria.GrabbedValues={TRUE:"true",FALSE:"false",UNDEFINED:"undefined"},goog.a11y.aria.InvalidValues={FALSE:"false",TRUE:"true",GRAMMAR:"grammar",SPELLING:"spelling"},goog.a11y.aria.PressedValues={TRUE:"true",FALSE:"false",MIXED:"mixed",UNDEFINED:"undefined"},goog.a11y.aria.SelectedValues={TRUE:"true",FALSE:"false",UNDEFINED:"undefined"},goog.a11y.aria.datatables={},goog.a11y.aria.datatables.getDefaultValuesMap=function(){return goog.a11y.aria.DefaultStateValueMap_||(goog.a11y.aria.DefaultStateValueMap_=goog.object.create(goog.a11y.aria.State.ATOMIC,!1,goog.a11y.aria.State.AUTOCOMPLETE,"none",goog.a11y.aria.State.DROPEFFECT,"none",goog.a11y.aria.State.HASPOPUP,!1,goog.a11y.aria.State.LIVE,"off",goog.a11y.aria.State.MULTILINE,!1,goog.a11y.aria.State.MULTISELECTABLE,!1,goog.a11y.aria.State.ORIENTATION,"vertical",goog.a11y.aria.State.READONLY,!1,goog.a11y.aria.State.RELEVANT,"additions text",goog.a11y.aria.State.REQUIRED,!1,goog.a11y.aria.State.SORT,"none",goog.a11y.aria.State.BUSY,!1,goog.a11y.aria.State.DISABLED,!1,goog.a11y.aria.State.HIDDEN,!1,goog.a11y.aria.State.INVALID,"false")),goog.a11y.aria.DefaultStateValueMap_},goog.a11y.aria.ARIA_PREFIX_="aria-",goog.a11y.aria.ROLE_ATTRIBUTE_="role",goog.a11y.aria.TAGS_WITH_ASSUMED_ROLES_=[goog.dom.TagName.A,goog.dom.TagName.AREA,goog.dom.TagName.BUTTON,goog.dom.TagName.HEAD,goog.dom.TagName.INPUT,goog.dom.TagName.LINK,goog.dom.TagName.MENU,goog.dom.TagName.META,goog.dom.TagName.OPTGROUP,goog.dom.TagName.OPTION,goog.dom.TagName.PROGRESS,goog.dom.TagName.STYLE,goog.dom.TagName.SELECT,goog.dom.TagName.SOURCE,goog.dom.TagName.TEXTAREA,goog.dom.TagName.TITLE,goog.dom.TagName.TRACK],goog.a11y.aria.setRole=function(e,t){t?(goog.asserts.ENABLE_ASSERTS&&goog.asserts.assert(goog.object.containsValue(goog.a11y.aria.Role,t),"No such ARIA role "+t),e.setAttribute(goog.a11y.aria.ROLE_ATTRIBUTE_,t)):goog.a11y.aria.removeRole(e)},goog.a11y.aria.getRole=function(e){return e.getAttribute(goog.a11y.aria.ROLE_ATTRIBUTE_)||null},goog.a11y.aria.removeRole=function(e){e.removeAttribute(goog.a11y.aria.ROLE_ATTRIBUTE_)},goog.a11y.aria.setState=function(e,t,o){goog.isArray(o)&&(o=o.join(" "));var n=goog.a11y.aria.getAriaAttributeName_(t);""===o||void 0==o?(o=goog.a11y.aria.datatables.getDefaultValuesMap(),t in o?e.setAttribute(n,o[t]):e.removeAttribute(n)):e.setAttribute(n,o)},goog.a11y.aria.toggleState=function(e,t){var o=goog.a11y.aria.getState(e,t);goog.string.isEmptyOrWhitespace(goog.string.makeSafe(o))||"true"==o||"false"==o?goog.a11y.aria.setState(e,t,"true"==o?"false":"true"):goog.a11y.aria.removeState(e,t)},goog.a11y.aria.removeState=function(e,t){e.removeAttribute(goog.a11y.aria.getAriaAttributeName_(t))},goog.a11y.aria.getState=function(e,t){var o=e.getAttribute(goog.a11y.aria.getAriaAttributeName_(t));return null==o||void 0==o?"":String(o)},goog.a11y.aria.getActiveDescendant=function(e){var t=goog.a11y.aria.getState(e,goog.a11y.aria.State.ACTIVEDESCENDANT);return goog.dom.getOwnerDocument(e).getElementById(t)},goog.a11y.aria.setActiveDescendant=function(e,t){var o="";t&&(o=t.id,goog.asserts.assert(o,"The active element should have an id.")),goog.a11y.aria.setState(e,goog.a11y.aria.State.ACTIVEDESCENDANT,o)},goog.a11y.aria.getLabel=function(e){return goog.a11y.aria.getState(e,goog.a11y.aria.State.LABEL)},goog.a11y.aria.setLabel=function(e,t){goog.a11y.aria.setState(e,goog.a11y.aria.State.LABEL,t)},goog.a11y.aria.assertRoleIsSetInternalUtil=function(e,t){if(!goog.array.contains(goog.a11y.aria.TAGS_WITH_ASSUMED_ROLES_,e.tagName)){var o=goog.a11y.aria.getRole(e);goog.asserts.assert(null!=o,"The element ARIA role cannot be null."),goog.asserts.assert(goog.array.contains(t,o),'Non existing or incorrect role set for element.The role set is "'+o+'". The role should be any of "'+t+'". Check the ARIA specification for more details http://www.w3.org/TR/wai-aria/roles.')}},goog.a11y.aria.getStateBoolean=function(e,t){var o=e.getAttribute(goog.a11y.aria.getAriaAttributeName_(t));return goog.asserts.assert(goog.isBoolean(o)||null==o||"true"==o||"false"==o),null==o?o:goog.isBoolean(o)?o:"true"==o},goog.a11y.aria.getStateNumber=function(e,t){var o=e.getAttribute(goog.a11y.aria.getAriaAttributeName_(t));return goog.asserts.assert(!(null!=o&&isNaN(Number(o))||goog.isBoolean(o))),null==o?null:Number(o)},goog.a11y.aria.getStateString=function(e,t){var o=e.getAttribute(goog.a11y.aria.getAriaAttributeName_(t));return goog.asserts.assert((null==o||goog.isString(o))&&isNaN(Number(o))&&"true"!=o&&"false"!=o),null==o?null:o},goog.a11y.aria.getStringArrayStateInternalUtil=function(e,t){var o=e.getAttribute(goog.a11y.aria.getAriaAttributeName_(t));return goog.a11y.aria.splitStringOnWhitespace_(o)},goog.a11y.aria.splitStringOnWhitespace_=function(e){return e?e.split(/\s+/):[]},goog.a11y.aria.getAriaAttributeName_=function(e){return goog.asserts.ENABLE_ASSERTS&&(goog.asserts.assert(e,"ARIA attribute cannot be empty."),goog.asserts.assert(goog.object.containsValue(goog.a11y.aria.State,e),"No such ARIA attribute "+e)),goog.a11y.aria.ARIA_PREFIX_+e},goog.events.KeyCodes={WIN_KEY_FF_LINUX:0,MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,FF_SEMICOLON:59,FF_EQUALS:61,FF_DASH:173,QUESTION_MARK:63,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,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SCROLL_LOCK:145,FIRST_MEDIA_KEY:166,LAST_MEDIA_KEY:183,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,TILDE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,MAC_WK_CMD_LEFT:91,MAC_WK_CMD_RIGHT:93,WIN_IME:229,PHANTOM:255},goog.events.KeyCodes.isTextModifyingKeyEvent=function(e){if(e.altKey&&!e.ctrlKey||e.metaKey||e.keyCode>=goog.events.KeyCodes.F1&&e.keyCode<=goog.events.KeyCodes.F12)return!1;switch(e.keyCode){case goog.events.KeyCodes.ALT:case goog.events.KeyCodes.CAPS_LOCK:case goog.events.KeyCodes.CONTEXT_MENU:case goog.events.KeyCodes.CTRL:case goog.events.KeyCodes.DOWN:case goog.events.KeyCodes.END:case goog.events.KeyCodes.ESC:case goog.events.KeyCodes.HOME:case goog.events.KeyCodes.INSERT:case goog.events.KeyCodes.LEFT:case goog.events.KeyCodes.MAC_FF_META:case goog.events.KeyCodes.META:case goog.events.KeyCodes.NUMLOCK:case goog.events.KeyCodes.NUM_CENTER:case goog.events.KeyCodes.PAGE_DOWN:case goog.events.KeyCodes.PAGE_UP:case goog.events.KeyCodes.PAUSE:case goog.events.KeyCodes.PHANTOM:case goog.events.KeyCodes.PRINT_SCREEN:case goog.events.KeyCodes.RIGHT:case goog.events.KeyCodes.SCROLL_LOCK:case goog.events.KeyCodes.SHIFT:case goog.events.KeyCodes.UP:case goog.events.KeyCodes.WIN_KEY:case goog.events.KeyCodes.WIN_KEY_RIGHT:return!1;case goog.events.KeyCodes.WIN_KEY_FF_LINUX:return!goog.userAgent.GECKO;default:return e.keyCodegoog.events.KeyCodes.LAST_MEDIA_KEY}},goog.events.KeyCodes.firesKeyPressEvent=function(e,t,o,n,i){if(!(goog.userAgent.IE||goog.userAgent.WEBKIT&&goog.userAgent.isVersionOrHigher("525")))return!0;if(goog.userAgent.MAC&&i)return goog.events.KeyCodes.isCharacterKey(e);if(i&&!n)return!1;if(goog.isNumber(t)&&(t=goog.events.KeyCodes.normalizeKeyCode(t)),!o&&(t==goog.events.KeyCodes.CTRL||t==goog.events.KeyCodes.ALT||goog.userAgent.MAC&&t==goog.events.KeyCodes.META))return!1;if(goog.userAgent.WEBKIT&&n&&o)switch(e){case goog.events.KeyCodes.BACKSLASH:case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:case goog.events.KeyCodes.TILDE:case goog.events.KeyCodes.SEMICOLON:case goog.events.KeyCodes.DASH:case goog.events.KeyCodes.EQUALS:case goog.events.KeyCodes.COMMA:case goog.events.KeyCodes.PERIOD:case goog.events.KeyCodes.SLASH:case goog.events.KeyCodes.APOSTROPHE:case goog.events.KeyCodes.SINGLE_QUOTE:return!1}if(goog.userAgent.IE&&n&&t==e)return!1;switch(e){case goog.events.KeyCodes.ENTER:return!0;case goog.events.KeyCodes.ESC:return!goog.userAgent.WEBKIT}return goog.events.KeyCodes.isCharacterKey(e)},goog.events.KeyCodes.isCharacterKey=function(e){if(e>=goog.events.KeyCodes.ZERO&&e<=goog.events.KeyCodes.NINE||e>=goog.events.KeyCodes.NUM_ZERO&&e<=goog.events.KeyCodes.NUM_MULTIPLY||e>=goog.events.KeyCodes.A&&e<=goog.events.KeyCodes.Z||goog.userAgent.WEBKIT&&0==e)return!0;switch(e){case goog.events.KeyCodes.SPACE:case goog.events.KeyCodes.QUESTION_MARK:case goog.events.KeyCodes.NUM_PLUS:case goog.events.KeyCodes.NUM_MINUS:case goog.events.KeyCodes.NUM_PERIOD:case goog.events.KeyCodes.NUM_DIVISION:case goog.events.KeyCodes.SEMICOLON:case goog.events.KeyCodes.FF_SEMICOLON:case goog.events.KeyCodes.DASH:case goog.events.KeyCodes.EQUALS:case goog.events.KeyCodes.FF_EQUALS:case goog.events.KeyCodes.COMMA:case goog.events.KeyCodes.PERIOD:case goog.events.KeyCodes.SLASH:case goog.events.KeyCodes.APOSTROPHE:case goog.events.KeyCodes.SINGLE_QUOTE:case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:case goog.events.KeyCodes.BACKSLASH:case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:return!0;default:return!1}},goog.events.KeyCodes.normalizeKeyCode=function(e){return goog.userAgent.GECKO?goog.events.KeyCodes.normalizeGeckoKeyCode(e):goog.userAgent.MAC&&goog.userAgent.WEBKIT?goog.events.KeyCodes.normalizeMacWebKitKeyCode(e):e},goog.events.KeyCodes.normalizeGeckoKeyCode=function(e){switch(e){case goog.events.KeyCodes.FF_EQUALS:return goog.events.KeyCodes.EQUALS;case goog.events.KeyCodes.FF_SEMICOLON:return goog.events.KeyCodes.SEMICOLON;case goog.events.KeyCodes.FF_DASH:return goog.events.KeyCodes.DASH;case goog.events.KeyCodes.MAC_FF_META:return goog.events.KeyCodes.META;case goog.events.KeyCodes.WIN_KEY_FF_LINUX:return goog.events.KeyCodes.WIN_KEY;default:return e}},goog.events.KeyCodes.normalizeMacWebKitKeyCode=function(e){switch(e){case goog.events.KeyCodes.MAC_WK_CMD_RIGHT:return goog.events.KeyCodes.META;default:return e}},goog.events.KeyHandler=function(e,t){goog.events.EventTarget.call(this),e&&this.attach(e,t)},goog.inherits(goog.events.KeyHandler,goog.events.EventTarget),goog.events.KeyHandler.prototype.element_=null,goog.events.KeyHandler.prototype.keyPressKey_=null,goog.events.KeyHandler.prototype.keyDownKey_=null,goog.events.KeyHandler.prototype.keyUpKey_=null,goog.events.KeyHandler.prototype.lastKey_=-1,goog.events.KeyHandler.prototype.keyCode_=-1,goog.events.KeyHandler.prototype.altKey_=!1,goog.events.KeyHandler.EventType={KEY:"key"},goog.events.KeyHandler.safariKey_={3:goog.events.KeyCodes.ENTER,12:goog.events.KeyCodes.NUMLOCK,63232:goog.events.KeyCodes.UP,63233:goog.events.KeyCodes.DOWN,63234:goog.events.KeyCodes.LEFT,63235:goog.events.KeyCodes.RIGHT,63236:goog.events.KeyCodes.F1,63237:goog.events.KeyCodes.F2,63238:goog.events.KeyCodes.F3,63239:goog.events.KeyCodes.F4,63240:goog.events.KeyCodes.F5,63241:goog.events.KeyCodes.F6,63242:goog.events.KeyCodes.F7,63243:goog.events.KeyCodes.F8,63244:goog.events.KeyCodes.F9,63245:goog.events.KeyCodes.F10,63246:goog.events.KeyCodes.F11,63247:goog.events.KeyCodes.F12,63248:goog.events.KeyCodes.PRINT_SCREEN,63272:goog.events.KeyCodes.DELETE,63273:goog.events.KeyCodes.HOME,63275:goog.events.KeyCodes.END,63276:goog.events.KeyCodes.PAGE_UP,63277:goog.events.KeyCodes.PAGE_DOWN,63289:goog.events.KeyCodes.NUMLOCK,63302:goog.events.KeyCodes.INSERT},goog.events.KeyHandler.keyIdentifier_={Up:goog.events.KeyCodes.UP,Down:goog.events.KeyCodes.DOWN,Left:goog.events.KeyCodes.LEFT,Right:goog.events.KeyCodes.RIGHT,Enter:goog.events.KeyCodes.ENTER,F1:goog.events.KeyCodes.F1,F2:goog.events.KeyCodes.F2,F3:goog.events.KeyCodes.F3,F4:goog.events.KeyCodes.F4,F5:goog.events.KeyCodes.F5,F6:goog.events.KeyCodes.F6,F7:goog.events.KeyCodes.F7,F8:goog.events.KeyCodes.F8,F9:goog.events.KeyCodes.F9,F10:goog.events.KeyCodes.F10,F11:goog.events.KeyCodes.F11,F12:goog.events.KeyCodes.F12,"U+007F":goog.events.KeyCodes.DELETE,Home:goog.events.KeyCodes.HOME,End:goog.events.KeyCodes.END,PageUp:goog.events.KeyCodes.PAGE_UP,PageDown:goog.events.KeyCodes.PAGE_DOWN,Insert:goog.events.KeyCodes.INSERT},goog.events.KeyHandler.USES_KEYDOWN_=goog.userAgent.IE||goog.userAgent.WEBKIT&&goog.userAgent.isVersionOrHigher("525"),goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_=goog.userAgent.MAC&&goog.userAgent.GECKO,goog.events.KeyHandler.prototype.handleKeyDown_=function(e){goog.userAgent.WEBKIT&&(this.lastKey_==goog.events.KeyCodes.CTRL&&!e.ctrlKey||this.lastKey_==goog.events.KeyCodes.ALT&&!e.altKey||goog.userAgent.MAC&&this.lastKey_==goog.events.KeyCodes.META&&!e.metaKey)&&(this.keyCode_=this.lastKey_=-1),-1==this.lastKey_&&(e.ctrlKey&&e.keyCode!=goog.events.KeyCodes.CTRL?this.lastKey_=goog.events.KeyCodes.CTRL:e.altKey&&e.keyCode!=goog.events.KeyCodes.ALT?this.lastKey_=goog.events.KeyCodes.ALT:e.metaKey&&e.keyCode!=goog.events.KeyCodes.META&&(this.lastKey_=goog.events.KeyCodes.META)),goog.events.KeyHandler.USES_KEYDOWN_&&!goog.events.KeyCodes.firesKeyPressEvent(e.keyCode,this.lastKey_,e.shiftKey,e.ctrlKey,e.altKey)?this.handleEvent(e):(this.keyCode_=goog.events.KeyCodes.normalizeKeyCode(e.keyCode),goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_&&(this.altKey_=e.altKey))},goog.events.KeyHandler.prototype.resetState=function(){this.keyCode_=this.lastKey_=-1},goog.events.KeyHandler.prototype.handleKeyup_=function(e){this.resetState(),this.altKey_=e.altKey},goog.events.KeyHandler.prototype.handleEvent=function(e){var t,o,n=e.getBrowserEvent(),i=n.altKey;goog.userAgent.IE&&e.type==goog.events.EventType.KEYPRESS?(t=this.keyCode_,o=t!=goog.events.KeyCodes.ENTER&&t!=goog.events.KeyCodes.ESC?n.keyCode:0):goog.userAgent.WEBKIT&&e.type==goog.events.EventType.KEYPRESS?(t=this.keyCode_,o=0<=n.charCode&&63232>n.charCode&&goog.events.KeyCodes.isCharacterKey(t)?n.charCode:0):goog.userAgent.OPERA?(t=this.keyCode_,o=goog.events.KeyCodes.isCharacterKey(t)?n.keyCode:0):(t=n.keyCode||this.keyCode_,o=n.charCode||0,goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_&&(i=this.altKey_),goog.userAgent.MAC&&o==goog.events.KeyCodes.QUESTION_MARK&&t==goog.events.KeyCodes.WIN_KEY&&(t=goog.events.KeyCodes.SLASH));var r=t=goog.events.KeyCodes.normalizeKeyCode(t),s=n.keyIdentifier;t?t>=63232&&t in goog.events.KeyHandler.safariKey_?r=goog.events.KeyHandler.safariKey_[t]:25==t&&e.shiftKey&&(r=9):s&&s in goog.events.KeyHandler.keyIdentifier_&&(r=goog.events.KeyHandler.keyIdentifier_[s]),e=r==this.lastKey_,this.lastKey_=r,n=new goog.events.KeyEvent(r,o,e,n),n.altKey=i,this.dispatchEvent(n)},goog.events.KeyHandler.prototype.getElement=function(){return this.element_},goog.events.KeyHandler.prototype.attach=function(e,t){this.keyUpKey_&&this.detach(),this.element_=e,this.keyPressKey_=goog.events.listen(this.element_,goog.events.EventType.KEYPRESS,this,t),this.keyDownKey_=goog.events.listen(this.element_,goog.events.EventType.KEYDOWN,this.handleKeyDown_,t,this),this.keyUpKey_=goog.events.listen(this.element_,goog.events.EventType.KEYUP,this.handleKeyup_,t,this)},goog.events.KeyHandler.prototype.detach=function(){this.keyPressKey_&&(goog.events.unlistenByKey(this.keyPressKey_),goog.events.unlistenByKey(this.keyDownKey_),goog.events.unlistenByKey(this.keyUpKey_),this.keyUpKey_=this.keyDownKey_=this.keyPressKey_=null),this.element_=null,this.keyCode_=this.lastKey_=-1},goog.events.KeyHandler.prototype.disposeInternal=function(){goog.events.KeyHandler.superClass_.disposeInternal.call(this),this.detach()},goog.events.KeyEvent=function(e,t,o,n){goog.events.BrowserEvent.call(this,n),this.type=goog.events.KeyHandler.EventType.KEY,this.keyCode=e,this.charCode=t,this.repeat=o},goog.inherits(goog.events.KeyEvent,goog.events.BrowserEvent),goog.dom.classlist={},goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST=!1,goog.dom.classlist.get=function(e){return goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||e.classList?e.classList:(e=e.className,goog.isString(e)&&e.match(/\S+/g)||[])},goog.dom.classlist.set=function(e,t){e.className=t},goog.dom.classlist.contains=function(e,t){return goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||e.classList?e.classList.contains(t):goog.array.contains(goog.dom.classlist.get(e),t)},goog.dom.classlist.add=function(e,t){goog.dom.classlist.ALWAYS_USE_DOM_TOKEN_LIST||e.classList?e.classList.add(t):goog.dom.classlist.contains(e,t)||(e.className+=0o;o++)if(e=goog.ui.registry.getDecoratorByClassName(t[o]))return e;return null},goog.ui.registry.reset=function(){goog.ui.registry.defaultRenderers_={},goog.ui.registry.decoratorFunctions_={}},goog.ui.registry.defaultRenderers_={},goog.ui.registry.decoratorFunctions_={},goog.ui.ContainerRenderer=function(e){this.ariaRole_=e},goog.addSingletonGetter(goog.ui.ContainerRenderer),goog.ui.ContainerRenderer.getCustomRenderer=function(e,t){var o=new e;return o.getCssClass=function(){return t},o},goog.ui.ContainerRenderer.CSS_CLASS="goog-container",goog.ui.ContainerRenderer.prototype.getAriaRole=function(){return this.ariaRole_},goog.ui.ContainerRenderer.prototype.enableTabIndex=function(e,t){e&&(e.tabIndex=t?0:-1)},goog.ui.ContainerRenderer.prototype.createDom=function(e){return e.getDomHelper().createDom("div",this.getClassNames(e).join(" "))},goog.ui.ContainerRenderer.prototype.getContentElement=function(e){return e},goog.ui.ContainerRenderer.prototype.canDecorate=function(e){return"DIV"==e.tagName},goog.ui.ContainerRenderer.prototype.decorate=function(e,t){t.id&&e.setId(t.id);var o=this.getCssClass(),n=!1,i=goog.dom.classlist.get(t);return i&&goog.array.forEach(i,function(t){t==o?n=!0:t&&this.setStateFromClassName(e,t,o)},this),n||goog.dom.classlist.add(t,o),this.decorateChildren(e,this.getContentElement(t)),t},goog.ui.ContainerRenderer.prototype.setStateFromClassName=function(e,t,o){t==o+"-disabled"?e.setEnabled(!1):t==o+"-horizontal"?e.setOrientation(goog.ui.Container.Orientation.HORIZONTAL):t==o+"-vertical"&&e.setOrientation(goog.ui.Container.Orientation.VERTICAL)},goog.ui.ContainerRenderer.prototype.decorateChildren=function(e,t,o){if(t){o=o||t.firstChild;for(var n;o&&o.parentNode==t;){if(n=o.nextSibling,o.nodeType==goog.dom.NodeType.ELEMENT){var i=this.getDecoratorForChild(o);i&&(i.setElementInternal(o),e.isEnabled()||i.setEnabled(!1),e.addChild(i),i.decorate(o))}else o.nodeValue&&""!=goog.string.trim(o.nodeValue)||t.removeChild(o);o=n}}},goog.ui.ContainerRenderer.prototype.getDecoratorForChild=function(e){return goog.ui.registry.getDecorator(e)},goog.ui.ContainerRenderer.prototype.initializeDom=function(e){e=e.getElement(),goog.asserts.assert(e,"The container DOM element cannot be null."),goog.style.setUnselectable(e,!0,goog.userAgent.GECKO),goog.userAgent.IE&&(e.hideFocus=!0);var t=this.getAriaRole();t&&goog.a11y.aria.setRole(e,t)},goog.ui.ContainerRenderer.prototype.getKeyEventTarget=function(e){return e.getElement()},goog.ui.ContainerRenderer.prototype.getCssClass=function(){return goog.ui.ContainerRenderer.CSS_CLASS},goog.ui.ContainerRenderer.prototype.getClassNames=function(e){var t=this.getCssClass(),o=e.getOrientation()==goog.ui.Container.Orientation.HORIZONTAL,o=[t,o?t+"-horizontal":t+"-vertical"];return e.isEnabled()||o.push(t+"-disabled"),o},goog.ui.ContainerRenderer.prototype.getDefaultOrientation=function(){return goog.ui.Container.Orientation.VERTICAL},goog.ui.ControlRenderer=function(){},goog.addSingletonGetter(goog.ui.ControlRenderer),goog.tagUnsealableClass(goog.ui.ControlRenderer),goog.ui.ControlRenderer.getCustomRenderer=function(e,t){var o=new e;return o.getCssClass=function(){return t},o},goog.ui.ControlRenderer.CSS_CLASS="goog-control",goog.ui.ControlRenderer.IE6_CLASS_COMBINATIONS=[],goog.ui.ControlRenderer.TOGGLE_ARIA_STATE_MAP_=goog.object.create(goog.a11y.aria.Role.BUTTON,goog.a11y.aria.State.PRESSED,goog.a11y.aria.Role.CHECKBOX,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.MENU_ITEM,goog.a11y.aria.State.SELECTED,goog.a11y.aria.Role.MENU_ITEM_CHECKBOX,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.MENU_ITEM_RADIO,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.RADIO,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.TAB,goog.a11y.aria.State.SELECTED,goog.a11y.aria.Role.TREEITEM,goog.a11y.aria.State.SELECTED),goog.ui.ControlRenderer.prototype.getAriaRole=function(){},goog.ui.ControlRenderer.prototype.createDom=function(e){return e.getDomHelper().createDom("div",this.getClassNames(e).join(" "),e.getContent())},goog.ui.ControlRenderer.prototype.getContentElement=function(e){return e},goog.ui.ControlRenderer.prototype.enableClassName=function(e,t,o){if(e=e.getElement?e.getElement():e){var n=[t];goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("7")&&(n=this.getAppliedCombinedClassNames_(goog.dom.classlist.get(e),t),n.push(t)),goog.dom.classlist.enableAll(e,n,o)}},goog.ui.ControlRenderer.prototype.enableExtraClassName=function(e,t,o){this.enableClassName(e,t,o)},goog.ui.ControlRenderer.prototype.canDecorate=function(){return!0},goog.ui.ControlRenderer.prototype.decorate=function(e,t){t.id&&e.setId(t.id);var o=this.getContentElement(t);o&&o.firstChild?e.setContentInternal(o.firstChild.nextSibling?goog.array.clone(o.childNodes):o.firstChild):e.setContentInternal(null);var n=0,i=this.getCssClass(),r=this.getStructuralCssClass(),s=!1,l=!1,a=!1,c=goog.array.toArray(goog.dom.classlist.get(t));goog.array.forEach(c,function(e){s||e!=i?l||e!=r?n|=this.getStateFromClass(e):l=!0:(s=!0,r==i&&(l=!0)),this.getStateFromClass(e)==goog.ui.Component.State.DISABLED&&(goog.asserts.assertElement(o),goog.dom.isFocusableTabIndex(o)&&goog.dom.setFocusableTabIndex(o,!1))},this),e.setStateInternal(n),s||(c.push(i),r==i&&(l=!0)),l||c.push(r);var g=e.getExtraClassNames();if(g&&c.push.apply(c,g),goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("7")){var u=this.getAppliedCombinedClassNames_(c);0-1&&t!=this.highlightedIndex_){var o=this.getHighlighted();o&&o.setHighlighted(!1),this.highlightedIndex_=t,o=this.getHighlighted(),this.isMouseButtonPressed()&&o.setActive(!0),this.openFollowsHighlight_&&this.openItem_&&o!=this.openItem_&&(o.isSupportedState(goog.ui.Component.State.OPENED)?o.setOpen(!0):this.openItem_.setOpen(!1))}t=this.getElement(),goog.asserts.assert(t,"The DOM element for the container cannot be null."),null!=e.target.getElement()&&goog.a11y.aria.setState(t,goog.a11y.aria.State.ACTIVEDESCENDANT,e.target.getElement().id)},goog.ui.Container.prototype.handleUnHighlightItem=function(e){e.target==this.getHighlighted()&&(this.highlightedIndex_=-1),e=this.getElement(),goog.asserts.assert(e,"The DOM element for the container cannot be null."),goog.a11y.aria.removeState(e,goog.a11y.aria.State.ACTIVEDESCENDANT)},goog.ui.Container.prototype.handleOpenItem=function(e){(e=e.target)&&e!=this.openItem_&&e.getParent()==this&&(this.openItem_&&this.openItem_.setOpen(!1),this.openItem_=e)},goog.ui.Container.prototype.handleCloseItem=function(e){e.target==this.openItem_&&(this.openItem_=null)},goog.ui.Container.prototype.handleMouseDown=function(e){this.enabled_&&this.setMouseButtonPressed(!0);var t=this.getKeyEventTarget();t&&goog.dom.isFocusableTabIndex(t)?t.focus():e.preventDefault()},goog.ui.Container.prototype.handleDocumentMouseUp=function(){this.setMouseButtonPressed(!1)},goog.ui.Container.prototype.handleChildMouseEvents=function(e){var t=this.getOwnerControl(e.target);if(t)switch(e.type){case goog.events.EventType.MOUSEDOWN:t.handleMouseDown(e);break;case goog.events.EventType.MOUSEUP:t.handleMouseUp(e);break;case goog.events.EventType.MOUSEOVER:t.handleMouseOver(e);break;case goog.events.EventType.MOUSEOUT:t.handleMouseOut(e);break;case goog.events.EventType.CONTEXTMENU:t.handleContextMenu(e)}},goog.ui.Container.prototype.getOwnerControl=function(e){if(this.childElementIdMap_)for(var t=this.getElement();e&&e!==t;){var o=e.id;if(o in this.childElementIdMap_)return this.childElementIdMap_[o];e=e.parentNode}return null},goog.ui.Container.prototype.handleFocus=function(){},goog.ui.Container.prototype.handleBlur=function(){this.setHighlightedIndex(-1),this.setMouseButtonPressed(!1),this.openItem_&&this.openItem_.setOpen(!1)},goog.ui.Container.prototype.handleKeyEvent=function(e){return this.isEnabled()&&this.isVisible()&&(0!=this.getChildCount()||this.keyEventTarget_)&&this.handleKeyEventInternal(e)?(e.preventDefault(),e.stopPropagation(),!0):!1},goog.ui.Container.prototype.handleKeyEventInternal=function(e){var t=this.getHighlighted();if(t&&"function"==typeof t.handleKeyEvent&&t.handleKeyEvent(e)||this.openItem_&&this.openItem_!=t&&"function"==typeof this.openItem_.handleKeyEvent&&this.openItem_.handleKeyEvent(e))return!0;if(e.shiftKey||e.ctrlKey||e.metaKey||e.altKey)return!1;switch(e.keyCode){case goog.events.KeyCodes.ESC:if(!this.isFocusable())return!1;this.getKeyEventTarget().blur();break;case goog.events.KeyCodes.HOME:this.highlightFirst();break;case goog.events.KeyCodes.END:this.highlightLast();break;case goog.events.KeyCodes.UP:if(this.orientation_!=goog.ui.Container.Orientation.VERTICAL)return!1;this.highlightPrevious();break;case goog.events.KeyCodes.LEFT:if(this.orientation_!=goog.ui.Container.Orientation.HORIZONTAL)return!1;this.isRightToLeft()?this.highlightNext():this.highlightPrevious();break;case goog.events.KeyCodes.DOWN:if(this.orientation_!=goog.ui.Container.Orientation.VERTICAL)return!1;this.highlightNext();break;case goog.events.KeyCodes.RIGHT:if(this.orientation_!=goog.ui.Container.Orientation.HORIZONTAL)return!1;this.isRightToLeft()?this.highlightPrevious():this.highlightNext();break;default:return!1}return!0},goog.ui.Container.prototype.registerChildId_=function(e){var t=e.getElement(),t=t.id||(t.id=e.getId());this.childElementIdMap_||(this.childElementIdMap_={}),this.childElementIdMap_[t]=e},goog.ui.Container.prototype.addChild=function(e,t){goog.asserts.assertInstanceof(e,goog.ui.Control,"The child of a container must be a control"),goog.ui.Container.superClass_.addChild.call(this,e,t)},goog.ui.Container.prototype.addChildAt=function(e,t,o){goog.asserts.assertInstanceof(e,goog.ui.Control),e.setDispatchTransitionEvents(goog.ui.Component.State.HOVER,!0),e.setDispatchTransitionEvents(goog.ui.Component.State.OPENED,!0),!this.isFocusable()&&this.isFocusableChildrenAllowed()||e.setSupportedState(goog.ui.Component.State.FOCUSED,!1),e.setHandleMouseEvents(!1);var n=e.getParent()==this?this.indexOfChild(e):-1;goog.ui.Container.superClass_.addChildAt.call(this,e,t,o),e.isInDocument()&&this.isInDocument()&&this.registerChildId_(e),this.updateHighlightedIndex_(n,t)},goog.ui.Container.prototype.updateHighlightedIndex_=function(e,t){-1==e&&(e=this.getChildCount()),e==this.highlightedIndex_?this.highlightedIndex_=Math.min(this.getChildCount()-1,t):e>this.highlightedIndex_&&t<=this.highlightedIndex_?this.highlightedIndex_++:ethis.highlightedIndex_&&this.highlightedIndex_--},goog.ui.Container.prototype.removeChild=function(e,t){if(e=goog.isString(e)?this.getChild(e):e,goog.asserts.assertInstanceof(e,goog.ui.Control),e){var o=this.indexOfChild(e);-1!=o&&(o==this.highlightedIndex_?(e.setHighlighted(!1),this.highlightedIndex_=-1):oe?t-1:e},0)},goog.ui.Container.prototype.highlightNext=function(){this.highlightHelper(function(e,t){return(e+1)%t},this.highlightedIndex_)},goog.ui.Container.prototype.highlightPrevious=function(){this.highlightHelper(function(e,t){return e--,0>e?t-1:e},this.highlightedIndex_)},goog.ui.Container.prototype.highlightHelper=function(e,t){for(var o=0>t?this.indexOfChild(this.openItem_):t,n=this.getChildCount(),o=e.call(this,o,n),i=0;n>=i;){var r=this.getChildAt(o);if(r&&this.canHighlightItem(r))return this.setHighlightedIndexFromKeyEvent(o),!0;i++,o=e.call(this,o,n)}return!1},goog.ui.Container.prototype.canHighlightItem=function(e){return e.isVisible()&&e.isEnabled()&&e.isSupportedState(goog.ui.Component.State.HOVER)},goog.ui.Container.prototype.setHighlightedIndexFromKeyEvent=function(e){this.setHighlightedIndex(e)},goog.ui.Container.prototype.getOpenItem=function(){return this.openItem_},goog.ui.Container.prototype.isMouseButtonPressed=function(){return this.mouseButtonPressed_},goog.ui.Container.prototype.setMouseButtonPressed=function(e){this.mouseButtonPressed_=e},goog.ui.MenuHeaderRenderer=function(){goog.ui.ControlRenderer.call(this)},goog.inherits(goog.ui.MenuHeaderRenderer,goog.ui.ControlRenderer),goog.addSingletonGetter(goog.ui.MenuHeaderRenderer),goog.ui.MenuHeaderRenderer.CSS_CLASS="goog-menuheader",goog.ui.MenuHeaderRenderer.prototype.getCssClass=function(){return goog.ui.MenuHeaderRenderer.CSS_CLASS},goog.ui.MenuHeader=function(e,t,o){goog.ui.Control.call(this,e,o||goog.ui.MenuHeaderRenderer.getInstance(),t),this.setSupportedState(goog.ui.Component.State.DISABLED,!1),this.setSupportedState(goog.ui.Component.State.HOVER,!1),this.setSupportedState(goog.ui.Component.State.ACTIVE,!1),this.setSupportedState(goog.ui.Component.State.FOCUSED,!1),this.setStateInternal(goog.ui.Component.State.DISABLED)},goog.inherits(goog.ui.MenuHeader,goog.ui.Control),goog.ui.registry.setDecoratorByClassName(goog.ui.MenuHeaderRenderer.CSS_CLASS,function(){return new goog.ui.MenuHeader(null)}),goog.ui.MenuItemRenderer=function(){goog.ui.ControlRenderer.call(this),this.classNameCache_=[]},goog.inherits(goog.ui.MenuItemRenderer,goog.ui.ControlRenderer),goog.addSingletonGetter(goog.ui.MenuItemRenderer),goog.ui.MenuItemRenderer.CSS_CLASS="goog-menuitem",goog.ui.MenuItemRenderer.CompositeCssClassIndex_={HOVER:0,CHECKBOX:1,CONTENT:2},goog.ui.MenuItemRenderer.prototype.getCompositeCssClass_=function(e){var t=this.classNameCache_[e];if(!t){switch(e){case goog.ui.MenuItemRenderer.CompositeCssClassIndex_.HOVER:t=this.getStructuralCssClass()+"-highlight";break;case goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CHECKBOX:t=this.getStructuralCssClass()+"-checkbox";break;case goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CONTENT:t=this.getStructuralCssClass()+"-content"}this.classNameCache_[e]=t}return t},goog.ui.MenuItemRenderer.prototype.getAriaRole=function(){return goog.a11y.aria.Role.MENU_ITEM},goog.ui.MenuItemRenderer.prototype.createDom=function(e){var t=e.getDomHelper().createDom("div",this.getClassNames(e).join(" "),this.createContent(e.getContent(),e.getDomHelper()));return this.setEnableCheckBoxStructure(e,t,e.isSupportedState(goog.ui.Component.State.SELECTED)||e.isSupportedState(goog.ui.Component.State.CHECKED)),t},goog.ui.MenuItemRenderer.prototype.getContentElement=function(e){return e&&e.firstChild},goog.ui.MenuItemRenderer.prototype.decorate=function(e,t){return goog.asserts.assert(t),this.hasContentStructure(t)||t.appendChild(this.createContent(t.childNodes,e.getDomHelper())),goog.dom.classlist.contains(t,"goog-option")&&(e.setCheckable(!0),this.setCheckable(e,t,!0)),goog.ui.MenuItemRenderer.superClass_.decorate.call(this,e,t)},goog.ui.MenuItemRenderer.prototype.setContent=function(e,t){var o=this.getContentElement(e),n=this.hasCheckBoxStructure(e)?o.firstChild:null;goog.ui.MenuItemRenderer.superClass_.setContent.call(this,e,t),n&&!this.hasCheckBoxStructure(e)&&o.insertBefore(n,o.firstChild||null)},goog.ui.MenuItemRenderer.prototype.hasContentStructure=function(e){e=goog.dom.getFirstElementChild(e);var t=this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CONTENT);return!!e&&goog.dom.classlist.contains(e,t)},goog.ui.MenuItemRenderer.prototype.createContent=function(e,t){var o=this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CONTENT);return t.createDom("div",o,e)},goog.ui.MenuItemRenderer.prototype.setSelectable=function(e,t,o){e&&t&&this.setEnableCheckBoxStructure(e,t,o)},goog.ui.MenuItemRenderer.prototype.setCheckable=function(e,t,o){e&&t&&this.setEnableCheckBoxStructure(e,t,o)},goog.ui.MenuItemRenderer.prototype.hasCheckBoxStructure=function(e){if(e=this.getContentElement(e)){e=e.firstChild;var t=this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CHECKBOX);return!!e&&goog.dom.isElement(e)&&goog.dom.classlist.contains(e,t)}return!1},goog.ui.MenuItemRenderer.prototype.setEnableCheckBoxStructure=function(e,t,o){this.setAriaRole(t,e.getPreferredAriaRole()),this.setAriaStates(e,t),o!=this.hasCheckBoxStructure(t)&&(goog.dom.classlist.enable(t,"goog-option",o),t=this.getContentElement(t),o?(o=this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.CHECKBOX),t.insertBefore(e.getDomHelper().createDom("div",o),t.firstChild||null)):t.removeChild(t.firstChild)) },goog.ui.MenuItemRenderer.prototype.getClassForState=function(e){switch(e){case goog.ui.Component.State.HOVER:return this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.HOVER);case goog.ui.Component.State.CHECKED:case goog.ui.Component.State.SELECTED:return"goog-option-selected";default:return goog.ui.MenuItemRenderer.superClass_.getClassForState.call(this,e)}},goog.ui.MenuItemRenderer.prototype.getStateFromClass=function(e){var t=this.getCompositeCssClass_(goog.ui.MenuItemRenderer.CompositeCssClassIndex_.HOVER);switch(e){case"goog-option-selected":return goog.ui.Component.State.CHECKED;case t:return goog.ui.Component.State.HOVER;default:return goog.ui.MenuItemRenderer.superClass_.getStateFromClass.call(this,e)}},goog.ui.MenuItemRenderer.prototype.getCssClass=function(){return goog.ui.MenuItemRenderer.CSS_CLASS},goog.ui.MenuItem=function(e,t,o,n){goog.ui.Control.call(this,e,n||goog.ui.MenuItemRenderer.getInstance(),o),this.setValue(t)},goog.inherits(goog.ui.MenuItem,goog.ui.Control),goog.tagUnsealableClass(goog.ui.MenuItem),goog.ui.MenuItem.MNEMONIC_WRAPPER_CLASS_="goog-menuitem-mnemonic-separator",goog.ui.MenuItem.ACCELERATOR_CLASS="goog-menuitem-accel",goog.ui.MenuItem.prototype.getValue=function(){var e=this.getModel();return null!=e?e:this.getCaption()},goog.ui.MenuItem.prototype.setValue=function(e){this.setModel(e)},goog.ui.MenuItem.prototype.setSupportedState=function(e,t){switch(goog.ui.MenuItem.superClass_.setSupportedState.call(this,e,t),e){case goog.ui.Component.State.SELECTED:this.setSelectableInternal_(t);break;case goog.ui.Component.State.CHECKED:this.setCheckableInternal_(t)}},goog.ui.MenuItem.prototype.setSelectable=function(e){this.setSupportedState(goog.ui.Component.State.SELECTED,e)},goog.ui.MenuItem.prototype.setSelectableInternal_=function(e){this.isChecked()&&!e&&this.setChecked(!1);var t=this.getElement();t&&this.getRenderer().setSelectable(this,t,e)},goog.ui.MenuItem.prototype.setCheckable=function(e){this.setSupportedState(goog.ui.Component.State.CHECKED,e)},goog.ui.MenuItem.prototype.setCheckableInternal_=function(e){var t=this.getElement();t&&this.getRenderer().setCheckable(this,t,e)},goog.ui.MenuItem.prototype.getCaption=function(){var e=this.getContent();if(goog.isArray(e)){var t=goog.ui.MenuItem.ACCELERATOR_CLASS,o=goog.ui.MenuItem.MNEMONIC_WRAPPER_CLASS_,e=goog.array.map(e,function(e){return goog.dom.isElement(e)&&(goog.dom.classlist.contains(e,t)||goog.dom.classlist.contains(e,o))?"":goog.dom.getRawTextContent(e)}).join("");return goog.string.collapseBreakingSpaces(e)}return goog.ui.MenuItem.superClass_.getCaption.call(this)},goog.ui.MenuItem.prototype.getAccelerator=function(){var e=this.getDomHelper(),t=this.getContent();return goog.isArray(t)&&(t=goog.array.find(t,function(e){return goog.dom.classlist.contains(e,goog.ui.MenuItem.ACCELERATOR_CLASS)}))?e.getTextContent(t):null},goog.ui.MenuItem.prototype.handleMouseUp=function(e){var t=this.getParent();if(t){var o=t.openingCoords;if(t.openingCoords=null,o&&goog.isNumber(e.clientX)&&(t=new goog.math.Coordinate(e.clientX,e.clientY),goog.math.Coordinate.equals(o,t)))return}goog.ui.MenuItem.superClass_.handleMouseUp.call(this,e)},goog.ui.MenuItem.prototype.handleKeyEventInternal=function(e){return e.keyCode==this.getMnemonic()&&this.performActionInternal(e)?!0:goog.ui.MenuItem.superClass_.handleKeyEventInternal.call(this,e)},goog.ui.MenuItem.prototype.setMnemonic=function(e){this.mnemonicKey_=e},goog.ui.MenuItem.prototype.getMnemonic=function(){return this.mnemonicKey_},goog.ui.registry.setDecoratorByClassName(goog.ui.MenuItemRenderer.CSS_CLASS,function(){return new goog.ui.MenuItem(null)}),goog.ui.MenuItem.prototype.getPreferredAriaRole=function(){return this.isSupportedState(goog.ui.Component.State.CHECKED)?goog.a11y.aria.Role.MENU_ITEM_CHECKBOX:this.isSupportedState(goog.ui.Component.State.SELECTED)?goog.a11y.aria.Role.MENU_ITEM_RADIO:goog.ui.MenuItem.superClass_.getPreferredAriaRole.call(this)},goog.ui.MenuItem.prototype.getParent=function(){return goog.ui.Control.prototype.getParent.call(this)},goog.ui.MenuItem.prototype.getParentEventTarget=function(){return goog.ui.Control.prototype.getParentEventTarget.call(this)},goog.ui.MenuSeparatorRenderer=function(){goog.ui.ControlRenderer.call(this)},goog.inherits(goog.ui.MenuSeparatorRenderer,goog.ui.ControlRenderer),goog.addSingletonGetter(goog.ui.MenuSeparatorRenderer),goog.ui.MenuSeparatorRenderer.CSS_CLASS="goog-menuseparator",goog.ui.MenuSeparatorRenderer.prototype.createDom=function(e){return e.getDomHelper().createDom("div",this.getCssClass())},goog.ui.MenuSeparatorRenderer.prototype.decorate=function(e,t){if(t.id&&e.setId(t.id),"HR"==t.tagName){var o=t;t=this.createDom(e),goog.dom.insertSiblingBefore(t,o),goog.dom.removeNode(o)}else goog.dom.classlist.add(t,this.getCssClass());return t},goog.ui.MenuSeparatorRenderer.prototype.setContent=function(){},goog.ui.MenuSeparatorRenderer.prototype.getCssClass=function(){return goog.ui.MenuSeparatorRenderer.CSS_CLASS},goog.ui.Separator=function(e,t){goog.ui.Control.call(this,null,e||goog.ui.MenuSeparatorRenderer.getInstance(),t),this.setSupportedState(goog.ui.Component.State.DISABLED,!1),this.setSupportedState(goog.ui.Component.State.HOVER,!1),this.setSupportedState(goog.ui.Component.State.ACTIVE,!1),this.setSupportedState(goog.ui.Component.State.FOCUSED,!1),this.setStateInternal(goog.ui.Component.State.DISABLED)},goog.inherits(goog.ui.Separator,goog.ui.Control),goog.ui.Separator.prototype.enterDocument=function(){goog.ui.Separator.superClass_.enterDocument.call(this);var e=this.getElement();goog.asserts.assert(e,"The DOM element for the separator cannot be null."),goog.a11y.aria.setRole(e,"separator")},goog.ui.registry.setDecoratorByClassName(goog.ui.MenuSeparatorRenderer.CSS_CLASS,function(){return new goog.ui.Separator}),goog.ui.MenuRenderer=function(e){goog.ui.ContainerRenderer.call(this,e||goog.a11y.aria.Role.MENU)},goog.inherits(goog.ui.MenuRenderer,goog.ui.ContainerRenderer),goog.addSingletonGetter(goog.ui.MenuRenderer),goog.ui.MenuRenderer.CSS_CLASS="goog-menu",goog.ui.MenuRenderer.prototype.canDecorate=function(e){return"UL"==e.tagName||goog.ui.MenuRenderer.superClass_.canDecorate.call(this,e)},goog.ui.MenuRenderer.prototype.getDecoratorForChild=function(e){return"HR"==e.tagName?new goog.ui.Separator:goog.ui.MenuRenderer.superClass_.getDecoratorForChild.call(this,e)},goog.ui.MenuRenderer.prototype.containsElement=function(e,t){return goog.dom.contains(e.getElement(),t)},goog.ui.MenuRenderer.prototype.getCssClass=function(){return goog.ui.MenuRenderer.CSS_CLASS},goog.ui.MenuRenderer.prototype.initializeDom=function(e){goog.ui.MenuRenderer.superClass_.initializeDom.call(this,e),e=e.getElement(),goog.asserts.assert(e,"The menu DOM element cannot be null."),goog.a11y.aria.setState(e,goog.a11y.aria.State.HASPOPUP,"true")},goog.ui.MenuSeparator=function(e){goog.ui.Separator.call(this,goog.ui.MenuSeparatorRenderer.getInstance(),e)},goog.inherits(goog.ui.MenuSeparator,goog.ui.Separator),goog.ui.registry.setDecoratorByClassName(goog.ui.MenuSeparatorRenderer.CSS_CLASS,function(){return new goog.ui.Separator}),goog.ui.Menu=function(e,t){goog.ui.Container.call(this,goog.ui.Container.Orientation.VERTICAL,t||goog.ui.MenuRenderer.getInstance(),e),this.setFocusable(!1)},goog.inherits(goog.ui.Menu,goog.ui.Container),goog.tagUnsealableClass(goog.ui.Menu),goog.ui.Menu.EventType={BEFORE_SHOW:goog.ui.Component.EventType.BEFORE_SHOW,SHOW:goog.ui.Component.EventType.SHOW,BEFORE_HIDE:goog.ui.Component.EventType.HIDE,HIDE:goog.ui.Component.EventType.HIDE},goog.ui.Menu.CSS_CLASS=goog.ui.MenuRenderer.CSS_CLASS,goog.ui.Menu.prototype.allowAutoFocus_=!0,goog.ui.Menu.prototype.allowHighlightDisabled_=!1,goog.ui.Menu.prototype.getCssClass=function(){return this.getRenderer().getCssClass()},goog.ui.Menu.prototype.containsElement=function(e){if(this.getRenderer().containsElement(this,e))return!0;for(var t=0,o=this.getChildCount();o>t;t++){var n=this.getChildAt(t);if("function"==typeof n.containsElement&&n.containsElement(e))return!0}return!1},goog.ui.Menu.prototype.addItem=function(e){this.addChild(e,!0)},goog.ui.Menu.prototype.addItemAt=function(e,t){this.addChildAt(e,t,!0)},goog.ui.Menu.prototype.removeItem=function(e){(e=this.removeChild(e,!0))&&e.dispose()},goog.ui.Menu.prototype.removeItemAt=function(e){(e=this.removeChildAt(e,!0))&&e.dispose()},goog.ui.Menu.prototype.getItemAt=function(e){return this.getChildAt(e)},goog.ui.Menu.prototype.getItemCount=function(){return this.getChildCount()},goog.ui.Menu.prototype.getItems=function(){var e=[];return this.forEachChild(function(t){e.push(t)}),e},goog.ui.Menu.prototype.setPosition=function(e,t){var o=this.isVisible();o||goog.style.setElementShown(this.getElement(),!0),goog.style.setPageOffset(this.getElement(),e,t),o||goog.style.setElementShown(this.getElement(),!1)},goog.ui.Menu.prototype.getPosition=function(){return this.isVisible()?goog.style.getPageOffset(this.getElement()):null},goog.ui.Menu.prototype.setAllowAutoFocus=function(e){(this.allowAutoFocus_=e)&&this.setFocusable(!0)},goog.ui.Menu.prototype.getAllowAutoFocus=function(){return this.allowAutoFocus_},goog.ui.Menu.prototype.setAllowHighlightDisabled=function(e){this.allowHighlightDisabled_=e},goog.ui.Menu.prototype.getAllowHighlightDisabled=function(){return this.allowHighlightDisabled_},goog.ui.Menu.prototype.setVisible=function(e,t,o){return(t=goog.ui.Menu.superClass_.setVisible.call(this,e,t))&&e&&this.isInDocument()&&this.allowAutoFocus_&&this.getKeyEventTarget().focus(),this.openingCoords=e&&o&&goog.isNumber(o.clientX)?new goog.math.Coordinate(o.clientX,o.clientY):null,t},goog.ui.Menu.prototype.handleEnterItem=function(e){return this.allowAutoFocus_&&this.getKeyEventTarget().focus(),goog.ui.Menu.superClass_.handleEnterItem.call(this,e)},goog.ui.Menu.prototype.highlightNextPrefix=function(e){var t=new RegExp("^"+goog.string.regExpEscape(e),"i");return this.highlightHelper(function(e,o){var n=0>e?0:e,i=!1;do{++e,e==o&&(e=0,i=!0);var r=this.getChildAt(e).getCaption();if(r&&r.match(t))return e}while(!i||e!=n);return this.getHighlightedIndex()},this.getHighlightedIndex())},goog.ui.Menu.prototype.canHighlightItem=function(e){return(this.allowHighlightDisabled_||e.isEnabled())&&e.isVisible()&&e.isSupportedState(goog.ui.Component.State.HOVER)},goog.ui.Menu.prototype.decorateInternal=function(e){this.decorateContent(e),goog.ui.Menu.superClass_.decorateInternal.call(this,e)},goog.ui.Menu.prototype.handleKeyEventInternal=function(e){var t=goog.ui.Menu.superClass_.handleKeyEventInternal.call(this,e);return t||this.forEachChild(function(o){!t&&o.getMnemonic&&o.getMnemonic()==e.keyCode&&(this.isEnabled()&&this.setHighlighted(o),t=o.handleKeyEvent(e))},this),t},goog.ui.Menu.prototype.setHighlightedIndex=function(e){goog.ui.Menu.superClass_.setHighlightedIndex.call(this,e),(e=this.getChildAt(e))&&goog.style.scrollIntoContainerView(e.getElement(),this.getElement())},goog.ui.Menu.prototype.decorateContent=function(e){var t=this.getRenderer();e=this.getDomHelper().getElementsByTagNameAndClass("div",t.getCssClass()+"-content",e);for(var o=e.length,n=0;o>n;n++)t.decorateChildren(this,e[n])},goog.color={},goog.color.names={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},goog.color.parse=function(e){var t={};e=String(e);var o=goog.color.prependHashIfNecessaryHelper(e);if(goog.color.isValidHexColor_(o))return t.hex=goog.color.normalizeHex(o),t.type="hex",t;if(o=goog.color.isValidRgbColor_(e),o.length)return t.hex=goog.color.rgbArrayToHex(o),t.type="rgb",t;if(goog.color.names&&(o=goog.color.names[e.toLowerCase()]))return t.hex=o,t.type="named",t;throw Error(e+" is not a valid color string")},goog.color.isValidColor=function(e){var t=goog.color.prependHashIfNecessaryHelper(e);return!!(goog.color.isValidHexColor_(t)||goog.color.isValidRgbColor_(e).length||goog.color.names&&goog.color.names[e.toLowerCase()])},goog.color.parseRgb=function(e){var t=goog.color.isValidRgbColor_(e);if(!t.length)throw Error(e+" is not a valid RGB color");return t},goog.color.hexToRgbStyle=function(e){return goog.color.rgbStyle_(goog.color.hexToRgb(e))},goog.color.hexTripletRe_=/#(.)(.)(.)/,goog.color.normalizeHex=function(e){if(!goog.color.isValidHexColor_(e))throw Error("'"+e+"' is not a valid hex color");return 4==e.length&&(e=e.replace(goog.color.hexTripletRe_,"#$1$1$2$2$3$3")),e.toLowerCase()},goog.color.hexToRgb=function(e){e=goog.color.normalizeHex(e);var t=parseInt(e.substr(1,2),16),o=parseInt(e.substr(3,2),16);return e=parseInt(e.substr(5,2),16),[t,o,e]},goog.color.rgbToHex=function(e,t,o){if(e=Number(e),t=Number(t),o=Number(o),isNaN(e)||0>e||e>255||isNaN(t)||0>t||t>255||isNaN(o)||0>o||o>255)throw Error('"('+e+","+t+","+o+'") is not a valid RGB color');return e=goog.color.prependZeroIfNecessaryHelper(e.toString(16)),t=goog.color.prependZeroIfNecessaryHelper(t.toString(16)),o=goog.color.prependZeroIfNecessaryHelper(o.toString(16)),"#"+e+t+o},goog.color.rgbArrayToHex=function(e){return goog.color.rgbToHex(e[0],e[1],e[2])},goog.color.rgbToHsl=function(e,t,o){e/=255,t/=255,o/=255;var n=Math.max(e,t,o),i=Math.min(e,t,o),r=0,s=0,l=.5*(n+i);return n!=i&&(n==e?r=60*(t-o)/(n-i):n==t?r=60*(o-e)/(n-i)+120:n==o&&(r=60*(e-t)/(n-i)+240),s=l>0&&.5>=l?(n-i)/(2*l):(n-i)/(2-2*l)),[Math.round(r+360)%360,s,l]},goog.color.rgbArrayToHsl=function(e){return goog.color.rgbToHsl(e[0],e[1],e[2])},goog.color.hueToRgb_=function(e,t,o){return 0>o?o+=1:o>1&&--o,1>6*o?e+6*(t-e)*o:1>2*o?t:2>3*o?e+(t-e)*(2/3-o)*6:e},goog.color.hslToRgb=function(e,t,o){var n=0,i=0,r=0;if(e/=360,0==t)n=i=r=255*o;else var s=r=0,s=.5>o?o*(1+t):o+t-t*o,r=2*o-s,n=255*goog.color.hueToRgb_(r,s,e+1/3),i=255*goog.color.hueToRgb_(r,s,e),r=255*goog.color.hueToRgb_(r,s,e-1/3);return[Math.round(n),Math.round(i),Math.round(r)]},goog.color.hslArrayToRgb=function(e){return goog.color.hslToRgb(e[0],e[1],e[2])},goog.color.validHexColorRe_=/^#(?:[0-9a-f]{3}){1,2}$/i,goog.color.isValidHexColor_=function(e){return goog.color.validHexColorRe_.test(e)},goog.color.normalizedHexColorRe_=/^#[0-9a-f]{6}$/,goog.color.isNormalizedHexColor_=function(e){return goog.color.normalizedHexColorRe_.test(e)},goog.color.rgbColorRe_=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i,goog.color.isValidRgbColor_=function(e){var t=e.match(goog.color.rgbColorRe_);if(t){e=Number(t[1]);var o=Number(t[2]),t=Number(t[3]);if(e>=0&&255>=e&&o>=0&&255>=o&&t>=0&&255>=t)return[e,o,t]}return[]},goog.color.prependZeroIfNecessaryHelper=function(e){return 1==e.length?"0"+e:e},goog.color.prependHashIfNecessaryHelper=function(e){return"#"==e.charAt(0)?e:"#"+e},goog.color.rgbStyle_=function(e){return"rgb("+e.join(",")+")"},goog.color.hsvToRgb=function(e,t,o){var n=0,i=0,r=0;if(0==t)r=i=n=o;else{var s=Math.floor(e/60),l=e/60-s;e=o*(1-t);var a=o*(1-t*l);switch(t=o*(1-t*(1-l)),s){case 1:n=a,i=o,r=e;break;case 2:n=e,i=o,r=t;break;case 3:n=e,i=a,r=o;break;case 4:n=t,i=e,r=o;break;case 5:n=o,i=e,r=a;break;case 6:case 0:n=o,i=t,r=e}}return[Math.floor(n),Math.floor(i),Math.floor(r)]},goog.color.rgbToHsv=function(e,t,o){var n=Math.max(Math.max(e,t),o),i=Math.min(Math.min(e,t),o);if(i==n)i=e=0;else{var r=n-i,i=r/n;e=60*(e==n?(t-o)/r:t==n?2+(o-e)/r:4+(e-t)/r),0>e&&(e+=360),e>360&&(e-=360)}return[e,i,n]},goog.color.rgbArrayToHsv=function(e){return goog.color.rgbToHsv(e[0],e[1],e[2])},goog.color.hsvArrayToRgb=function(e){return goog.color.hsvToRgb(e[0],e[1],e[2])},goog.color.hexToHsl=function(e){return e=goog.color.hexToRgb(e),goog.color.rgbToHsl(e[0],e[1],e[2])},goog.color.hslToHex=function(e,t,o){return goog.color.rgbArrayToHex(goog.color.hslToRgb(e,t,o))},goog.color.hslArrayToHex=function(e){return goog.color.rgbArrayToHex(goog.color.hslToRgb(e[0],e[1],e[2]))},goog.color.hexToHsv=function(e){return goog.color.rgbArrayToHsv(goog.color.hexToRgb(e))},goog.color.hsvToHex=function(e,t,o){return goog.color.rgbArrayToHex(goog.color.hsvToRgb(e,t,o))},goog.color.hsvArrayToHex=function(e){return goog.color.hsvToHex(e[0],e[1],e[2])},goog.color.hslDistance=function(e,t){var o,n;return o=.5>=e[2]?e[1]*e[2]:e[1]*(1-e[2]),n=.5>=t[2]?t[1]*t[2]:t[1]*(1-t[2]),(e[2]-t[2])*(e[2]-t[2])+o*o+n*n-2*o*n*Math.cos(2*(e[0]/360-t[0]/360)*Math.PI)},goog.color.blend=function(e,t,o){return o=goog.math.clamp(o,0,1),[Math.round(o*e[0]+(1-o)*t[0]),Math.round(o*e[1]+(1-o)*t[1]),Math.round(o*e[2]+(1-o)*t[2])]},goog.color.darken=function(e,t){return goog.color.blend([0,0,0],e,t)},goog.color.lighten=function(e,t){return goog.color.blend([255,255,255],e,t)},goog.color.highContrast=function(e,t){for(var o=[],n=0;n=e.length)throw goog.iter.StopIteration;if(t in e)return e[t++];t++}},o}throw Error("Not implemented")},goog.iter.forEach=function(e,t,o){if(goog.isArrayLike(e))try{goog.array.forEach(e,t,o)}catch(n){if(n!==goog.iter.StopIteration)throw n}else{e=goog.iter.toIterator(e);try{for(;;)t.call(o,e.next(),void 0,e)}catch(i){if(i!==goog.iter.StopIteration)throw i}}},goog.iter.filter=function(e,t,o){var n=goog.iter.toIterator(e);return e=new goog.iter.Iterator,e.next=function(){for(;;){var e=n.next();if(t.call(o,e,void 0,n))return e}},e},goog.iter.filterFalse=function(e,t,o){return goog.iter.filter(e,goog.functions.not(t),o)},goog.iter.range=function(e,t,o){var n=0,i=e,r=o||1;if(10&&n>=i||0>r&&i>=n)throw goog.iter.StopIteration;var e=n;return n+=r,e},s},goog.iter.join=function(e,t){return goog.iter.toArray(e).join(t)},goog.iter.map=function(e,t,o){var n=goog.iter.toIterator(e);return e=new goog.iter.Iterator,e.next=function(){var e=n.next();return t.call(o,e,void 0,n)},e},goog.iter.reduce=function(e,t,o,n){var i=o;return goog.iter.forEach(e,function(e){i=t.call(n,i,e)}),i},goog.iter.some=function(e,t,o){e=goog.iter.toIterator(e);try{for(;;)if(t.call(o,e.next(),void 0,e))return!0}catch(n){if(n!==goog.iter.StopIteration)throw n}return!1},goog.iter.every=function(e,t,o){e=goog.iter.toIterator(e);try{for(;;)if(!t.call(o,e.next(),void 0,e))return!1}catch(n){if(n!==goog.iter.StopIteration)throw n}return!0},goog.iter.chain=function(){return goog.iter.chainFromIterable(arguments)},goog.iter.chainFromIterable=function(e){var t=goog.iter.toIterator(e);e=new goog.iter.Iterator;var o=null;return e.next=function(){for(;;){if(null==o){var e=t.next();o=goog.iter.toIterator(e)}try{return o.next()}catch(n){if(n!==goog.iter.StopIteration)throw n;o=null}}},e},goog.iter.dropWhile=function(e,t,o){var n=goog.iter.toIterator(e);e=new goog.iter.Iterator;var i=!0;return e.next=function(){for(;;){var e=n.next();if(!i||!t.call(o,e,void 0,n))return i=!1,e}},e},goog.iter.takeWhile=function(e,t,o){var n=goog.iter.toIterator(e);return e=new goog.iter.Iterator,e.next=function(){var e=n.next();if(t.call(o,e,void 0,n))return e;throw goog.iter.StopIteration},e},goog.iter.toArray=function(e){if(goog.isArrayLike(e))return goog.array.toArray(e);e=goog.iter.toIterator(e);var t=[];return goog.iter.forEach(e,function(e){t.push(e)}),t},goog.iter.equals=function(e,t,o){e=goog.iter.zipLongest({},e,t);var n=o||goog.array.defaultCompareEquality;return goog.iter.every(e,function(e){return n(e[0],e[1])})},goog.iter.nextOrValue=function(e,t){try{return goog.iter.toIterator(e).next()}catch(o){if(o!=goog.iter.StopIteration)throw o;return t}},goog.iter.product=function(){if(goog.array.some(arguments,function(e){return!e.length})||!arguments.length)return new goog.iter.Iterator;var e=new goog.iter.Iterator,t=arguments,o=goog.array.repeat(0,t.length);return e.next=function(){if(o){for(var e=goog.array.map(o,function(e,o){return t[o][e]}),n=o.length-1;n>=0;n--){if(goog.asserts.assert(o),o[n]=0);var o=goog.iter.toIterator(e),n=new goog.iter.Iterator,i=t;return n.next=function(){if(0=0);for(var o=goog.iter.toIterator(e);0=0),e=goog.iter.consume(e,t),goog.isNumber(o)&&(goog.asserts.assert(goog.math.isInt(o)&&o>=t),e=goog.iter.limit(e,o-t)),e},goog.iter.hasDuplicates_=function(e){var t=[];return goog.array.removeDuplicates(e,t),e.length!=t.length},goog.iter.permutations=function(e,t){var o=goog.iter.toArray(e),n=goog.isNumber(t)?t:o.length,o=goog.array.repeat(o,n),o=goog.iter.product.apply(void 0,o);return goog.iter.filter(o,function(e){return!goog.iter.hasDuplicates_(e)})},goog.iter.combinations=function(e,t){function o(e){return n[e]}var n=goog.iter.toArray(e),i=goog.iter.range(n.length),i=goog.iter.permutations(i,t),r=goog.iter.filter(i,function(e){return goog.array.isSorted(e)}),i=new goog.iter.Iterator;return i.next=function(){return goog.array.map(r.next(),o)},i},goog.iter.combinationsWithReplacement=function(e,t){function o(e){return n[e]}var n=goog.iter.toArray(e),i=goog.array.range(n.length),i=goog.array.repeat(i,t),i=goog.iter.product.apply(void 0,i),r=goog.iter.filter(i,function(e){return goog.array.isSorted(e)}),i=new goog.iter.Iterator;return i.next=function(){return goog.array.map(r.next(),o)},i},goog.dom.TagWalkType={START_TAG:1,OTHER:0,END_TAG:-1},goog.dom.TagIterator=function(e,t,o,n,i){this.reversed=!!t,e&&this.setPosition(e,n),this.depth=void 0!=i?i:this.tagType||0,this.reversed&&(this.depth*=-1),this.constrained=!o},goog.inherits(goog.dom.TagIterator,goog.iter.Iterator),goog.dom.TagIterator.prototype.node=null,goog.dom.TagIterator.prototype.tagType=goog.dom.TagWalkType.OTHER,goog.dom.TagIterator.prototype.started_=!1,goog.dom.TagIterator.prototype.setPosition=function(e,t,o){(this.node=e)&&(this.tagType=goog.isNumber(t)?t:this.node.nodeType!=goog.dom.NodeType.ELEMENT?goog.dom.TagWalkType.OTHER:this.reversed?goog.dom.TagWalkType.END_TAG:goog.dom.TagWalkType.START_TAG),goog.isNumber(o)&&(this.depth=o)},goog.dom.TagIterator.prototype.copyFrom=function(e){this.node=e.node,this.tagType=e.tagType,this.depth=e.depth,this.reversed=e.reversed,this.constrained=e.constrained},goog.dom.TagIterator.prototype.clone=function(){return new goog.dom.TagIterator(this.node,this.reversed,!this.constrained,this.tagType,this.depth)},goog.dom.TagIterator.prototype.skipTag=function(){var e=this.reversed?goog.dom.TagWalkType.END_TAG:goog.dom.TagWalkType.START_TAG;this.tagType==e&&(this.tagType=-1*e,this.depth+=this.tagType*(this.reversed?-1:1))},goog.dom.TagIterator.prototype.restartTag=function(){var e=this.reversed?goog.dom.TagWalkType.START_TAG:goog.dom.TagWalkType.END_TAG;this.tagType==e&&(this.tagType=-1*e,this.depth+=this.tagType*(this.reversed?-1:1))},goog.dom.TagIterator.prototype.next=function(){var e;if(this.started_){if(!this.node||this.constrained&&0==this.depth)throw goog.iter.StopIteration;e=this.node;var t=this.reversed?goog.dom.TagWalkType.END_TAG:goog.dom.TagWalkType.START_TAG;if(this.tagType==t){var o=this.reversed?e.lastChild:e.firstChild;o?this.setPosition(o):this.setPosition(e,-1*t)}else(o=this.reversed?e.previousSibling:e.nextSibling)?this.setPosition(o):this.setPosition(e.parentNode,-1*t);this.depth+=this.tagType*(this.reversed?-1:1)}else this.started_=!0;if(e=this.node,!this.node)throw goog.iter.StopIteration;return e},goog.dom.TagIterator.prototype.isStarted=function(){return this.started_},goog.dom.TagIterator.prototype.isStartTag=function(){return this.tagType==goog.dom.TagWalkType.START_TAG},goog.dom.TagIterator.prototype.isEndTag=function(){return this.tagType==goog.dom.TagWalkType.END_TAG},goog.dom.TagIterator.prototype.isNonElement=function(){return this.tagType==goog.dom.TagWalkType.OTHER},goog.dom.TagIterator.prototype.equals=function(e){return e.node==this.node&&(!this.node||e.tagType==this.tagType)},goog.dom.TagIterator.prototype.splice=function(){var e=this.node;this.restartTag(),this.reversed=!this.reversed,goog.dom.TagIterator.prototype.next.call(this),this.reversed=!this.reversed;for(var t=goog.isArrayLike(arguments[0])?arguments[0]:arguments,o=t.length-1;o>=0;o--)goog.dom.insertSiblingAfter(t[o],e);goog.dom.removeNode(e)},goog.dom.NodeIterator=function(e,t,o,n){goog.dom.TagIterator.call(this,e,t,o,null,n)},goog.inherits(goog.dom.NodeIterator,goog.dom.TagIterator),goog.dom.NodeIterator.prototype.next=function(){do goog.dom.NodeIterator.superClass_.next.call(this);while(this.isEndTag());return this.node},goog.ui.PaletteRenderer=function(){goog.ui.ControlRenderer.call(this)},goog.inherits(goog.ui.PaletteRenderer,goog.ui.ControlRenderer),goog.addSingletonGetter(goog.ui.PaletteRenderer),goog.ui.PaletteRenderer.cellId_=0,goog.ui.PaletteRenderer.CSS_CLASS="goog-palette",goog.ui.PaletteRenderer.prototype.createDom=function(e){var t=this.getClassNames(e);return e=e.getDomHelper().createDom(goog.dom.TagName.DIV,t?t.join(" "):null,this.createGrid(e.getContent(),e.getSize(),e.getDomHelper())),goog.a11y.aria.setRole(e,goog.a11y.aria.Role.GRID),e},goog.ui.PaletteRenderer.prototype.createGrid=function(e,t,o){for(var n=[],i=0,r=0;ithis.highlightedIndex_?this.getSelectedIndex():this.highlightedIndex_;switch(e.keyCode){case goog.events.KeyCodes.LEFT:return(-1==n||0==n)&&(n=t),this.setHighlightedIndex(n-1),e.preventDefault(),!0;case goog.events.KeyCodes.RIGHT:return n==t-1&&(n=-1),this.setHighlightedIndex(n+1),e.preventDefault(),!0;case goog.events.KeyCodes.UP:if(-1==n&&(n=t+o-1),n>=o)return this.setHighlightedIndex(n-o),e.preventDefault(),!0;break;case goog.events.KeyCodes.DOWN:if(-1==n&&(n=-o),t-o>n)return this.setHighlightedIndex(n+o),e.preventDefault(),!0}return!1},goog.ui.Palette.prototype.handleSelectionChange=function(){},goog.ui.Palette.prototype.getSize=function(){return this.size_},goog.ui.Palette.prototype.setSize=function(e,t){if(this.getElement())throw Error(goog.ui.Component.Error.ALREADY_RENDERED);this.size_=goog.isNumber(e)?new goog.math.Size(e,t):e,this.adjustSize_()},goog.ui.Palette.prototype.getHighlightedIndex=function(){return this.highlightedIndex_},goog.ui.Palette.prototype.getHighlightedItem=function(){var e=this.getContent();return e&&e[this.highlightedIndex_]},goog.ui.Palette.prototype.getHighlightedCellElement_=function(){return this.getRenderer().getCellForItem(this.getHighlightedItem())},goog.ui.Palette.prototype.setHighlightedIndex=function(e){e!=this.highlightedIndex_&&(this.highlightIndex_(this.highlightedIndex_,!1),this.lastHighlightedIndex_=this.highlightedIndex_,this.highlightedIndex_=e,this.highlightIndex_(e,!0),this.dispatchEvent(goog.ui.Palette.EventType.AFTER_HIGHLIGHT))},goog.ui.Palette.prototype.setHighlightedItem=function(e){var t=this.getContent();this.setHighlightedIndex(t?goog.array.indexOf(t,e):-1)},goog.ui.Palette.prototype.getSelectedIndex=function(){return this.selectionModel_?this.selectionModel_.getSelectedIndex():-1},goog.ui.Palette.prototype.getSelectedItem=function(){return this.selectionModel_?this.selectionModel_.getSelectedItem():null},goog.ui.Palette.prototype.setSelectedIndex=function(e){this.selectionModel_&&this.selectionModel_.setSelectedIndex(e)},goog.ui.Palette.prototype.setSelectedItem=function(e){this.selectionModel_&&this.selectionModel_.setSelectedItem(e)},goog.ui.Palette.prototype.highlightIndex_=function(e,t){if(this.getElement()){var o=this.getContent();if(o&&e>=0&&en;n++)t.push(e[n]);return t}return goog.object.getValues(e)},goog.structs.getKeys=function(e){if("function"==typeof e.getKeys)return e.getKeys();if("function"!=typeof e.getValues){if(goog.isArrayLike(e)||goog.isString(e)){var t=[];e=e.length;for(var o=0;e>o;o++)t.push(o);return t}return goog.object.getKeys(e)}},goog.structs.contains=function(e,t){return"function"==typeof e.contains?e.contains(t):"function"==typeof e.containsValue?e.containsValue(t):goog.isArrayLike(e)||goog.isString(e)?goog.array.contains(e,t):goog.object.containsValue(e,t)},goog.structs.isEmpty=function(e){return"function"==typeof e.isEmpty?e.isEmpty():goog.isArrayLike(e)||goog.isString(e)?goog.array.isEmpty(e):goog.object.isEmpty(e)},goog.structs.clear=function(e){"function"==typeof e.clear?e.clear():goog.isArrayLike(e)?goog.array.clear(e):goog.object.clear(e)},goog.structs.forEach=function(e,t,o){if("function"==typeof e.forEach)e.forEach(t,o);else if(goog.isArrayLike(e)||goog.isString(e))goog.array.forEach(e,t,o);else for(var n=goog.structs.getKeys(e),i=goog.structs.getValues(e),r=i.length,s=0;r>s;s++)t.call(o,i[s],n&&n[s],e)},goog.structs.filter=function(e,t,o){if("function"==typeof e.filter)return e.filter(t,o);if(goog.isArrayLike(e)||goog.isString(e))return goog.array.filter(e,t,o);var n,i=goog.structs.getKeys(e),r=goog.structs.getValues(e),s=r.length;if(i){n={};for(var l=0;s>l;l++)t.call(o,r[l],i[l],e)&&(n[i[l]]=r[l])}else for(n=[],l=0;s>l;l++)t.call(o,r[l],void 0,e)&&n.push(r[l]);return n},goog.structs.map=function(e,t,o){if("function"==typeof e.map)return e.map(t,o);if(goog.isArrayLike(e)||goog.isString(e))return goog.array.map(e,t,o);var n,i=goog.structs.getKeys(e),r=goog.structs.getValues(e),s=r.length;if(i){n={};for(var l=0;s>l;l++)n[i[l]]=t.call(o,r[l],i[l],e)}else for(n=[],l=0;s>l;l++)n[l]=t.call(o,r[l],void 0,e);return n},goog.structs.some=function(e,t,o){if("function"==typeof e.some)return e.some(t,o);if(goog.isArrayLike(e)||goog.isString(e))return goog.array.some(e,t,o);for(var n=goog.structs.getKeys(e),i=goog.structs.getValues(e),r=i.length,s=0;r>s;s++)if(t.call(o,i[s],n&&n[s],e))return!0;return!1},goog.structs.every=function(e,t,o){if("function"==typeof e.every)return e.every(t,o);if(goog.isArrayLike(e)||goog.isString(e))return goog.array.every(e,t,o);for(var n=goog.structs.getKeys(e),i=goog.structs.getValues(e),r=i.length,s=0;r>s;s++)if(!t.call(o,i[s],n&&n[s],e))return!1;return!0},goog.structs.Collection=function(){},goog.structs.Map=function(e){this.map_={},this.keys_=[],this.version_=this.count_=0;var t=arguments.length;if(t>1){if(t%2)throw Error("Uneven number of arguments");for(var o=0;t>o;o+=2)this.set(arguments[o],arguments[o+1])}else e&&this.addAll(e)},goog.structs.Map.prototype.getCount=function(){return this.count_},goog.structs.Map.prototype.getValues=function(){this.cleanupKeysArray_();for(var e=[],t=0;t2*this.count_&&this.cleanupKeysArray_(),!0):!1},goog.structs.Map.prototype.cleanupKeysArray_=function(){if(this.count_!=this.keys_.length){for(var e=0,t=0;e=o.length)throw goog.iter.StopIteration;var s=o[t++];return e?s:n[s]}},s},goog.structs.Map.hasKey_=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},goog.structs.Set=function(e){this.map_=new goog.structs.Map,e&&this.addAll(e)},goog.structs.Set.getKey_=function(e){var t=typeof e;return"object"==t&&e||"function"==t?"o"+goog.getUid(e):t.substr(0,1)+e},goog.structs.Set.prototype.getCount=function(){return this.map_.getCount()},goog.structs.Set.prototype.add=function(e){this.map_.set(goog.structs.Set.getKey_(e),e)},goog.structs.Set.prototype.addAll=function(e){e=goog.structs.getValues(e);for(var t=e.length,o=0;t>o;o++)this.add(e[o])},goog.structs.Set.prototype.removeAll=function(e){e=goog.structs.getValues(e);for(var t=e.length,o=0;t>o;o++)this.remove(e[o])},goog.structs.Set.prototype.remove=function(e){return this.map_.remove(goog.structs.Set.getKey_(e))},goog.structs.Set.prototype.clear=function(){this.map_.clear()},goog.structs.Set.prototype.isEmpty=function(){return this.map_.isEmpty()},goog.structs.Set.prototype.contains=function(e){return this.map_.containsKey(goog.structs.Set.getKey_(e))},goog.structs.Set.prototype.containsAll=function(e){return goog.structs.every(e,this.contains,this)},goog.structs.Set.prototype.intersection=function(e){var t=new goog.structs.Set;e=goog.structs.getValues(e);for(var o=0;ot?!1:(!(e instanceof goog.structs.Set)&&t>5&&(e=new goog.structs.Set(e)),goog.structs.every(this,function(t){return goog.structs.contains(e,t)}))},goog.structs.Set.prototype.__iterator__=function(){return this.map_.__iterator__(!1)},goog.debug.LOGGING_ENABLED=goog.DEBUG,goog.debug.catchErrors=function(e,t,o){o=o||goog.global;var n=o.onerror,i=!!t;goog.userAgent.WEBKIT&&!goog.userAgent.isVersionOrHigher("535.3")&&(i=!i),o.onerror=function(t,o,r,s,l){return n&&n(t,o,r,s,l),e({message:t,fileName:o,line:r,col:s,error:l}),i}},goog.debug.expose=function(e,t){if("undefined"==typeof e)return"undefined";if(null==e)return"NULL";var o,n=[];for(o in e)if(t||!goog.isFunction(e[o])){var i=o+" = ";try{i+=e[o]}catch(r){i+="*** "+r+" ***"}n.push(i)}return n.join("\n")},goog.debug.deepExpose=function(e,t){var o=[],n=function(e,i,r){var s=i+" ";r=new goog.structs.Set(r);try{if(goog.isDef(e))if(goog.isNull(e))o.push("NULL");else if(goog.isString(e))o.push('"'+e.replace(/\n/g,"\n"+i)+'"');else if(goog.isFunction(e))o.push(String(e).replace(/\n/g,"\n"+i));else if(goog.isObject(e))if(r.contains(e))o.push("*** reference loop detected ***");else{r.add(e),o.push("{");for(var l in e)(t||!goog.isFunction(e[l]))&&(o.push("\n"),o.push(s),o.push(l+" = "),n(e[l],s,r));o.push("\n"+i+"}")}else o.push(e);else o.push("undefined")}catch(a){o.push("*** "+a+" ***")}};return n(e,"",new goog.structs.Set),o.join("")},goog.debug.exposeArray=function(e){for(var t=[],o=0;o'+o.fileName+"\nLine: "+o.lineNumber+"\n\nBrowser stack:\n"+goog.string.htmlEscape(o.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+goog.string.htmlEscape(goog.debug.getStacktrace(t)+"-> ")}catch(n){return"Exception trying to expose exception! You win, we lose. "+n}},goog.debug.normalizeErrorObject=function(e){var t=goog.getObjectByName("window.location.href");if(goog.isString(e))return{message:e,name:"Unknown error",lineNumber:"Not available",fileName:t,stack:"Not available"};var o,n,i=!1;try{o=e.lineNumber||e.line||"Not available"}catch(r){o="Not available",i=!0}try{n=e.fileName||e.filename||e.sourceURL||goog.global.$googDebugFname||t}catch(s){n="Not available",i=!0}return!i&&e.lineNumber&&e.fileName&&e.stack&&e.message&&e.name?e:{message:e.message||"Not available",name:e.name||"UnknownError",lineNumber:o,fileName:n,stack:e.stack||"Not available"}},goog.debug.enhanceError=function(e,t){var o;if("string"==typeof e?(o=Error(e),Error.captureStackTrace&&Error.captureStackTrace(o,goog.debug.enhanceError)):o=e,o.stack||(o.stack=goog.debug.getStacktrace(goog.debug.enhanceError)),t){for(var n=0;o["message"+n];)++n;o["message"+n]=String(t)}return o},goog.debug.getStacktraceSimple=function(e){if(goog.STRICT_MODE_COMPATIBLE){var t=goog.debug.getNativeStackTrace_(goog.debug.getStacktraceSimple);if(t)return t}for(var t=[],o=arguments.callee.caller,n=0;o&&(!e||e>n);){t.push(goog.debug.getFunctionName(o)),t.push("()\n");try{o=o.caller}catch(i){t.push("[exception trying to get caller]\n");break}if(n++,n>=goog.debug.MAX_STACK_DEPTH){t.push("[...long stack...]");break}}return e&&n>=e?t.push("[...reached max depth limit...]"):t.push("[end]"),t.join("")},goog.debug.MAX_STACK_DEPTH=50,goog.debug.getNativeStackTrace_=function(e){var t=Error();if(Error.captureStackTrace)return Error.captureStackTrace(t,e),String(t.stack);try{throw t}catch(o){t=o}return(e=t.stack)?String(e):null},goog.debug.getStacktrace=function(e){var t;return goog.STRICT_MODE_COMPATIBLE&&(t=goog.debug.getNativeStackTrace_(e||goog.debug.getStacktrace)),t||(t=goog.debug.getStacktraceHelper_(e||arguments.callee.caller,[])),t},goog.debug.getStacktraceHelper_=function(e,t){var o=[];if(goog.array.contains(t,e))o.push("[...circular reference...]");else if(e&&t.length0&&o.push(", ");var r;switch(r=n[i],typeof r){case"object":r=r?"object":"null";break;case"string":break;case"number":r=String(r);break;case"boolean":r=r?"true":"false";break;case"function":r=(r=goog.debug.getFunctionName(r))?r:"[fn]";break;default:r=typeof r}40=this.getEffectiveLevel().value},goog.debug.Logger.prototype.log=function(e,t,o){goog.debug.LOGGING_ENABLED&&this.isLoggable(e)&&(goog.isFunction(t)&&(t=t()),this.doLogRecord_(this.getLogRecord(e,t,o)))},goog.debug.Logger.prototype.getLogRecord=function(e,t,o){return e=goog.debug.LogBuffer.isBufferingEnabled()?goog.debug.LogBuffer.getInstance().addRecord(e,t,this.name_):new goog.debug.LogRecord(e,String(t),this.name_),o&&e.setException(o),e},goog.debug.Logger.prototype.shout=function(e,t){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.SHOUT,e,t)},goog.debug.Logger.prototype.severe=function(e,t){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.SEVERE,e,t)},goog.debug.Logger.prototype.warning=function(e,t){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.WARNING,e,t)},goog.debug.Logger.prototype.info=function(e,t){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.INFO,e,t)},goog.debug.Logger.prototype.config=function(e,t){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.CONFIG,e,t)},goog.debug.Logger.prototype.fine=function(e,t){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.FINE,e,t)},goog.debug.Logger.prototype.finer=function(e,t){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.FINER,e,t)},goog.debug.Logger.prototype.finest=function(e,t){goog.debug.LOGGING_ENABLED&&this.log(goog.debug.Logger.Level.FINEST,e,t)},goog.debug.Logger.prototype.logRecord=function(e){goog.debug.LOGGING_ENABLED&&this.isLoggable(e.getLevel())&&this.doLogRecord_(e)},goog.debug.Logger.prototype.doLogRecord_=function(e){if(goog.debug.Logger.logToProfilers("log:"+e.getMessage()),goog.debug.Logger.ENABLE_HIERARCHY)for(var t=this;t;)t.callPublish_(e),t=t.getParent();else for(var o,t=0;o=goog.debug.Logger.rootHandlers_[t++];)o(e)},goog.debug.Logger.prototype.callPublish_=function(e){if(this.handlers_)for(var t,o=0;t=this.handlers_[o];o++)t(e)},goog.debug.Logger.prototype.setParent_=function(e){this.parent_=e},goog.debug.Logger.prototype.addChild_=function(e,t){this.getChildren()[e]=t},goog.debug.LogManager={},goog.debug.LogManager.loggers_={},goog.debug.LogManager.rootLogger_=null,goog.debug.LogManager.initialize=function(){goog.debug.LogManager.rootLogger_||(goog.debug.LogManager.rootLogger_=new goog.debug.Logger(goog.debug.Logger.ROOT_LOGGER_NAME),goog.debug.LogManager.loggers_[goog.debug.Logger.ROOT_LOGGER_NAME]=goog.debug.LogManager.rootLogger_,goog.debug.LogManager.rootLogger_.setLevel(goog.debug.Logger.Level.CONFIG))},goog.debug.LogManager.getLoggers=function(){return goog.debug.LogManager.loggers_},goog.debug.LogManager.getRoot=function(){return goog.debug.LogManager.initialize(),goog.debug.LogManager.rootLogger_},goog.debug.LogManager.getLogger=function(e){return goog.debug.LogManager.initialize(),goog.debug.LogManager.loggers_[e]||goog.debug.LogManager.createLogger_(e)},goog.debug.LogManager.createFunctionForCatchErrors=function(e){return function(t){(e||goog.debug.LogManager.getRoot()).severe("Error: "+t.message+" ("+t.fileName+" @ Line: "+t.line+")")}},goog.debug.LogManager.createLogger_=function(e){var t=new goog.debug.Logger(e);if(goog.debug.Logger.ENABLE_HIERARCHY){var o=e.lastIndexOf("."),n=e.substr(0,o),o=e.substr(o+1),n=goog.debug.LogManager.getLogger(n);n.addChild_(o,t),t.setParent_(n)}return goog.debug.LogManager.loggers_[e]=t},goog.log={},goog.log.ENABLED=goog.debug.LOGGING_ENABLED,goog.log.ROOT_LOGGER_NAME=goog.debug.Logger.ROOT_LOGGER_NAME,goog.log.Logger=goog.debug.Logger,goog.log.Level=goog.debug.Logger.Level,goog.log.LogRecord=goog.debug.LogRecord,goog.log.getLogger=function(e,t){if(goog.log.ENABLED){var o=goog.debug.LogManager.getLogger(e);return t&&o&&o.setLevel(t),o}return null},goog.log.addHandler=function(e,t){goog.log.ENABLED&&e&&e.addHandler(t)},goog.log.removeHandler=function(e,t){return goog.log.ENABLED&&e?e.removeHandler(t):!1},goog.log.log=function(e,t,o,n){goog.log.ENABLED&&e&&e.log(t,o,n)},goog.log.error=function(e,t,o){goog.log.ENABLED&&e&&e.severe(t,o)},goog.log.warning=function(e,t,o){goog.log.ENABLED&&e&&e.warning(t,o)},goog.log.info=function(e,t,o){goog.log.ENABLED&&e&&e.info(t,o)},goog.log.fine=function(e,t,o){goog.log.ENABLED&&e&&e.fine(t,o)},goog.html.legacyconversions={},goog.html.legacyconversions.ALLOW_LEGACY_CONVERSIONS=!0,goog.html.legacyconversions.safeHtmlFromString=function(e){return goog.html.legacyconversions.throwIfConversionDisallowed_(),goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(e,null)},goog.html.legacyconversions.trustedResourceUrlFromString=function(e){return goog.html.legacyconversions.throwIfConversionDisallowed_(),goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.legacyconversions.safeUrlFromString=function(e){return goog.html.legacyconversions.throwIfConversionDisallowed_(),goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(e)},goog.html.legacyconversions.reportCallback_=goog.nullFunction,goog.html.legacyconversions.setReportCallback=function(e){goog.html.legacyconversions.reportCallback_=e},goog.html.legacyconversions.throwIfConversionDisallowed_=function(){if(!goog.html.legacyconversions.ALLOW_LEGACY_CONVERSIONS)throw Error("Error: Legacy conversion from string to goog.html types is disabled");goog.html.legacyconversions.reportCallback_()},goog.string.StringBuffer=function(e){null!=e&&this.append.apply(this,arguments)},goog.string.StringBuffer.prototype.buffer_="",goog.string.StringBuffer.prototype.set=function(e){this.buffer_=""+e},goog.string.StringBuffer.prototype.append=function(e,t){if(this.buffer_+=e,null!=t)for(var o=1;o=t;t++){var o=this.getChildAt(t-1).getElement();goog.asserts.assert(o,"The child element cannot be null"),goog.a11y.aria.setState(o,"setsize",e),goog.a11y.aria.setState(o,"posinset",t)}}},goog.ui.tree.BaseNode.prototype.createDom=function(){var e=this.getDomHelper().safeHtmlToNode(this.toSafeHtml());this.setElementInternal(e)},goog.ui.tree.BaseNode.prototype.enterDocument=function(){goog.ui.tree.BaseNode.superClass_.enterDocument.call(this),goog.ui.tree.BaseNode.allNodes[this.getId()]=this,this.initAccessibility()},goog.ui.tree.BaseNode.prototype.exitDocument=function(){goog.ui.tree.BaseNode.superClass_.exitDocument.call(this),delete goog.ui.tree.BaseNode.allNodes[this.getId()]},goog.ui.tree.BaseNode.prototype.addChildAt=function(e,t,o){goog.asserts.assert(!e.getParent()),goog.asserts.assertInstanceof(e,goog.ui.tree.BaseNode),o=this.getChildAt(t-1);var n=this.getChildAt(t);if(goog.ui.tree.BaseNode.superClass_.addChildAt.call(this,e,t),e.previousSibling_=o,e.nextSibling_=n,o?o.nextSibling_=e:this.firstChild_=e,n?n.previousSibling_=e:this.lastChild_=e,(t=this.getTree())&&e.setTreeInternal(t),e.setDepth_(this.getDepth()+1),this.getElement()&&(this.updateExpandIcon(),this.getExpanded())){t=this.getChildrenElement(),e.getElement()||e.createDom();var i=e.getElement(),r=n&&n.getElement();t.insertBefore(i,r),this.isInDocument()&&e.enterDocument(),n||(o?o.updateExpandIcon():(goog.style.setElementShown(t,!0),this.setExpanded(this.getExpanded())))}},goog.ui.tree.BaseNode.prototype.add=function(e,t){return goog.asserts.assert(!t||t.getParent()==this,"Can only add nodes before siblings"),e.getParent()&&e.getParent().removeChild(e),this.addChildAt(e,t?this.indexOfChild(t):this.getChildCount()),e},goog.ui.tree.BaseNode.prototype.removeChild=function(e){var t=this.getTree(),o=t?t.getSelectedItem():null;if((o==e||e.contains(o))&&(t.hasFocus()?(this.select(),goog.Timer.callOnce(this.onTimeoutSelect_,10,this)):this.select()),goog.ui.tree.BaseNode.superClass_.removeChild.call(this,e),this.lastChild_==e&&(this.lastChild_=e.previousSibling_),this.firstChild_==e&&(this.firstChild_=e.nextSibling_),e.previousSibling_&&(e.previousSibling_.nextSibling_=e.nextSibling_),e.nextSibling_&&(e.nextSibling_.previousSibling_=e.previousSibling_),o=e.isLastSibling(),e.tree=null,e.depth_=-1,t&&(t.removeNode(this),this.isInDocument())){if(t=this.getChildrenElement(),e.isInDocument()){var n=e.getElement();t.removeChild(n),e.exitDocument()}o&&(o=this.getLastChild())&&o.updateExpandIcon(),this.hasChildren()||(t.style.display="none",this.updateExpandIcon(),this.updateIcon_())}return e},goog.ui.tree.BaseNode.prototype.remove=goog.ui.tree.BaseNode.prototype.removeChild,goog.ui.tree.BaseNode.prototype.onTimeoutSelect_=function(){this.select()},goog.ui.tree.BaseNode.prototype.getDepth=function(){var e=this.depth_;return 0>e&&(e=this.computeDepth_(),this.setDepth_(e)),e},goog.ui.tree.BaseNode.prototype.computeDepth_=function(){var e=this.getParent();return e?e.getDepth()+1:0},goog.ui.tree.BaseNode.prototype.setDepth_=function(e){if(e!=this.depth_){this.depth_=e;var t=this.getRowElement();if(t){var o=this.getPixelIndent_()+"px";this.isRightToLeft()?t.style.paddingRight=o:t.style.paddingLeft=o}this.forEachChild(function(t){t.setDepth_(e+1)})}},goog.ui.tree.BaseNode.prototype.contains=function(e){for(;e;){if(e==this)return!0;e=e.getParent()}return!1},goog.ui.tree.BaseNode.EMPTY_CHILDREN_=[],goog.ui.tree.BaseNode.prototype.getChildren=function(){var e=[];return this.forEachChild(function(t){e.push(t)}),e},goog.ui.tree.BaseNode.prototype.getFirstChild=function(){return this.getChildAt(0)},goog.ui.tree.BaseNode.prototype.getLastChild=function(){return this.getChildAt(this.getChildCount()-1)},goog.ui.tree.BaseNode.prototype.getPreviousSibling=function(){return this.previousSibling_},goog.ui.tree.BaseNode.prototype.getNextSibling=function(){return this.nextSibling_},goog.ui.tree.BaseNode.prototype.isLastSibling=function(){return!this.nextSibling_},goog.ui.tree.BaseNode.prototype.isSelected=function(){return this.selected_},goog.ui.tree.BaseNode.prototype.select=function(){var e=this.getTree();e&&e.setSelectedItem(this)},goog.ui.tree.BaseNode.prototype.deselect=goog.nullFunction,goog.ui.tree.BaseNode.prototype.setSelectedInternal=function(e){if(this.selected_!=e){this.selected_=e,this.updateRow();var t=this.getElement();t&&(goog.a11y.aria.setState(t,"selected",e),e&&(e=this.getTree().getElement(),goog.asserts.assert(e,"The DOM element for the tree cannot be null"),goog.a11y.aria.setState(e,"activedescendant",this.getId())))}},goog.ui.tree.BaseNode.prototype.getExpanded=function(){return this.expanded_},goog.ui.tree.BaseNode.prototype.setExpandedInternal=function(e){this.expanded_=e},goog.ui.tree.BaseNode.prototype.setExpanded=function(e){var t=e!=this.expanded_;if(!t||this.dispatchEvent(e?goog.ui.tree.BaseNode.EventType.BEFORE_EXPAND:goog.ui.tree.BaseNode.EventType.BEFORE_COLLAPSE)){var o;this.expanded_=e,o=this.getTree();var n=this.getElement();if(this.hasChildren()){if(!e&&o&&this.contains(o.getSelectedItem())&&this.select(),n){if((o=this.getChildrenElement())&&(goog.style.setElementShown(o,e),e&&this.isInDocument()&&!o.hasChildNodes())){var i=[];this.forEachChild(function(e){i.push(e.toSafeHtml())}),goog.dom.safe.setInnerHtml(o,goog.html.SafeHtml.concat(i)),this.forEachChild(function(e){e.enterDocument()})}this.updateExpandIcon()}}else(o=this.getChildrenElement())&&goog.style.setElementShown(o,!1);n&&(this.updateIcon_(),goog.a11y.aria.setState(n,"expanded",e)),t&&this.dispatchEvent(e?goog.ui.tree.BaseNode.EventType.EXPAND:goog.ui.tree.BaseNode.EventType.COLLAPSE)}},goog.ui.tree.BaseNode.prototype.toggle=function(){this.setExpanded(!this.getExpanded())},goog.ui.tree.BaseNode.prototype.expand=function(){this.setExpanded(!0)},goog.ui.tree.BaseNode.prototype.collapse=function(){this.setExpanded(!1)},goog.ui.tree.BaseNode.prototype.collapseChildren=function(){this.forEachChild(function(e){e.collapseAll()})},goog.ui.tree.BaseNode.prototype.collapseAll=function(){this.collapseChildren(),this.collapse()},goog.ui.tree.BaseNode.prototype.expandChildren=function(){this.forEachChild(function(e){e.expandAll()})},goog.ui.tree.BaseNode.prototype.expandAll=function(){this.expandChildren(),this.expand()},goog.ui.tree.BaseNode.prototype.reveal=function(){var e=this.getParent();e&&(e.setExpanded(!0),e.reveal())},goog.ui.tree.BaseNode.prototype.setIsUserCollapsible=function(e){(this.isUserCollapsible_=e)||this.expand(),this.getElement()&&this.updateExpandIcon()},goog.ui.tree.BaseNode.prototype.isUserCollapsible=function(){return this.isUserCollapsible_},goog.ui.tree.BaseNode.prototype.toSafeHtml=function(){var e=this.getTree(),t=!e.getShowLines()||e==this.getParent()&&!e.getShowRootLines()?this.config_.cssChildrenNoLines:this.config_.cssChildren,e=this.getExpanded()&&this.hasChildren(),t={"class":t,style:this.getLineStyle()},o=[];return e&&this.forEachChild(function(e){o.push(e.toSafeHtml())}),e=goog.html.SafeHtml.create("div",t,o),goog.html.SafeHtml.create("div",{"class":this.config_.cssItem,id:this.getId()},[this.getRowSafeHtml(),e])},goog.ui.tree.BaseNode.prototype.getPixelIndent_=function(){return Math.max(0,(this.getDepth()-1)*this.config_.indentWidth)},goog.ui.tree.BaseNode.prototype.getRowSafeHtml=function(){var e={};e["padding-"+(this.isRightToLeft()?"right":"left")]=this.getPixelIndent_()+"px";var e={"class":this.getRowClassName(),style:e},t=[this.getExpandIconSafeHtml(),this.getIconSafeHtml(),this.getLabelSafeHtml()];return goog.html.SafeHtml.create("div",e,t)},goog.ui.tree.BaseNode.prototype.getRowClassName=function(){var e;return e=this.isSelected()?" "+this.config_.cssSelectedRow:"",this.config_.cssTreeRow+e},goog.ui.tree.BaseNode.prototype.getLabelSafeHtml=function(){var e=goog.html.SafeHtml.create("span",{"class":this.config_.cssItemLabel,title:this.getToolTip()||null},this.getSafeHtml());return goog.html.SafeHtml.concat(e,goog.html.SafeHtml.create("span",{},this.getAfterLabelSafeHtml()))},goog.ui.tree.BaseNode.prototype.getAfterLabelHtml=function(){return goog.html.SafeHtml.unwrap(this.getAfterLabelSafeHtml())},goog.ui.tree.BaseNode.prototype.getAfterLabelSafeHtml=function(){return this.afterLabelHtml_},goog.ui.tree.BaseNode.prototype.setAfterLabelHtml=function(e){this.setAfterLabelSafeHtml(goog.html.legacyconversions.safeHtmlFromString(e))},goog.ui.tree.BaseNode.prototype.setAfterLabelSafeHtml=function(e){this.afterLabelHtml_=e;var t=this.getAfterLabelElement();t&&goog.dom.safe.setInnerHtml(t,e)},goog.ui.tree.BaseNode.prototype.getIconSafeHtml=function(){return goog.html.SafeHtml.create("span",{style:{display:"inline-block"},"class":this.getCalculatedIconClass()})},goog.ui.tree.BaseNode.prototype.getExpandIconSafeHtml=function(){return goog.html.SafeHtml.create("span",{type:"expand",style:{display:"inline-block"},"class":this.getExpandIconClass()})},goog.ui.tree.BaseNode.prototype.getExpandIconClass=function(){var e=this.getTree(),t=!e.getShowLines()||e==this.getParent()&&!e.getShowRootLines(),o=this.config_,n=new goog.string.StringBuffer;if(n.append(o.cssTreeIcon," ",o.cssExpandTreeIcon," "),this.hasChildren()){var i=0;switch(e.getShowExpandIcons()&&this.isUserCollapsible_&&(i=this.getExpanded()?2:1),t||(i=this.isLastSibling()?i+4:i+8),i){case 1:n.append(o.cssExpandTreeIconPlus);break;case 2:n.append(o.cssExpandTreeIconMinus);break;case 4:n.append(o.cssExpandTreeIconL);break;case 5:n.append(o.cssExpandTreeIconLPlus);break;case 6:n.append(o.cssExpandTreeIconLMinus);break;case 8:n.append(o.cssExpandTreeIconT);break;case 9:n.append(o.cssExpandTreeIconTPlus);break;case 10:n.append(o.cssExpandTreeIconTMinus);break;default:n.append(o.cssExpandTreeIconBlank)}}else t?n.append(o.cssExpandTreeIconBlank):this.isLastSibling()?n.append(o.cssExpandTreeIconL):n.append(o.cssExpandTreeIconT);return n.toString()},goog.ui.tree.BaseNode.prototype.getLineStyle=function(){var e=this.getExpanded()&&this.hasChildren();return goog.html.SafeStyle.create({"background-position":this.getBackgroundPosition(),display:e?null:"none"})},goog.ui.tree.BaseNode.prototype.getBackgroundPosition=function(){return(this.isLastSibling()?"-100":(this.getDepth()-1)*this.config_.indentWidth)+"px 0"},goog.ui.tree.BaseNode.prototype.getElement=function(){var e=goog.ui.tree.BaseNode.superClass_.getElement.call(this);return e||(e=this.getDomHelper().getElement(this.getId()),this.setElementInternal(e)),e},goog.ui.tree.BaseNode.prototype.getRowElement=function(){var e=this.getElement();return e?e.firstChild:null},goog.ui.tree.BaseNode.prototype.getExpandIconElement=function(){var e=this.getRowElement();return e?e.firstChild:null},goog.ui.tree.BaseNode.prototype.getIconElement=function(){var e=this.getRowElement();return e?e.childNodes[1]:null},goog.ui.tree.BaseNode.prototype.getLabelElement=function(){var e=this.getRowElement();return e&&e.lastChild?e.lastChild.previousSibling:null},goog.ui.tree.BaseNode.prototype.getAfterLabelElement=function(){var e=this.getRowElement();return e?e.lastChild:null},goog.ui.tree.BaseNode.prototype.getChildrenElement=function(){var e=this.getElement();return e?e.lastChild:null},goog.ui.tree.BaseNode.prototype.setIconClass=function(e){this.iconClass_=e,this.isInDocument()&&this.updateIcon_()},goog.ui.tree.BaseNode.prototype.getIconClass=function(){return this.iconClass_},goog.ui.tree.BaseNode.prototype.setExpandedIconClass=function(e){this.expandedIconClass_=e,this.isInDocument()&&this.updateIcon_()},goog.ui.tree.BaseNode.prototype.getExpandedIconClass=function(){return this.expandedIconClass_},goog.ui.tree.BaseNode.prototype.setText=function(e){this.setSafeHtml(goog.html.SafeHtml.htmlEscape(e))},goog.ui.tree.BaseNode.prototype.getText=function(){return goog.string.unescapeEntities(goog.html.SafeHtml.unwrap(this.html_))},goog.ui.tree.BaseNode.prototype.setHtml=function(e){this.setSafeHtml(goog.html.legacyconversions.safeHtmlFromString(e))},goog.ui.tree.BaseNode.prototype.setSafeHtml=function(e){this.html_=e;var t=this.getLabelElement();t&&goog.dom.safe.setInnerHtml(t,e),(e=this.getTree())&&e.setNode(this)},goog.ui.tree.BaseNode.prototype.getHtml=function(){return goog.html.SafeHtml.unwrap(this.getSafeHtml())},goog.ui.tree.BaseNode.prototype.getSafeHtml=function(){return this.html_},goog.ui.tree.BaseNode.prototype.setToolTip=function(e){this.toolTip_=e;var t=this.getLabelElement();t&&(t.title=e)},goog.ui.tree.BaseNode.prototype.getToolTip=function(){return this.toolTip_},goog.ui.tree.BaseNode.prototype.updateRow=function(){var e=this.getRowElement();e&&(e.className=this.getRowClassName())},goog.ui.tree.BaseNode.prototype.updateExpandIcon=function(){var e=this.getExpandIconElement();e&&(e.className=this.getExpandIconClass()),(e=this.getChildrenElement())&&(e.style.backgroundPosition=this.getBackgroundPosition())},goog.ui.tree.BaseNode.prototype.updateIcon_=function(){this.getIconElement().className=this.getCalculatedIconClass()},goog.ui.tree.BaseNode.prototype.onMouseDown=function(e){"expand"==e.target.getAttribute("type")&&this.hasChildren()?this.isUserCollapsible_&&this.toggle():(this.select(),this.updateRow())},goog.ui.tree.BaseNode.prototype.onClick_=goog.events.Event.preventDefault,goog.ui.tree.BaseNode.prototype.onDoubleClick_=function(e){"expand"==e.target.getAttribute("type")&&this.hasChildren()||this.isUserCollapsible_&&this.toggle()},goog.ui.tree.BaseNode.prototype.onKeyDown=function(e){var t=!0;switch(e.keyCode){case goog.events.KeyCodes.RIGHT:if(e.altKey)break;this.hasChildren()&&(this.getExpanded()?this.getFirstChild().select():this.setExpanded(!0));break;case goog.events.KeyCodes.LEFT:if(e.altKey)break;if(this.hasChildren()&&this.getExpanded()&&this.isUserCollapsible_)this.setExpanded(!1);else{var o=this.getParent(),n=this.getTree();o&&(n.getShowRootNode()||o!=n)&&o.select()}break;case goog.events.KeyCodes.DOWN:(o=this.getNextShownNode())&&o.select();break;case goog.events.KeyCodes.UP:(o=this.getPreviousShownNode())&&o.select();break;default:t=!1}return t&&(e.preventDefault(),(n=this.getTree())&&n.clearTypeAhead()),t},goog.ui.tree.BaseNode.prototype.onKeyPress_=function(e){!e.altKey&&e.keyCode>=goog.events.KeyCodes.LEFT&&e.keyCode<=goog.events.KeyCodes.DOWN&&e.preventDefault()},goog.ui.tree.BaseNode.prototype.getLastShownDescendant=function(){return this.getExpanded()&&this.hasChildren()?this.getLastChild().getLastShownDescendant():this},goog.ui.tree.BaseNode.prototype.getNextShownNode=function(){if(this.hasChildren()&&this.getExpanded())return this.getFirstChild();for(var e,t=this;t!=this.getTree();){if(e=t.getNextSibling(),null!=e)return e;t=t.getParent()}return null},goog.ui.tree.BaseNode.prototype.getPreviousShownNode=function(){var e=this.getPreviousSibling();if(null!=e)return e.getLastShownDescendant();var e=this.getParent(),t=this.getTree();return!t.getShowRootNode()&&e==t||this==t?null:e},goog.ui.tree.BaseNode.prototype.getClientData=goog.ui.tree.BaseNode.prototype.getModel,goog.ui.tree.BaseNode.prototype.setClientData=goog.ui.tree.BaseNode.prototype.setModel,goog.ui.tree.BaseNode.prototype.getConfig=function(){return this.config_},goog.ui.tree.BaseNode.prototype.setTreeInternal=function(e){this.tree!=e&&(this.tree=e,e.setNode(this),this.forEachChild(function(t){t.setTreeInternal(e)}))},goog.ui.tree.BaseNode.defaultConfig={indentWidth:19,cssRoot:"goog-tree-root goog-tree-item",cssHideRoot:"goog-tree-hide-root",cssItem:"goog-tree-item",cssChildren:"goog-tree-children",cssChildrenNoLines:"goog-tree-children-nolines",cssTreeRow:"goog-tree-row",cssItemLabel:"goog-tree-item-label",cssTreeIcon:"goog-tree-icon",cssExpandTreeIcon:"goog-tree-expand-icon",cssExpandTreeIconPlus:"goog-tree-expand-icon-plus",cssExpandTreeIconMinus:"goog-tree-expand-icon-minus",cssExpandTreeIconTPlus:"goog-tree-expand-icon-tplus",cssExpandTreeIconTMinus:"goog-tree-expand-icon-tminus",cssExpandTreeIconLPlus:"goog-tree-expand-icon-lplus",cssExpandTreeIconLMinus:"goog-tree-expand-icon-lminus",cssExpandTreeIconT:"goog-tree-expand-icon-t",cssExpandTreeIconL:"goog-tree-expand-icon-l",cssExpandTreeIconBlank:"goog-tree-expand-icon-blank",cssExpandedFolderIcon:"goog-tree-expanded-folder-icon",cssCollapsedFolderIcon:"goog-tree-collapsed-folder-icon",cssFileIcon:"goog-tree-file-icon",cssExpandedRootIcon:"goog-tree-expanded-folder-icon",cssCollapsedRootIcon:"goog-tree-collapsed-folder-icon",cssSelectedRow:"selected"},goog.ui.tree.TreeNode=function(e,t,o){goog.ui.tree.BaseNode.call(this,e,t,o)},goog.inherits(goog.ui.tree.TreeNode,goog.ui.tree.BaseNode),goog.ui.tree.TreeNode.prototype.getTree=function(){if(this.tree)return this.tree;var e=this.getParent();return e&&(e=e.getTree())?(this.setTreeInternal(e),e):null},goog.ui.tree.TreeNode.prototype.getCalculatedIconClass=function(){var e=this.getExpanded(),t=this.getExpandedIconClass();if(e&&t)return t;if(t=this.getIconClass(),!e&&t)return t;if(t=this.getConfig(),this.hasChildren()){if(e&&t.cssExpandedFolderIcon)return t.cssTreeIcon+" "+t.cssExpandedFolderIcon;if(!e&&t.cssCollapsedFolderIcon)return t.cssTreeIcon+" "+t.cssCollapsedFolderIcon}else if(t.cssFileIcon)return t.cssTreeIcon+" "+t.cssFileIcon;return""},goog.structs.Trie=function(e){this.value_=void 0,this.childNodes_={},e&&this.setAll(e)},goog.structs.Trie.prototype.set=function(e,t){this.setOrAdd_(e,t,!1)},goog.structs.Trie.prototype.add=function(e,t){this.setOrAdd_(e,t,!0)},goog.structs.Trie.prototype.setOrAdd_=function(e,t,o){for(var n=this,i=0;i0?(this.buffer_=this.buffer_.substring(0,e),this.jumpToLabel_(this.buffer_)):0==e?this.buffer_="":t=!1;break;case goog.events.KeyCodes.ESC:this.buffer_="",t=!0}return t},goog.ui.tree.TypeAhead.prototype.handleTypeAheadChar=function(e){var t=!1;return e.ctrlKey||e.altKey||(e=String.fromCharCode(e.charCode||e.keyCode).toLowerCase(),goog.string.isUnicodeChar(e)&&(" "!=e||this.buffer_)&&(this.buffer_+=e,t=this.jumpToLabel_(this.buffer_))),t},goog.ui.tree.TypeAhead.prototype.setNodeInMap=function(e){var t=e.getText();if(t&&!goog.string.isEmptyOrWhitespace(goog.string.makeSafe(t))){var t=t.toLowerCase(),o=this.nodeMap_.get(t);o?o.push(e):this.nodeMap_.set(t,[e])}},goog.ui.tree.TypeAhead.prototype.removeNodeFromMap=function(e){var t=e.getText();if(t&&!goog.string.isEmptyOrWhitespace(goog.string.makeSafe(t))){var t=t.toLowerCase(),o=this.nodeMap_.get(t);o&&(goog.array.remove(o,e),o.length&&this.nodeMap_.remove(t))}},goog.ui.tree.TypeAhead.prototype.jumpToLabel_=function(e){var t=!1;return(e=this.nodeMap_.getKeys(e))&&e.length&&(this.matchingLabelIndex_=this.matchingNodeIndex_=0,t=this.nodeMap_.get(e[0]),t=this.selectMatchingNode_(t))&&(this.matchingLabels_=e),t},goog.ui.tree.TypeAhead.prototype.jumpTo_=function(e){var t=!1,o=this.matchingLabels_;if(o){var t=null,n=!1;if(this.matchingNodes_){var i=this.matchingNodeIndex_+e;i>=0&&i=0&&ithis.matchingLabelIndex_&&(t=this.nodeMap_.get(o[this.matchingLabelIndex_])),t&&t.length&&n&&(this.matchingNodeIndex_=e==goog.ui.tree.TypeAhead.Offset.UP?t.length-1:0)),(t=this.selectMatchingNode_(t))&&(this.matchingLabels_=o)}return t},goog.ui.tree.TypeAhead.prototype.selectMatchingNode_=function(e){var t;return e&&(this.matchingNodeIndex_r;r++)goog.array.extend(o,goog.cssom.getAllCssStyleSheets(n.imports[r]));else if(n.length)for(r=0,s=n.length;s>r;r++)goog.array.extend(o,goog.cssom.getAllCssStyleSheets(n[r]));else{var l=goog.cssom.getCssRulesFromStyleSheet(n);if(l&&l.length)for(var a,r=0,s=l.length;s>r;r++)a=l[r],a.styleSheet&&goog.array.extend(o,goog.cssom.getAllCssStyleSheets(a.styleSheet))}return!(n.type||n.rules||n.cssRules)||n.disabled&&!i||o.push(n),o},goog.cssom.getCssTextFromCssRule=function(e){var t="";return e.cssText?t=e.cssText:e.style&&e.style.cssText&&e.selectorText&&(t=e.style.cssText.replace(/\s*-closure-parent-stylesheet:\s*\[object\];?\s*/gi,"").replace(/\s*-closure-rule-index:\s*[\d]+;?\s*/gi,""),t=e.selectorText+" { "+t+" }"),t},goog.cssom.getCssRuleIndexInParentStyleSheet=function(e,t){if(e.style&&e.style["-closure-rule-index"])return e.style["-closure-rule-index"];var o=t||goog.cssom.getParentStyleSheet(e);if(!o)throw Error("Cannot find a parentStyleSheet.");if((o=goog.cssom.getCssRulesFromStyleSheet(o))&&o.length)for(var n,i=0,r=o.length;r>i;i++)if(n=o[i],n==e)return i;return-1},goog.cssom.getParentStyleSheet=function(e){return e.parentStyleSheet||e.style&&e.style["-closure-parent-stylesheet"]},goog.cssom.replaceCssRule=function(e,t,o,n){if(!(o=o||goog.cssom.getParentStyleSheet(e)))throw Error("Cannot proceed without the parentStyleSheet.");if(e=n>=0?n:goog.cssom.getCssRuleIndexInParentStyleSheet(e,o),!(e>=0))throw Error("Cannot proceed without the index of the cssRule.");goog.cssom.removeCssRule(o,e),goog.cssom.addCssRule(o,t,e)},goog.cssom.addCssRule=function(e,t,o){if((0>o||void 0==o)&&(o=goog.cssom.getCssRulesFromStyleSheet(e).length),e.insertRule)e.insertRule(t,o);else{if(t=/^([^\{]+)\{([^\{]+)\}/.exec(t),3!=t.length)throw Error("Your CSSRule appears to be ill-formatted.");e.addRule(t[1],t[2],o)}},goog.cssom.removeCssRule=function(e,t){e.deleteRule?e.deleteRule(t):e.removeRule(t)},goog.cssom.addCssText=function(e,t){var o=t?t.getDocument():goog.dom.getDocument(),n=o.createElement("style");return n.type="text/css",o.getElementsByTagName("head")[0].appendChild(n),n.styleSheet?n.styleSheet.cssText=e:(o=o.createTextNode(e),n.appendChild(o)),n},goog.cssom.getFileNameFromStyleSheet=function(e){return(e=e.href)?/([^\/\?]+)[^\/]*$/.exec(e)[1]:null},goog.cssom.getAllCss_=function(e,t){for(var o=[],n=goog.cssom.getAllCssStyleSheets(e),i=0;e=n[i];i++){var r=goog.cssom.getCssRulesFromStyleSheet(e);if(r&&r.length){if(!t)var s=0;for(var l,a=0,c=r.length;c>a;a++)l=r[a],t&&!l.href?(l=goog.cssom.getCssTextFromCssRule(l),o.push(l)):l.href||(l.style&&(l.parentStyleSheet||(l.style["-closure-parent-stylesheet"]=e),l.style["-closure-rule-index"]=s),o.push(l)),t||s++}}return t?o.join(" "):o};var Blockly={Blocks:{}};Blockly.Blocks.uidCounter_=0,Blockly.Blocks.genUid=function(){var e=(++Blockly.Blocks.uidCounter_).toString();return Blockly.Realtime.isEnabled()?Blockly.Realtime.genUid(e):e},Blockly.Blocks.addTemplate=function(e){goog.asserts.assert(e.blockName),goog.asserts.assert(Blockly.Blocks[e.blockName],"Blockly.Blocks already has a field named ",e.blockName),goog.asserts.assert(e.message),goog.asserts.assert(e.colour&&"number"==typeof e.colour&&0<=e.colour&&360>e.colour,"details.colour must be a number from 0 to 360 (exclusive)"),"undefined"!=e.output&&(goog.asserts.assert(!e.previousStatement,"When details.output is defined, details.previousStatement must not be true."),goog.asserts.assert(!e.nextStatement,"When details.output is defined, details.nextStatement must not be true."));var t={init:function(){var t=this;this.setColour(e.colour),this.setHelpUrl(e.helpUrl),"string"==typeof e.tooltip?this.setTooltip(e.tooltip):"function"==typeof e.tooltip&&this.setTooltip(function(){return e.tooltip(t)}),"undefined"!=e.output?this.setOutput(!0,e.output):(this.setPreviousStatement("undefined"==typeof e.previousStatement?!0:e.previousStatement),this.setNextStatement("undefined"==typeof e.nextStatement?!0:e.nextStatement));var o=[];o.push(e.text),e.args&&e.args.forEach(function(e){goog.asserts.assert(e.name),goog.asserts.assert("undefined"!=e.check),"undefined"==e.type||e.type==Blockly.INPUT_VALUE?o.push([e.name,e.check,"undefined"==typeof e.align?Blockly.ALIGN_RIGHT:e.align]):goog.asserts.fail("addTemplate() can only handle value inputs.")}),o.push(Blockly.ALIGN_RIGHT),e.inline&&this.setInlineInputs(e.inline),Blockly.Block.prototype.interpolateMsg.apply(this,o)}};t.mutationToDom=e.switchable?function(){var t=e.mutationToDomFunc?e.mutatationToDomFunc():document.createElement("mutation");return t.setAttribute("is_statement",this.isStatement||!1),t}:e.mutationToDomFunc,Blockly.Blocks[e.blockName]=t},Blockly.Workspace=function(){this.topBlocks_=[]},Blockly.Workspace.prototype.rendered=!1,Blockly.Workspace.prototype.maxBlocks=1/0,Blockly.Workspace.prototype.dispose=function(){this.clear()},Blockly.Workspace.SCAN_ANGLE=3,Blockly.Workspace.prototype.addTopBlock=function(e){this.topBlocks_.push(e),this.fireChangeEvent()},Blockly.Workspace.prototype.removeTopBlock=function(e){for(var t,o=!1,n=0;t=this.topBlocks_[n];n++)if(t==e){this.topBlocks_.splice(n,1),o=!0;break}if(!o)throw"Block not present in workspace's list of top-most blocks.";this.fireChangeEvent()},Blockly.Workspace.prototype.getTopBlocks=function(e){var t=[].concat(this.topBlocks_);if(e&&1o.viewWidth&&(e=this.anchorX_-o.viewLeft-o.viewWidth):this.anchorX_+ei&&(s=2*Math.PI-s);var l=s+Math.PI/2;l>2*Math.PI&&(l-=2*Math.PI);var a=Math.sin(l),c=Math.cos(l),g=this.getBubbleSize(),l=(g.width+g.height)/Blockly.Bubble.ARROW_THICKNESS,l=Math.min(l,g.width,g.height)/2,g=1-Blockly.Bubble.ANCHOR_RADIUS/r,n=t+g*n,i=o+g*i,g=t+l*c,u=o+l*a,t=t-l*c,o=o-l*a,a=s+this.arrow_radians_;a>2*Math.PI&&(a-=2*Math.PI),s=Math.sin(a)*r/Blockly.Bubble.ARROW_BEND,r=Math.cos(a)*r/Blockly.Bubble.ARROW_BEND,e.push("M"+g+","+u),e.push("C"+(g+r)+","+(u+s)+" "+n+","+i+" "+n+","+i),e.push("C"+n+","+i+" "+(t+r)+","+(o+s)+" "+t+","+o)}e.push("z"),this.bubbleArrow_.setAttribute("d",e.join(" "))},Blockly.Bubble.prototype.setColour=function(e){this.bubbleBack_.setAttribute("fill",e),this.bubbleArrow_.setAttribute("fill",e)},Blockly.Bubble.prototype.dispose=function(){Blockly.Bubble.unbindDragEvents_(),goog.dom.removeNode(this.bubbleGroup_),this.shape_=this.content_=this.workspace_=this.bubbleGroup_=null},Blockly.Icon=function(e){this.block_=e},Blockly.Icon.RADIUS=8,Blockly.Icon.prototype.bubble_=null,Blockly.Icon.prototype.iconX_=0,Blockly.Icon.prototype.iconY_=0,Blockly.Icon.prototype.createIcon_=function(){this.iconGroup_||(this.iconGroup_=Blockly.createSvgElement("g",{},null),this.block_.getSvgRoot().appendChild(this.iconGroup_),Blockly.bindEvent_(this.iconGroup_,"mouseup",this,this.iconClick_),this.updateEditable())},Blockly.Icon.prototype.dispose=function(){goog.dom.removeNode(this.iconGroup_),this.iconGroup_=null,this.setVisible(!1),this.block_=null},Blockly.Icon.prototype.updateEditable=function(){this.block_.isInFlyout?Blockly.removeClass_(this.iconGroup_,"blocklyIconGroup"):Blockly.addClass_(this.iconGroup_,"blocklyIconGroup")},Blockly.Icon.prototype.isVisible=function(){return!!this.bubble_},Blockly.Icon.prototype.iconClick_=function(){this.block_.isInFlyout||this.setVisible(!this.isVisible())},Blockly.Icon.prototype.updateColour=function(){if(this.isVisible()){var e=Blockly.makeColour(this.block_.getColour());this.bubble_.setColour(e)}},Blockly.Icon.prototype.renderIcon=function(e){if(this.block_.isCollapsed())return this.iconGroup_.setAttribute("display","none"),e;this.iconGroup_.setAttribute("display","block");var t=2*Blockly.Icon.RADIUS;return Blockly.RTL&&(e-=t),this.iconGroup_.setAttribute("transform","translate("+e+", 5)"),this.computeIconLocation(),e=Blockly.RTL?e-Blockly.BlockSvg.SEP_SPACE_X:e+(t+Blockly.BlockSvg.SEP_SPACE_X)},Blockly.Icon.prototype.setIconLocation=function(e,t){this.iconX_=e,this.iconY_=t,this.isVisible()&&this.bubble_.setAnchorLocation(e,t)},Blockly.Icon.prototype.computeIconLocation=function(){var e=this.block_.getRelativeToSurfaceXY(),t=Blockly.getRelativeXY_(this.iconGroup_),o=e.x+t.x+Blockly.Icon.RADIUS,e=e.y+t.y+Blockly.Icon.RADIUS;o===this.iconX_&&e===this.iconY_||this.setIconLocation(o,e)},Blockly.Icon.prototype.getIconLocation=function(){return{x:this.iconX_,y:this.iconY_}},Blockly.Comment=function(e){Blockly.Comment.superClass_.constructor.call(this,e),this.createIcon_()},goog.inherits(Blockly.Comment,Blockly.Icon),Blockly.Comment.prototype.text_="",Blockly.Comment.prototype.width_=160,Blockly.Comment.prototype.height_=80,Blockly.Comment.prototype.createIcon_=function(){Blockly.Icon.prototype.createIcon_.call(this),Blockly.createSvgElement("circle",{"class":"blocklyIconShield",r:Blockly.Icon.RADIUS,cx:Blockly.Icon.RADIUS,cy:Blockly.Icon.RADIUS},this.iconGroup_),this.iconMark_=Blockly.createSvgElement("text",{"class":"blocklyIconMark",x:Blockly.Icon.RADIUS,y:2*Blockly.Icon.RADIUS-3},this.iconGroup_),this.iconMark_.appendChild(document.createTextNode("?"))},Blockly.Comment.prototype.createEditor_=function(){this.foreignObject_=Blockly.createSvgElement("foreignObject",{x:Blockly.Bubble.BORDER_WIDTH,y:Blockly.Bubble.BORDER_WIDTH},null);var e=document.createElementNS(Blockly.HTML_NS,"body");return e.setAttribute("xmlns",Blockly.HTML_NS),e.className="blocklyMinimalBody",this.textarea_=document.createElementNS(Blockly.HTML_NS,"textarea"),this.textarea_.className="blocklyCommentTextarea",this.textarea_.setAttribute("dir",Blockly.RTL?"RTL":"LTR"),e.appendChild(this.textarea_),this.foreignObject_.appendChild(e),Blockly.bindEvent_(this.textarea_,"mouseup",this,this.textareaFocus_),this.foreignObject_},Blockly.Comment.prototype.updateEditable=function(){this.isVisible()&&(this.setVisible(!1),this.setVisible(!0)),Blockly.Icon.prototype.updateEditable.call(this)},Blockly.Comment.prototype.resizeBubble_=function(){var e=this.bubble_.getBubbleSize(),t=2*Blockly.Bubble.BORDER_WIDTH;this.foreignObject_.setAttribute("width",e.width-t),this.foreignObject_.setAttribute("height",e.height-t),this.textarea_.style.width=e.width-t-4+"px",this.textarea_.style.height=e.height-t-4+"px"},Blockly.Comment.prototype.setVisible=function(e){if(e!=this.isVisible())if(!this.block_.isEditable()&&!this.textarea_||goog.userAgent.IE)Blockly.Warning.prototype.setVisible.call(this,e);else{var t=this.getText(),o=this.getBubbleSize();e?(this.bubble_=new Blockly.Bubble(this.block_.workspace,this.createEditor_(),this.block_.svgPath_,this.iconX_,this.iconY_,this.width_,this.height_),this.bubble_.registerResizeEvent(this,this.resizeBubble_),this.updateColour(),this.text_=null):(this.bubble_.dispose(),this.foreignObject_=this.textarea_=this.bubble_=null),this.setText(t),this.setBubbleSize(o.width,o.height)}},Blockly.Comment.prototype.textareaFocus_=function(){this.bubble_.promote_(),this.textarea_.focus()},Blockly.Comment.prototype.getBubbleSize=function(){return this.isVisible()?this.bubble_.getBubbleSize():{width:this.width_,height:this.height_}},Blockly.Comment.prototype.setBubbleSize=function(e,t){this.textarea_?this.bubble_.setBubbleSize(e,t):(this.width_=e,this.height_=t)},Blockly.Comment.prototype.getText=function(){return this.textarea_?this.textarea_.value:this.text_},Blockly.Comment.prototype.setText=function(e){this.textarea_?this.textarea_.value=e:this.text_=e},Blockly.Comment.prototype.dispose=function(){this.block_.comment=null,Blockly.Icon.prototype.dispose.call(this)},Blockly.Connection=function(e,t){this.sourceBlock_=e,this.targetConnection=null,this.type=t,this.y_=this.x_=0,this.dbList_=e.workspace.connectionDBList,this.hidden_=!this.dbList_,this.inDB_=!1},Blockly.Connection.prototype.dispose=function(){if(this.targetConnection)throw"Disconnect connection before disposing of it.";this.inDB_&&this.dbList_[this.type].removeConnection_(this),Blockly.highlightedConnection_==this&&(Blockly.highlightedConnection_=null),Blockly.localConnection_==this&&(Blockly.localConnection_=null)},Blockly.Connection.prototype.isSuperior=function(){return this.type==Blockly.INPUT_VALUE||this.type==Blockly.NEXT_STATEMENT},Blockly.Connection.prototype.connect=function(e){if(this.sourceBlock_==e.sourceBlock_)throw"Attempted to connect a block to itself.";if(this.sourceBlock_.workspace!==e.sourceBlock_.workspace)throw"Blocks are on different workspaces.";if(Blockly.OPPOSITE_TYPE[this.type]!=e.type)throw"Attempt to connect incompatible types.";if(this.type==Blockly.INPUT_VALUE||this.type==Blockly.OUTPUT_VALUE){if(this.targetConnection)throw"Source connection already connected (value).";if(e.targetConnection){var t=e.targetBlock();if(t.setParent(null),!t.outputConnection)throw"Orphan block does not have an output connection.";for(var o=this.sourceBlock_;o=Blockly.Connection.singleConnection_(o,t);){if(!o.targetBlock()){o.connect(t.outputConnection),t=null;break}o=o.targetBlock()}t&&setTimeout(function(){t.outputConnection.bumpAwayFrom_(e)},Blockly.BUMP_DELAY)}}else{if(this.targetConnection)throw"Source connection already connected (block).";if(e.targetConnection){if(this.type!=Blockly.PREVIOUS_STATEMENT)throw"Can only do a mid-stack connection with the top of a block.";if(t=e.targetBlock(),t.setParent(null),!t.previousConnection)throw"Orphan block does not have a previous connection.";for(o=this.sourceBlock_;o.nextConnection;){if(!o.nextConnection.targetConnection){t.previousConnection.checkType_(o.nextConnection)&&(o.nextConnection.connect(t.previousConnection),t=null);break}o=o.getNextBlock()}t&&setTimeout(function(){t.previousConnection.bumpAwayFrom_(e)},Blockly.BUMP_DELAY)}}var n;this.isSuperior()?(o=this.sourceBlock_,n=e.sourceBlock_):(o=e.sourceBlock_,n=this.sourceBlock_),this.targetConnection=e,e.targetConnection=this,n.setParent(o),o.rendered&&o.updateDisabled(),n.rendered&&n.updateDisabled(),o.rendered&&n.rendered&&(this.type==Blockly.NEXT_STATEMENT||this.type==Blockly.PREVIOUS_STATEMENT?n.render():o.render())},Blockly.Connection.singleConnection_=function(e,t){for(var o=!1,n=0;n=n&&(a=i[t],e=n),e>o}if(this.targetConnection)return{connection:null,radius:e};var i=this.dbList_[Blockly.OPPOSITE_TYPE[this.type]],r=this.x_+t,s=this.y_+o;t=0;for(var l=o=i.length-2;l>t;)i[l].y_=0&&n(t);)t--;do o++;while(os}for(var o=this.dbList_[Blockly.OPPOSITE_TYPE[this.type]],n=this.x_,i=this.y_,r=0,s=o.length-2,l=s;l>r;)o[l].y_=0&&t(r);)r--;do s++;while(st;){var n=Math.floor((t+o)/2);if(this[n].y_e.y_)){t=n;break}o=n}}this.splice(t,0,e),e.inDB_=!0},Blockly.ConnectionDB.prototype.removeConnection_=function(e){if(!e.inDB_)throw"Connection not in database.";e.inDB_=!1;for(var t=0,o=this.length-2,n=o;n>t;)this[n].y_=0&&this[t].y_==e.y_;){if(this[t]==e)return this.splice(t,1),void 0;t--}do{if(this[o]==e)return this.splice(o,1),void 0;o++}while(oBlockly.Tooltip.RADIUS_OK&&Blockly.Tooltip.hide()}else Blockly.Tooltip.poisonedElement_!=Blockly.Tooltip.element_&&(clearTimeout(Blockly.Tooltip.showPid_),Blockly.Tooltip.lastXY_=Blockly.mouseToSvg(e),Blockly.Tooltip.showPid_=setTimeout(Blockly.Tooltip.show_,Blockly.Tooltip.HOVER_MS))},Blockly.Tooltip.hide=function(){Blockly.Tooltip.visible&&(Blockly.Tooltip.visible=!1,Blockly.Tooltip.svgGroup_&&(Blockly.Tooltip.svgGroup_.style.display="none")),clearTimeout(Blockly.Tooltip.showPid_)},Blockly.Tooltip.show_=function(){if(Blockly.Tooltip.poisonedElement_=Blockly.Tooltip.element_,Blockly.Tooltip.svgGroup_){goog.dom.removeChildren(Blockly.Tooltip.svgText_);var e=Blockly.Tooltip.element_.tooltip;goog.isFunction(e)&&(e=e());for(var e=Blockly.Tooltip.wrap_(e,Blockly.Tooltip.LIMIT),e=e.split("\n"),t=0;tn.height&&(t-=e.height+2*Blockly.Tooltip.OFFSET_Y),Blockly.RTL?o=Math.max(Blockly.Tooltip.MARGINS,o):o+e.width>n.width-2*Blockly.Tooltip.MARGINS&&(o=n.width-e.width-2*Blockly.Tooltip.MARGINS),Blockly.Tooltip.svgGroup_.setAttribute("transform","translate("+o+","+t+")")}},Blockly.Tooltip.wrap_=function(e,t){if(e.length<=t)return e;for(var o=e.trim().split(/\s+/),n=0;nt&&(t=o[n].length);var i,r,n=-1/0,s=1;do{i=n,r=e;for(var l=[],a=o.length/s,c=1,n=0;nc?(c++,l[n]=!0):l[n]=!1;l=Blockly.Tooltip.wrapMutate_(o,l,t),n=Blockly.Tooltip.wrapScore_(o,l,t),e=Blockly.Tooltip.wrapToText_(o,l),s++}while(n>i);return r},Blockly.Tooltip.wrapScore_=function(e,t,o){for(var n=[0],i=[],r=0;ri&&(i=l,n=s)}return n?Blockly.Tooltip.wrapMutate_(e,n,o):t},Blockly.Tooltip.wrapToText_=function(e,t){for(var o=[],n=0;n=t?i-=r:t>=o+n&&(i+=r),this.svgKnob_.setAttribute(this.horizontal_?"x":"y",this.constrainKnob_(i)),this.onScroll_()}e.stopPropagation()},Blockly.Scrollbar.prototype.onMouseDownKnob_=function(e){this.onMouseUpKnob_(),Blockly.isRightButton(e)||(this.startDragKnob=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"x":"y")),this.startDragMouse=this.horizontal_?e.clientX:e.clientY,Blockly.Scrollbar.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,this.onMouseUpKnob_),Blockly.Scrollbar.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.onMouseMoveKnob_)),e.stopPropagation()},Blockly.Scrollbar.prototype.onMouseMoveKnob_=function(e){this.svgKnob_.setAttribute(this.horizontal_?"x":"y",this.constrainKnob_(this.startDragKnob+((this.horizontal_?e.clientX:e.clientY)-this.startDragMouse))),this.onScroll_()},Blockly.Scrollbar.prototype.onMouseUpKnob_=function(){Blockly.removeAllRanges(),Blockly.hideChaff(!0),Blockly.Scrollbar.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseUpWrapper_),Blockly.Scrollbar.onMouseUpWrapper_=null),Blockly.Scrollbar.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseMoveWrapper_),Blockly.Scrollbar.onMouseMoveWrapper_=null)},Blockly.Scrollbar.prototype.constrainKnob_=function(e){if(0>=e||isNaN(e))e=0;else{var t=this.horizontal_?"width":"height",o=parseFloat(this.svgBackground_.getAttribute(t)),t=parseFloat(this.svgKnob_.getAttribute(t));e=Math.min(e,o-t)}return e},Blockly.Scrollbar.prototype.onScroll_=function(){var e=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"x":"y")),t=parseFloat(this.svgBackground_.getAttribute(this.horizontal_?"width":"height")),e=e/t;isNaN(e)&&(e=0),t={},this.horizontal_?t.x=e:t.y=e,this.workspace_.setMetrics(t)},Blockly.Scrollbar.prototype.set=function(e){this.svgKnob_.setAttribute(this.horizontal_?"x":"y",e*this.ratio_),this.onScroll_()},Blockly.Scrollbar.insertAfter_=function(e,t){var o=t.nextSibling,n=t.parentNode;if(!n)throw"Reference node has no parent.";o?n.insertBefore(e,o):n.appendChild(e)},Blockly.Trashcan=function(e){this.workspace_=e},Blockly.Trashcan.prototype.SPRITE_URL_="media/sprites.png",Blockly.Trashcan.prototype.LID_URL_="media/trashlid.png",Blockly.Trashcan.prototype.WIDTH_=47,Blockly.Trashcan.prototype.BODY_HEIGHT_=45,Blockly.Trashcan.prototype.LID_HEIGHT_=15,Blockly.Trashcan.prototype.MARGIN_BOTTOM_=35,Blockly.Trashcan.prototype.MARGIN_SIDE_=35,Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=25,Blockly.Trashcan.prototype.isOpen=!1,Blockly.Trashcan.prototype.svgGroup_=null,Blockly.Trashcan.prototype.svgLid_=null,Blockly.Trashcan.prototype.lidTask_=0,Blockly.Trashcan.prototype.lidOpen_=0,Blockly.Trashcan.prototype.left_=0,Blockly.Trashcan.prototype.top_=0,Blockly.Trashcan.prototype.createDom=function(){this.svgGroup_=Blockly.createSvgElement("g",{filter:"url(#blocklyTrashcanShadowFilter)"},null);var e=Blockly.createSvgElement("clipPath",{id:"blocklyTrashBodyClipPath"},this.svgGroup_);return Blockly.createSvgElement("rect",{width:this.WIDTH_,height:this.BODY_HEIGHT_,y:this.LID_HEIGHT_},e),Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-32,"clip-path":"url(#blocklyTrashBodyClipPath)"},this.svgGroup_).setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",Blockly.pathToMedia+Blockly.SPRITE.url),e=Blockly.createSvgElement("clipPath",{id:"blocklyTrashLidClipPath"},this.svgGroup_),Blockly.createSvgElement("rect",{width:this.WIDTH_,height:this.LID_HEIGHT_},e),this.svgLid_=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-32,"clip-path":"url(#blocklyTrashLidClipPath)"},this.svgGroup_),this.svgLid_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",Blockly.pathToMedia+Blockly.SPRITE.url),this.animateLid_(),this.svgGroup_},Blockly.Trashcan.prototype.init=function(){this.setOpen_(!1),this.position_(),Blockly.bindEvent_(window,"resize",this,this.position_)},Blockly.Trashcan.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null),this.workspace_=this.svgLid_=null,goog.Timer.clear(this.lidTask_)},Blockly.Trashcan.prototype.position_=function(){var e=this.workspace_.getMetrics();e&&(this.left_=Blockly.RTL?this.MARGIN_SIDE_:e.viewWidth+e.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_,this.top_=e.viewHeight+e.absoluteTop-(this.BODY_HEIGHT_+this.LID_HEIGHT_)-this.MARGIN_BOTTOM_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))},Blockly.Trashcan.prototype.getRect=function(){var e=Blockly.getSvgXY_(this.svgGroup_);return new goog.math.Rect(e.x-this.MARGIN_HOTSPOT_,e.y-this.MARGIN_HOTSPOT_,this.WIDTH_+2*this.MARGIN_HOTSPOT_,this.BODY_HEIGHT_+this.LID_HEIGHT_+2*this.MARGIN_HOTSPOT_)},Blockly.Trashcan.prototype.setOpen_=function(e){this.isOpen!=e&&(goog.Timer.clear(this.lidTask_),this.isOpen=e,this.animateLid_())},Blockly.Trashcan.prototype.animateLid_=function(){this.lidOpen_+=this.isOpen?.2:-.2,this.lidOpen_=goog.math.clamp(this.lidOpen_,0,1);var e=45*this.lidOpen_;this.svgLid_.setAttribute("transform","rotate("+(Blockly.RTL?-e:e)+", "+(Blockly.RTL?4:this.WIDTH_-4)+", "+(this.LID_HEIGHT_-2)+")"),e=goog.math.lerp(.2,.4,this.lidOpen_),this.svgGroup_.style.opacity=e,0this.lidOpen_&&(this.lidTask_=goog.Timer.callOnce(this.animateLid_,20,this))},Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)},Blockly.Xml={},Blockly.Xml.workspaceToDom=function(e){var t;Blockly.RTL&&(t=e.getWidth());var o=goog.dom.createDom("xml");e=e.getTopBlocks(!0);for(var n,i=0;n=e[i];i++){var r=Blockly.Xml.blockToDom_(n);n=n.getRelativeToSurfaceXY(),r.setAttribute("x",Blockly.RTL?t-n.x:n.x),r.setAttribute("y",n.y),o.appendChild(r)}return o},Blockly.Xml.blockToDom_=function(e){var t=goog.dom.createDom("block");if(t.setAttribute("type",e.type),t.setAttribute("id",e.id),e.mutationToDom){var o=e.mutationToDom();o&&t.appendChild(o)}for(var n,o=0;n=e.inputList[o];o++)for(var i,r=0;i=n.fieldRow[r];r++)if(i.name&&i.EDITABLE){var s=goog.dom.createDom("field",null,i.getValue());s.setAttribute("name",i.name),t.appendChild(s)}for((o=e.getCommentText())&&(o=goog.dom.createDom("comment",null,o),"object"==typeof e.comment&&(o.setAttribute("pinned",e.comment.isVisible()),n=e.comment.getBubbleSize(),o.setAttribute("h",n.height),o.setAttribute("w",n.width)),t.appendChild(o)),r=!1,o=0;n=e.inputList[o];o++){var l;i=!0,n.type!=Blockly.DUMMY_INPUT&&(s=n.connection.targetBlock(),n.type==Blockly.INPUT_VALUE?(l=goog.dom.createDom("value"),r=!0):n.type==Blockly.NEXT_STATEMENT&&(l=goog.dom.createDom("statement")),s&&(l.appendChild(Blockly.Xml.blockToDom_(s)),i=!1),l.setAttribute("name",n.name),i||t.appendChild(l))}return r&&t.setAttribute("inline",e.inputsInline),e.isCollapsed()&&t.setAttribute("collapsed",!0),e.disabled&&t.setAttribute("disabled",!0),e.isDeletable()||t.setAttribute("deletable",!1),e.isMovable()||t.setAttribute("movable",!1),e.isEditable()||t.setAttribute("editable",!1),(e=e.getNextBlock())&&(l=goog.dom.createDom("next",null,Blockly.Xml.blockToDom_(e)),t.appendChild(l)),t},Blockly.Xml.domToText=function(e){return(new XMLSerializer).serializeToString(e)},Blockly.Xml.domToPrettyText=function(e){e=Blockly.Xml.domToText(e).split("<");for(var t="",o=1;o"!=n.slice(-2)&&(t+=" ")}return e=e.join("\n"),e=e.replace(/(<(\w+)\b[^>]*>[^\n]*)\n *<\/\2>/g,"$1"),e.replace(/^\n/,"")},Blockly.Xml.textToDom=function(e){if(e=(new DOMParser).parseFromString(e,"text/xml"),!e||!e.firstChild||"xml"!=e.firstChild.nodeName.toLowerCase()||e.firstChild!==e.lastChild)throw"Blockly.Xml.textToDom did not obtain a valid XML tree.";return e.firstChild},Blockly.Xml.domToWorkspace=function(e,t){var o;Blockly.RTL&&(o=e.getWidth());for(var n,i=0;n=t.childNodes[i];i++)if("block"==n.nodeName.toLowerCase()){var r=Blockly.Xml.domToBlock(e,n),s=parseInt(n.getAttribute("x"),10);n=parseInt(n.getAttribute("y"),10),isNaN(s)||isNaN(n)||r.moveBy(Blockly.RTL?o-s:s,n)}},Blockly.Xml.domToBlock=function(e,t,o){var n=Blockly.Xml.domToBlockHeadless_(e,t,o);if(e.rendered){for(n.setConnectionsHidden(!0),e=n.getDescendants(),t=e.length-1;t>=0;t--)e[t].initSvg();for(t=e.length-1;t>=0;t--)e[t].render(!1);setTimeout(function(){n.setConnectionsHidden(!1)},1),n.updateDisabled(),Blockly.fireUiEvent(window,"resize")}return n},Blockly.Xml.domToBlockHeadless_=function(e,t,o){var n=null,i=t.getAttribute("type");if(!i)throw"Block type unspecified: \n"+t.outerHTML;var r=t.getAttribute("id");if(o&&r){if(n=Blockly.Block.getById(r,e),!n)throw"Couldn't get Block with id: "+r;r=n.getParent(),n.workspace&&n.dispose(!0,!1,!0),n.fill(e,i),n.parent_=r}else n=Blockly.Block.obtain(e,i);for(var s,l=null,r=0;s=t.childNodes[r];r++)if(3!=s.nodeType||!s.data.match(/^\s*$/)){for(var a,l=null,c=0;a=s.childNodes[c];c++)3==a.nodeType&&a.data.match(/^\s*$/)||(l=a);switch(c=s.getAttribute("name"),s.nodeName.toLowerCase()){case"mutation":n.domToMutation&&(n.domToMutation(s),n.initSvg&&n.initSvg());break;case"comment":n.setCommentText(s.textContent);var g=s.getAttribute("pinned");g&&setTimeout(function(){n.comment&&n.comment.setVisible&&n.comment.setVisible("true"==g)},1),l=parseInt(s.getAttribute("w"),10),s=parseInt(s.getAttribute("h"),10),!isNaN(l)&&!isNaN(s)&&n.comment&&n.comment.setVisible&&n.comment.setBubbleSize(l,s);break;case"title":case"field":n.setFieldValue(s.textContent,c);break;case"value":case"statement":if(s=n.getInput(c),!s)throw"Input "+c+" does not exist in block "+i;if(l&&"block"==l.nodeName.toLowerCase())if(l=Blockly.Xml.domToBlockHeadless_(e,l,o),l.outputConnection)s.connection.connect(l.outputConnection);else{if(!l.previousConnection)throw"Child block does not have output or previous statement.";s.connection.connect(l.previousConnection)}break;case"next":if(l&&"block"==l.nodeName.toLowerCase()){if(!n.nextConnection)throw"Next statement does not exist.";if(n.nextConnection.targetConnection)throw"Next statement is already connected.";if(l=Blockly.Xml.domToBlockHeadless_(e,l,o),!l.previousConnection)throw"Next block does not have previous statement.";n.nextConnection.connect(l.previousConnection)}break;default:console.log("Ignoring unknown tag: "+s.nodeName)}}return(e=t.getAttribute("inline"))&&n.setInputsInline("true"==e),(e=t.getAttribute("disabled"))&&n.setDisabled("true"==e),(e=t.getAttribute("deletable"))&&n.setDeletable("true"==e),(e=t.getAttribute("movable"))&&n.setMovable("true"==e),(e=t.getAttribute("editable"))&&n.setEditable("true"==e),(t=t.getAttribute("collapsed"))&&n.setCollapsed("true"==t),n },Blockly.Xml.deleteNext=function(e){for(var t,o=0;t=e.childNodes[o];o++)if("next"==t.nodeName.toLowerCase()){e.removeChild(t);break}},goog.global.Blockly||(goog.global.Blockly={}),goog.global.Blockly.Xml||(goog.global.Blockly.Xml={}),goog.global.Blockly.Xml.domToText=Blockly.Xml.domToText,goog.global.Blockly.Xml.domToWorkspace=Blockly.Xml.domToWorkspace,goog.global.Blockly.Xml.textToDom=Blockly.Xml.textToDom,goog.global.Blockly.Xml.workspaceToDom=Blockly.Xml.workspaceToDom,Blockly.WorkspaceSvg=function(e,t){Blockly.WorkspaceSvg.superClass_.constructor.call(this),this.getMetrics=e,this.setMetrics=t,Blockly.ConnectionDB.init(this)},goog.inherits(Blockly.WorkspaceSvg,Blockly.Workspace),Blockly.WorkspaceSvg.prototype.rendered=!0,Blockly.WorkspaceSvg.prototype.isFlyout=!1,Blockly.WorkspaceSvg.prototype.dragMode=!1,Blockly.WorkspaceSvg.prototype.scrollX=0,Blockly.WorkspaceSvg.prototype.scrollY=0,Blockly.WorkspaceSvg.prototype.trashcan=null,Blockly.WorkspaceSvg.prototype.scrollbar=null,Blockly.WorkspaceSvg.prototype.createDom=function(){return this.svgGroup_=Blockly.createSvgElement("g",{},null),this.svgBlockCanvas_=Blockly.createSvgElement("g",{},this.svgGroup_),this.svgBubbleCanvas_=Blockly.createSvgElement("g",{},this.svgGroup_),this.fireChangeEvent(),this.svgGroup_},Blockly.WorkspaceSvg.prototype.dispose=function(){this.rendered=!1,Blockly.WorkspaceSvg.superClass_.dispose.call(this),this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null),this.svgBubbleCanvas_=this.svgBlockCanvas_=null,this.flyout_&&(this.flyout_.dispose(),this.flyout_=null),this.trashcan&&(this.trashcan.dispose(),this.trashcan=null)},Blockly.WorkspaceSvg.prototype.addTrashcan=function(){if(Blockly.hasTrashcan&&!Blockly.readOnly){this.trashcan=new Blockly.Trashcan(this);var e=this.trashcan.createDom();this.svgGroup_.insertBefore(e,this.svgBlockCanvas_),this.trashcan.init()}},Blockly.WorkspaceSvg.prototype.getCanvas=function(){return this.svgBlockCanvas_},Blockly.WorkspaceSvg.prototype.getBubbleCanvas=function(){return this.svgBubbleCanvas_},Blockly.WorkspaceSvg.prototype.addTopBlock=function(e){Blockly.WorkspaceSvg.superClass_.addTopBlock.call(this,e),Blockly.Realtime.isEnabled()&&this==Blockly.mainWorkspace&&Blockly.Realtime.addTopBlock(e)},Blockly.WorkspaceSvg.prototype.removeTopBlock=function(e){Blockly.WorkspaceSvg.superClass_.removeTopBlock.call(this,e),Blockly.Realtime.isEnabled()&&this==Blockly.mainWorkspace&&Blockly.Realtime.removeTopBlock(e)},Blockly.WorkspaceSvg.prototype.clear=function(){Blockly.hideChaff(),Blockly.WorkspaceSvg.superClass_.clear.call(this)},Blockly.WorkspaceSvg.prototype.getWidth=function(){return this.getMetrics().viewWidth},Blockly.WorkspaceSvg.prototype.render=function(){for(var e,t=this.getAllBlocks(),o=0;e=t[o];o++)e.getChildren().length||e.render()},Blockly.WorkspaceSvg.prototype.traceOn=function(e){this.traceOn_=e,this.traceWrapper_&&(Blockly.unbindEvent_(this.traceWrapper_),this.traceWrapper_=null),e&&(this.traceWrapper_=Blockly.bindEvent_(this.svgBlockCanvas_,"blocklySelectChange",this,function(){this.traceOn_=!1}))},Blockly.WorkspaceSvg.prototype.highlightBlock=function(e){if(this.traceOn_&&0!=Blockly.dragMode_&&this.traceOn(!1),this.traceOn_){var t=null;if(e&&(t=this.getBlockById(e),!t))return;this.traceOn(!1),t?t.select():Blockly.selected&&Blockly.selected.unselect();var o=this;setTimeout(function(){o.traceOn(!0)},1)}},Blockly.WorkspaceSvg.prototype.fireChangeEvent=function(){this.rendered&&this.svgBlockCanvas_&&Blockly.fireUiEvent(this.svgBlockCanvas_,"blocklyWorkspaceChange")},Blockly.WorkspaceSvg.prototype.paste=function(e){if(!(e.getElementsByTagName("block").length>=this.remainingCapacity())){var t=Blockly.Xml.domToBlock(this,e),o=parseInt(e.getAttribute("x"),10);if(e=parseInt(e.getAttribute("y"),10),!isNaN(o)&&!isNaN(e)){Blockly.RTL&&(o=-o);do for(var n,i=!1,r=this.getAllBlocks(),s=0;n=r[s];s++)n=n.getRelativeToSurfaceXY(),1>=Math.abs(o-n.x)&&1>=Math.abs(e-n.y)&&(o=Blockly.RTL?o-Blockly.SNAP_RADIUS:o+Blockly.SNAP_RADIUS,e+=2*Blockly.SNAP_RADIUS,i=!0);while(i);t.moveBy(o,e)}t.select()}},Blockly.WorkspaceSvg.prototype.recordDeleteAreas=function(){this.deleteAreaTrash_=this.trashcan?this.trashcan.getRect():null,this.deleteAreaToolbox_=this.flyout_?this.flyout_.getRect():this.toolbox_?this.toolbox_.getRect():null},Blockly.WorkspaceSvg.prototype.isDeleteArea=function(e){if(e=Blockly.mouseToSvg(e),e=new goog.math.Coordinate(e.x,e.y),this.deleteAreaTrash_){if(this.deleteAreaTrash_.contains(e))return this.trashcan.setOpen_(!0),Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE),!0;this.trashcan.setOpen_(!1)}return this.deleteAreaToolbox_&&this.deleteAreaToolbox_.contains(e)?(Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE),!0):(Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED),!1)},Blockly.WorkspaceSvg.prototype.clear=Blockly.WorkspaceSvg.prototype.clear,Blockly.Mutator=function(e){Blockly.Mutator.superClass_.constructor.call(this,null),this.quarkNames_=e},goog.inherits(Blockly.Mutator,Blockly.Icon),Blockly.Mutator.prototype.workspaceWidth_=0,Blockly.Mutator.prototype.workspaceHeight_=0,Blockly.Mutator.prototype.createIcon=function(){if(!this.iconMark_){Blockly.Icon.prototype.createIcon_.call(this);var e=Blockly.Icon.RADIUS/2;Blockly.createSvgElement("rect",{"class":"blocklyIconShield",width:4*e,height:4*e,rx:e,ry:e},this.iconGroup_),this.iconMark_=Blockly.createSvgElement("text",{"class":"blocklyIconMark",x:Blockly.Icon.RADIUS,y:2*Blockly.Icon.RADIUS-4},this.iconGroup_),this.iconMark_.appendChild(document.createTextNode("★"))}},Blockly.Mutator.prototype.iconClick_=function(e){this.block_.isEditable()&&Blockly.Icon.prototype.iconClick_.call(this,e)},Blockly.Mutator.prototype.createEditor_=function(){this.svgDialog_=Blockly.createSvgElement("svg",{x:Blockly.Bubble.BORDER_WIDTH,y:Blockly.Bubble.BORDER_WIDTH},null),Blockly.createSvgElement("rect",{"class":"blocklyMutatorBackground",height:"100%",width:"100%"},this.svgDialog_);var e=this;return this.workspace_=new Blockly.WorkspaceSvg(function(){return e.getFlyoutMetrics_()},null),this.workspace_.flyout_=new Blockly.Flyout,this.workspace_.flyout_.autoClose=!1,this.svgDialog_.appendChild(this.workspace_.flyout_.createDom()),this.svgDialog_.appendChild(this.workspace_.createDom()),this.svgDialog_},Blockly.Mutator.prototype.updateEditable=function(){this.block_.isEditable()?Blockly.Icon.prototype.updateEditable.call(this):(this.setVisible(!1),Blockly.removeClass_(this.iconGroup_,"blocklyIconGroup"))},Blockly.Mutator.prototype.resizeBubble_=function(){var e,t=2*Blockly.Bubble.BORDER_WIDTH,o=this.workspace_.getCanvas().getBBox(),n=this.workspace_.flyout_.getMetrics_();e=Blockly.RTL?-o.x:o.width+o.x,o=Math.max(o.height+3*t,n.contentHeight+20),e+=3*t,(Math.abs(this.workspaceWidth_-e)>t||Math.abs(this.workspaceHeight_-o)>t)&&(this.workspaceWidth_=e,this.workspaceHeight_=o,this.bubble_.setBubbleSize(e+t,o+t),this.svgDialog_.setAttribute("width",this.workspaceWidth_),this.svgDialog_.setAttribute("height",this.workspaceHeight_)),Blockly.RTL&&(t="translate("+this.workspaceWidth_+",0)",this.workspace_.getCanvas().setAttribute("transform",t))},Blockly.Mutator.prototype.setVisible=function(e){if(e!=this.isVisible())if(e){this.bubble_=new Blockly.Bubble(this.block_.workspace,this.createEditor_(),this.block_.svgPath_,this.iconX_,this.iconY_,null,null);var t=this;this.workspace_.flyout_.init(this.workspace_);var o=[];e=0;for(var n;n=this.quarkNames_[e];e++)o[e]=goog.dom.createDom("block",{type:n});for(this.workspace_.flyout_.show(o),this.rootBlock_=this.block_.decompose(this.workspace_),o=this.rootBlock_.getDescendants(),e=0;n=o[e];e++)n.render();this.rootBlock_.setMovable(!1),this.rootBlock_.setDeletable(!1),e=2*this.workspace_.flyout_.CORNER_RADIUS,o=this.workspace_.flyout_.width_+e,Blockly.RTL&&(o=-o),this.rootBlock_.moveBy(o,e),this.block_.saveConnections&&(this.block_.saveConnections(this.rootBlock_),this.sourceListener_=Blockly.bindEvent_(this.block_.workspace.getCanvas(),"blocklyWorkspaceChange",this.block_,function(){t.block_.saveConnections(t.rootBlock_)})),this.resizeBubble_(),Blockly.bindEvent_(this.workspace_.getCanvas(),"blocklyWorkspaceChange",this.block_,function(){t.workspaceChanged_()}),this.updateColour()}else this.svgDialog_=null,this.workspace_.dispose(),this.rootBlock_=this.workspace_=null,this.bubble_.dispose(),this.bubble_=null,this.workspaceHeight_=this.workspaceWidth_=0,this.sourceListener_&&(Blockly.unbindEvent_(this.sourceListener_),this.sourceListener_=null)},Blockly.Mutator.prototype.workspaceChanged_=function(){if(0==Blockly.dragMode_)for(var e,t=this.workspace_.getTopBlocks(!1),o=0;e=t[o];o++){var n=e.getRelativeToSurfaceXY(),i=e.getHeightWidth();20>n.y+i.height&&e.moveBy(0,20-i.height-n.y)}this.rootBlock_.workspace==this.workspace_&&(t=this.block_.rendered,this.block_.rendered=!1,this.block_.compose(this.rootBlock_),this.block_.rendered=t,this.block_.initSvg(),this.block_.rendered&&this.block_.render(),this.resizeBubble_(),this.block_.workspace.fireChangeEvent())},Blockly.Mutator.prototype.getFlyoutMetrics_=function(){var e=0;return Blockly.RTL&&(e+=this.workspaceWidth_),{viewHeight:this.workspaceHeight_,viewWidth:0,absoluteTop:0,absoluteLeft:e}},Blockly.Mutator.prototype.dispose=function(){this.block_.mutator=null,Blockly.Icon.prototype.dispose.call(this)},Blockly.Warning=function(e){Blockly.Warning.superClass_.constructor.call(this,e),this.createIcon_()},goog.inherits(Blockly.Warning,Blockly.Icon),Blockly.Warning.textToDom_=function(e){var t=Blockly.createSvgElement("text",{"class":"blocklyText blocklyBubbleText",y:Blockly.Bubble.BORDER_WIDTH},null);e=e.split("\n");for(var o=0;o=0;e--)this.childBlocks_[e].dispose(!1);for(e=0;t=this.inputList[e];e++)t.dispose();for(this.inputList.length=0,t=this.getConnections_(!0),e=0;ee&&t--,this.inputList.splice(t,0,o),this.rendered&&(this.render(),this.bumpNeighbours_())},Blockly.Block.prototype.removeInput=function(e,t){for(var o,n=0;o=this.inputList[n];n++)if(o.name==e)return o.connection&&o.connection.targetConnection&&o.connection.targetBlock().setParent(null),o.dispose(),this.inputList.splice(n,1),this.rendered&&(this.render(),this.bumpNeighbours_()),void 0;t||goog.asserts.fail('Input "%s" not found.',e)},Blockly.Block.prototype.getInput=function(e){for(var t,o=0;t=this.inputList[o];o++)if(t.name==e)return t;return null},Blockly.Block.prototype.getInputTargetBlock=function(e){return(e=this.getInput(e))&&e.connection&&e.connection.targetBlock()},Blockly.Block.prototype.getCommentText=function(){return this.comment||""},Blockly.Block.prototype.setCommentText=function(e){this.comment=e},Blockly.Block.prototype.setWarningText=function(){},Blockly.Block.prototype.setMutator=function(){},Blockly.Block.prototype.getRelativeToSurfaceXY=function(){return this.xy_},Blockly.Block.prototype.moveBy=function(e,t){this.xy_.translate(e,t)},Blockly.ContextMenu={},Blockly.ContextMenu.currentBlock=null,Blockly.ContextMenu.show=function(e,t){if(Blockly.WidgetDiv.show(Blockly.ContextMenu,null),t.length){for(var o,n=new goog.ui.Menu,i=0;o=t[i];i++){var r=new goog.ui.MenuItem(o.text);n.addChild(r,!0),r.setEnabled(o.enabled),o.enabled&&goog.events.listen(r,goog.ui.Component.EventType.ACTION,function(e){return function(){Blockly.doCommand(e)}}(o.callback))}goog.events.listen(n,goog.ui.Component.EventType.ACTION,Blockly.ContextMenu.hide),o=goog.dom.getViewportSize(),r=goog.style.getViewportPageOffset(document),n.render(Blockly.WidgetDiv.DIV);var s=n.getElement();Blockly.addClass_(s,"blocklyContextMenu");var l=goog.style.getSize(s),i=e.clientX+r.x,a=e.clientY+r.y;e.clientY+l.height>=o.height&&(a-=l.height),Blockly.RTL?l.width>=e.clientX&&(i+=l.width):e.clientX+l.width>=o.width&&(i-=l.width),Blockly.WidgetDiv.position(i,a,o,r),n.setAllowAutoFocus(!0),setTimeout(function(){s.focus()},1),Blockly.ContextMenu.currentBlock=null}else Blockly.ContextMenu.hide()},Blockly.ContextMenu.hide=function(){Blockly.WidgetDiv.hideIfOwner(Blockly.ContextMenu),Blockly.ContextMenu.currentBlock=null},Blockly.ContextMenu.callbackFactory=function(e,t){return function(){var o=Blockly.Xml.domToBlock(e.workspace,t),n=e.getRelativeToSurfaceXY();n.x=Blockly.RTL?n.x-Blockly.SNAP_RADIUS:n.x+Blockly.SNAP_RADIUS,n.y+=2*Blockly.SNAP_RADIUS,o.moveBy(n.x,n.y),o.select()}},Blockly.BlockSvg=function(){this.svgGroup_=Blockly.createSvgElement("g",{},null),this.svgPathDark_=Blockly.createSvgElement("path",{"class":"blocklyPathDark",transform:"translate(1, 1)"},this.svgGroup_),this.svgPath_=Blockly.createSvgElement("path",{"class":"blocklyPath"},this.svgGroup_),this.svgPathLight_=Blockly.createSvgElement("path",{"class":"blocklyPathLight"},this.svgGroup_),this.svgPath_.tooltip=this,Blockly.Tooltip.bindMouseEvents(this.svgPath_),this.updateMovable()},goog.inherits(Blockly.BlockSvg,Blockly.Block),Blockly.BlockSvg.prototype.height=0,Blockly.BlockSvg.prototype.width=0,Blockly.BlockSvg.INLINE=-1,Blockly.BlockSvg.prototype.initSvg=function(){goog.asserts.assert(this.workspace.rendered,"Workspace is headless.");for(var e,t=0;e=this.inputList[t];t++)e.init();this.mutator&&this.mutator.createIcon(),this.updateColour(),Blockly.readOnly||this.eventsInit_||Blockly.bindEvent_(this.getSvgRoot(),"mousedown",this,this.onMouseDown_),goog.isFunction(this.onchange)&&!this.eventsInit_&&Blockly.bindEvent_(this.workspace.getCanvas(),"blocklyWorkspaceChange",this,this.onchange),this.eventsInit_=!0,this.getSvgRoot().parentNode||this.workspace.getCanvas().appendChild(this.getSvgRoot())},Blockly.BlockSvg.prototype.select=function(){Blockly.selected&&Blockly.selected.unselect(),Blockly.selected=this,this.addSelect(),Blockly.fireUiEvent(this.workspace.getCanvas(),"blocklySelectChange")},Blockly.BlockSvg.prototype.unselect=function(){Blockly.selected=null,this.removeSelect(),Blockly.fireUiEvent(this.workspace.getCanvas(),"blocklySelectChange")},Blockly.BlockSvg.prototype.mutator=null,Blockly.BlockSvg.prototype.comment=null,Blockly.BlockSvg.prototype.warning=null,Blockly.BlockSvg.prototype.getIcons=function(){var e=[];return this.mutator&&e.push(this.mutator),this.comment&&e.push(this.comment),this.warning&&e.push(this.warning),e},Blockly.BlockSvg.onMouseUpWrapper_=null,Blockly.BlockSvg.onMouseMoveWrapper_=null,Blockly.BlockSvg.terminateDrag_=function(){Blockly.BlockSvg.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.BlockSvg.onMouseUpWrapper_),Blockly.BlockSvg.onMouseUpWrapper_=null),Blockly.BlockSvg.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.BlockSvg.onMouseMoveWrapper_),Blockly.BlockSvg.onMouseMoveWrapper_=null);var e=Blockly.selected;if(2==Blockly.dragMode_&&e){var t=e.getRelativeToSurfaceXY();e.moveConnections_(t.x-e.startDragX,t.y-e.startDragY),delete e.draggedBubbles_,e.setDragging_(!1),e.render(),goog.Timer.callOnce(e.bumpNeighbours_,Blockly.BUMP_DELAY,e),Blockly.fireUiEvent(window,"resize"),e.workspace.fireChangeEvent()}Blockly.dragMode_=0,Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)},Blockly.BlockSvg.prototype.setParent=function(e){var t=this.getSvgRoot();if(this.parentBlock_&&t){var o=this.getRelativeToSurfaceXY();this.workspace.getCanvas().appendChild(t),t.setAttribute("transform","translate("+o.x+", "+o.y+")")}Blockly.BlockSvg.superClass_.setParent.call(this,e),e&&(o=this.getRelativeToSurfaceXY(),e.getSvgRoot().appendChild(t),e=this.getRelativeToSurfaceXY(),this.moveConnections_(e.x-o.x,e.y-o.y))},Blockly.BlockSvg.prototype.getRelativeToSurfaceXY=function(){var e=0,t=0,o=this.getSvgRoot();if(o)do var n=Blockly.getRelativeXY_(o),e=e+n.x,t=t+n.y,o=o.parentNode;while(o&&o!=this.workspace.getCanvas());return new goog.math.Coordinate(e,t)},Blockly.BlockSvg.prototype.moveBy=function(e,t){var o=this.getRelativeToSurfaceXY();this.getSvgRoot().setAttribute("transform","translate("+(o.x+e)+", "+(o.y+t)+")"),this.moveConnections_(e,t),Blockly.Realtime.blockChanged(this)},Blockly.BlockSvg.prototype.getHeightWidth=function(){var e=this.height,t=this.width,o=this.getNextBlock();return o&&(o=o.getHeightWidth(),e+=o.height-4,t=Math.max(t,o.width)),{height:e,width:t}},Blockly.BlockSvg.prototype.setCollapsed=function(e){if(this.collapsed_!=e){Blockly.BlockSvg.superClass_.setCollapsed.call(this,e);for(var t,o=[],n=0;t=this.inputList[n];n++)o.push.apply(o,t.setVisible(!e));if(e){for(e=this.getIcons(),n=0;nthis.workspace.remainingCapacity()&&(n.enabled=!1),o.push(n),this.isEditable()&&!this.collapsed_&&Blockly.comments&&(n={enabled:!0},this.comment?(n.text=Blockly.Msg.REMOVE_COMMENT,n.callback=function(){t.setCommentText(null)}):(n.text=Blockly.Msg.ADD_COMMENT,n.callback=function(){t.setCommentText("")}),o.push(n)),!this.collapsed_)for(n=0;n=e.clientX&&0==e.clientY&&0==e.button)){Blockly.removeAllRanges();var o=e.clientX-t.startDragMouseX,n=e.clientY-t.startDragMouseY;if(1==Blockly.dragMode_&&Math.sqrt(Math.pow(o,2)+Math.pow(n,2))>Blockly.DRAG_RADIUS&&(Blockly.dragMode_=2,t.setParent(null),t.setDragging_(!0),t.workspace.recordDeleteAreas()),2==Blockly.dragMode_){var i=t.startDragX+o,r=t.startDragY+n;for(t.getSvgRoot().setAttribute("transform","translate("+i+", "+r+")"),i=0;i1?goog.dom.removeNode(e):(e.setAttribute("transform","translate("+(e.translateX_+(Blockly.RTL?-1:1)*e.bBox_.width/2*t+", "+(e.translateY_+e.bBox_.height*t))+") scale("+(1-t)+")"),setTimeout(function(){Blockly.BlockSvg.disposeUiStep_(e)},10))},Blockly.BlockSvg.prototype.connectionUiEffect=function(){Blockly.playAudio("click");var e=Blockly.getSvgXY_(this.svgGroup_);this.outputConnection?(e.x+=Blockly.RTL?3:-3,e.y+=13):this.previousConnection&&(e.x+=Blockly.RTL?-23:23,e.y+=3),e=Blockly.createSvgElement("circle",{cx:e.x,cy:e.y,r:0,fill:"none",stroke:"#888","stroke-width":10},Blockly.svg),e.startDate_=new Date,Blockly.BlockSvg.connectionUiStep_(e)},Blockly.BlockSvg.connectionUiStep_=function(e){var t=(new Date-e.startDate_)/150;t>1?goog.dom.removeNode(e):(e.setAttribute("r",25*t),e.style.opacity=1-t,setTimeout(function(){Blockly.BlockSvg.connectionUiStep_(e)},10))},Blockly.BlockSvg.prototype.updateColour=function(){if(!this.disabled){var e=Blockly.makeColour(this.getColour()),t=goog.color.hexToRgb(e),o=goog.color.lighten(t,.3),t=goog.color.darken(t,.4);for(this.svgPathLight_.setAttribute("stroke",goog.color.rgbArrayToHex(o)),this.svgPathDark_.setAttribute("fill",goog.color.rgbArrayToHex(t)),this.svgPath_.setAttribute("fill",e),o=this.getIcons(),e=0;eo;o+=15)Blockly.createSvgElement("line",{x1:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS,y1:Blockly.FieldAngle.HALF,x2:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS-(0==o%45?10:5),y2:Blockly.FieldAngle.HALF,"class":"blocklyAngleMarks",transform:"rotate("+o+", "+Blockly.FieldAngle.HALF+", "+Blockly.FieldAngle.HALF+")"},e);e.style.marginLeft="-35px",this.clickWrapper_=Blockly.bindEvent_(e,"click",this,Blockly.WidgetDiv.hide),this.moveWrapper1_=Blockly.bindEvent_(t,"mousemove",this,this.onMouseMove),this.moveWrapper2_=Blockly.bindEvent_(this.gauge_,"mousemove",this,this.onMouseMove),this.updateGraph_()}},Blockly.FieldAngle.prototype.onMouseMove=function(e){var t=this.gauge_.ownerSVGElement.getBoundingClientRect(),o=e.clientX-t.left-Blockly.FieldAngle.HALF;e=e.clientY-t.top-Blockly.FieldAngle.HALF,t=Math.atan(-e/o),isNaN(t)||(t=goog.math.toDegrees(t),0>o?t+=180:e>0&&(t+=360),Blockly.FieldAngle.ROUND&&(t=Math.round(t/Blockly.FieldAngle.ROUND)*Blockly.FieldAngle.ROUND),t>=360&&(t-=360),t=String(t),Blockly.FieldTextInput.htmlInput_.value=t,this.setText(t))},Blockly.FieldAngle.prototype.setText=function(e){Blockly.FieldAngle.superClass_.setText.call(this,e),this.textElement_&&(this.updateGraph_(),Blockly.RTL?this.textElement_.insertBefore(this.symbol_,this.textElement_.firstChild):this.textElement_.appendChild(this.symbol_),this.size_.width=0)},Blockly.FieldAngle.prototype.updateGraph_=function(){if(this.gauge_){var e=goog.math.toRadians(Number(this.getText()));if(isNaN(e))this.gauge_.setAttribute("d","M "+Blockly.FieldAngle.HALF+", "+Blockly.FieldAngle.HALF),this.line_.setAttribute("x2",Blockly.FieldAngle.HALF),this.line_.setAttribute("y2",Blockly.FieldAngle.HALF);else{var t=Blockly.FieldAngle.HALF+Math.cos(e)*Blockly.FieldAngle.RADIUS,o=Blockly.FieldAngle.HALF+Math.sin(e)*-Blockly.FieldAngle.RADIUS;this.gauge_.setAttribute("d","M "+Blockly.FieldAngle.HALF+", "+Blockly.FieldAngle.HALF+" h "+Blockly.FieldAngle.RADIUS+" A "+Blockly.FieldAngle.RADIUS+","+Blockly.FieldAngle.RADIUS+" 0 "+(e>Math.PI?1:0)+" 0 "+t+","+o+" z"),this.line_.setAttribute("x2",t),this.line_.setAttribute("y2",o)}}},Blockly.FieldAngle.angleValidator=function(e){return e=Blockly.FieldTextInput.numberValidator(e),null!==e&&(e%=360,0>e&&(e+=360),e=String(e)),e},Blockly.FieldCheckbox=function(e,t){Blockly.FieldCheckbox.superClass_.constructor.call(this,""),this.changeHandler_=t,this.setValue(e)},goog.inherits(Blockly.FieldCheckbox,Blockly.Field),Blockly.FieldCheckbox.prototype.clone=function(){return new Blockly.FieldCheckbox(this.getValue(),this.changeHandler_)},Blockly.FieldCheckbox.prototype.CURSOR="default",Blockly.FieldCheckbox.prototype.init=function(e){this.sourceBlock_||(Blockly.FieldCheckbox.superClass_.init.call(this,e),this.checkElement_=Blockly.createSvgElement("text",{"class":"blocklyText",x:-3},this.fieldGroup_),e=document.createTextNode("✓"),this.checkElement_.appendChild(e),this.checkElement_.style.display=this.state_?"block":"none")},Blockly.FieldCheckbox.prototype.getValue=function(){return String(this.state_).toUpperCase()},Blockly.FieldCheckbox.prototype.setValue=function(e){e="TRUE"==e,this.state_!==e&&(this.state_=e,this.checkElement_&&(this.checkElement_.style.display=e?"block":"none"),this.sourceBlock_&&this.sourceBlock_.rendered&&this.sourceBlock_.workspace.fireChangeEvent())},Blockly.FieldCheckbox.prototype.showEditor_=function(){var e=!this.state_;if(this.sourceBlock_&&this.changeHandler_){var t=this.changeHandler_(e);void 0!==t&&(e=t)}null!==e&&this.setValue(String(e).toUpperCase())},Blockly.FieldColour=function(e,t){Blockly.FieldColour.superClass_.constructor.call(this,"   "),this.changeHandler_=t,this.setValue(e)},goog.inherits(Blockly.FieldColour,Blockly.Field),Blockly.FieldColour.prototype.init=function(e){Blockly.FieldColour.superClass_.init.call(this,e),this.borderRect_.style.fillOpacity=1,this.setValue(this.getValue())},Blockly.FieldColour.prototype.clone=function(){return new Blockly.FieldColour(this.getValue(),this.changeHandler_)},Blockly.FieldColour.prototype.CURSOR="default",Blockly.FieldColour.prototype.dispose=function(){Blockly.WidgetDiv.hideIfOwner(this),Blockly.FieldColour.superClass_.dispose.call(this)},Blockly.FieldColour.prototype.getValue=function(){return this.colour_},Blockly.FieldColour.prototype.setValue=function(e){this.colour_=e,this.borderRect_&&(this.borderRect_.style.fill=e),this.sourceBlock_&&this.sourceBlock_.rendered&&(Blockly.Realtime.blockChanged(this.sourceBlock_),this.sourceBlock_.workspace.fireChangeEvent())},Blockly.FieldColour.prototype.getText=function(){var e=this.colour_,t=e.match(/^#(.)\1(.)\2(.)\3$/);return t&&(e="#"+t[1]+t[2]+t[3]),e},Blockly.FieldColour.COLOURS=goog.ui.ColorPicker.SIMPLE_GRID_COLORS,Blockly.FieldColour.COLUMNS=7,Blockly.FieldColour.prototype.showEditor_=function(){Blockly.WidgetDiv.show(this,Blockly.FieldColour.widgetDispose_);var e=new goog.ui.ColorPicker;e.setSize(Blockly.FieldColour.COLUMNS),e.setColors(Blockly.FieldColour.COLOURS);var t=goog.dom.getViewportSize(),o=goog.style.getViewportPageOffset(document),n=Blockly.getAbsoluteXY_(this.borderRect_),i=this.borderRect_.getBBox();e.render(Blockly.WidgetDiv.DIV),e.setSelectedColor(this.getValue());var r=goog.style.getSize(e.getElement());n.y=n.y+r.height+i.height>=t.height+o.y?n.y-(r.height-1):n.y+(i.height-1),Blockly.RTL?(n.x+=i.width,n.x-=r.width,n.xt.width+o.x-r.width&&(n.x=t.width+o.x-r.width),Blockly.WidgetDiv.position(n.x,n.y,t,o);var s=this;Blockly.FieldColour.changeEventKey_=goog.events.listen(e,goog.ui.ColorPicker.EventType.CHANGE,function(e){if(e=e.target.getSelectedColor()||"#000000",Blockly.WidgetDiv.hide(),s.sourceBlock_&&s.changeHandler_){var t=s.changeHandler_(e);void 0!==t&&(e=t)}null!==e&&s.setValue(e)})},Blockly.FieldColour.widgetDispose_=function(){Blockly.FieldColour.changeEventKey_&&goog.events.unlistenByKey(Blockly.FieldColour.changeEventKey_)},Blockly.FieldDropdown=function(e,t){this.menuGenerator_=e,this.changeHandler_=t,this.trimOptions_();var o=this.getOptions_()[0];this.value_=o[1],Blockly.FieldDropdown.superClass_.constructor.call(this,o[0])},goog.inherits(Blockly.FieldDropdown,Blockly.Field),Blockly.FieldDropdown.CHECKMARK_OVERHANG=25,Blockly.FieldDropdown.ARROW_CHAR=goog.userAgent.ANDROID?"▼":"▾",Blockly.FieldDropdown.prototype.clone=function(){return new Blockly.FieldDropdown(this.menuGenerator_,this.changeHandler_) },Blockly.FieldDropdown.prototype.CURSOR="default",Blockly.FieldDropdown.prototype.init=function(e){this.sourceBlock_||(this.arrow_=Blockly.createSvgElement("tspan",{},null),this.arrow_.appendChild(document.createTextNode(Blockly.RTL?Blockly.FieldDropdown.ARROW_CHAR+" ":" "+Blockly.FieldDropdown.ARROW_CHAR)),Blockly.FieldDropdown.superClass_.init.call(this,e),e=this.text_,this.text_=null,this.setText(e))},Blockly.FieldDropdown.prototype.showEditor_=function(){Blockly.WidgetDiv.show(this,null);for(var e=this,t=new goog.ui.Menu,o=this.getOptions_(),n=0;n=o.height+n.y?i.y-l.height:i.y+r.height,Blockly.RTL?(i.x+=r.width,i.x+=Blockly.FieldDropdown.CHECKMARK_OVERHANG,i.xo.width+n.x-l.width&&(i.x=o.width+n.x-l.width)),Blockly.WidgetDiv.position(i.x,i.y,o,n),t.setAllowAutoFocus(!0),s.focus()},Blockly.FieldDropdown.prototype.trimOptions_=function(){this.suffixField=this.prefixField=null;var e=this.menuGenerator_;if(goog.isArray(e)&&!(2>e.length)){var t=e.map(function(e){return e[0]}),o=Blockly.shortestStringLength(t),n=Blockly.commonWordPrefix(t,o),i=Blockly.commonWordSuffix(t,o);if((n||i)&&!(n+i>=o)){for(n&&(this.prefixField=t[0].substring(0,n-1)),i&&(this.suffixField=t[0].substr(1-i)),t=[],o=0;o1&&(i+=o)):t=i}else t="i";return t},Blockly.FieldVariable=function(e,t){var o;if(t){var n=this;o=function(e){var o=Blockly.FieldVariable.dropdownChange.call(n,e);return e=void 0===o?e:null===o?n.getValue():o,t.call(n,e),o}}else o=Blockly.FieldVariable.dropdownChange;Blockly.FieldVariable.superClass_.constructor.call(this,Blockly.FieldVariable.dropdownCreate,o),this.setValue(e||"")},goog.inherits(Blockly.FieldVariable,Blockly.FieldDropdown),Blockly.FieldVariable.prototype.init=function(e){this.sourceBlock_||(this.getValue()||this.setValue(Blockly.Variables.generateUniqueName(e.isInFlyout?e.workspace.targetWorkspace:e.workspace)),Blockly.FieldVariable.superClass_.init.call(this,e))},Blockly.FieldVariable.prototype.clone=function(){return new Blockly.FieldVariable(this.getValue(),this.changeHandler_)},Blockly.FieldVariable.prototype.getValue=function(){return this.getText()},Blockly.FieldVariable.prototype.setValue=function(e){this.value_=e,this.setText(e)},Blockly.FieldVariable.dropdownCreate=function(){var e=this.sourceBlock_&&this.sourceBlock_.workspace?Blockly.Variables.allVariables(this.sourceBlock_.workspace):[],t=this.getText();t&&-1==e.indexOf(t)&&e.push(t),e.sort(goog.string.caseInsensitiveCompare),e.push(Blockly.Msg.RENAME_VARIABLE),e.push(Blockly.Msg.NEW_VARIABLE);for(var t=[],o=0;o=o&&o!=n&&0!=o&&99!=o&&(t="("+t+")"),t},Blockly.Generator.prototype.statementToCode=function(e,t){var o=e.getInputTargetBlock(t),n=this.blockToCode(o);if(!goog.isString(n))throw'Expecting code from statement block "'+o.type+'".';return n&&(n=this.prefixLines(n,this.INDENT)),n},Blockly.Generator.prototype.addLoopTrap=function(e,t){return this.INFINITE_LOOP_TRAP&&(e=this.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+t+"'")+e),this.STATEMENT_PREFIX&&(e+=this.prefixLines(this.STATEMENT_PREFIX.replace(/%1/g,"'"+t+"'"),this.INDENT)),e},Blockly.Generator.prototype.INDENT=" ",Blockly.Generator.prototype.addReservedWords=function(e){this.RESERVED_WORDS_+=e+","},Blockly.Generator.prototype.FUNCTION_NAME_PLACEHOLDER_="{leCUI8hutHZI4480Dc}",Blockly.Generator.prototype.provideFunction_=function(e,t){if(!this.definitions_[e]){var o=this.variableDB_.getDistinctName(e,this.NAME_TYPE);this.functionNames_[e]=o,this.definitions_[e]=t.join("\n").replace(this.FUNCTION_NAME_PLACEHOLDER_REGEXP_,o)}return this.functionNames_[e]},Blockly.Names=function(e){if(this.reservedDict_=Object.create(null),e){e=e.split(",");for(var t=0;tn?1:n>o?-1:0},Blockly.Procedures.findLegalName=function(e,t){if(t.isInFlyout)return e;for(;!Blockly.Procedures.isLegalName(e,t.workspace,t);){var o=e.match(/^(.*?)(\d+)$/);e=o?o[1]+(parseInt(o[2],10)+1):e+"2"}return e},Blockly.Procedures.isLegalName=function(e,t,o){t=t.getAllBlocks();for(var n=0;no;o++){var n=e[o];console.log(" child event:"),console.log(" id: "+n.target.id),console.log(" type: "+n.type)}},Blockly.Realtime.onObjectChange_=function(e){var t=e.events;e=e.events.length;for(var o=0;e>o;o++){var n=t[o];if(!n.isLocal||Blockly.Realtime.withinUndo_){var i=n.target;"value_changed"==n.type&&("xmlDom"==n.property?Blockly.Realtime.doWithinSync_(function(){Blockly.Realtime.placeBlockOnWorkspace_(i,!1),Blockly.Realtime.moveBlock_(i)}):"relativeX"!=n.property&&"relativeY"!=n.property||Blockly.Realtime.doWithinSync_(function(){i.svg_||Blockly.Realtime.placeBlockOnWorkspace_(i,!1),Blockly.Realtime.moveBlock_(i)}))}}},Blockly.Realtime.onBlocksMapChange_=function(e){if(!e.isLocal||Blockly.Realtime.withinUndo_){var t=e.newValue;t?Blockly.Realtime.placeBlockOnWorkspace_(t,!e.oldValue):(t=e.oldValue,Blockly.Realtime.deleteBlock(t))}},Blockly.Realtime.doWithinSync_=function(e){if(Blockly.Realtime.withinSync)e();else try{Blockly.Realtime.withinSync=!0,e()}finally{Blockly.Realtime.withinSync=!1}},Blockly.Realtime.placeBlockOnWorkspace_=function(e,t){Blockly.Realtime.doWithinSync_(function(){var o=Blockly.Xml.textToDom(e.xmlDom).firstChild;(o=Blockly.Xml.domToBlock(Blockly.mainWorkspace,o,!0))&&(t&&o.workspace.addTopBlock(o),(t||goog.array.contains(Blockly.Realtime.topBlocks_,o))&&Blockly.Realtime.moveBlock_(o))})},Blockly.Realtime.moveBlock_=function(e){if(!isNaN(e.relativeX)&&!isNaN(e.relativeY)){var t=Blockly.svgSize().width,o=e.getRelativeToSurfaceXY(),n=e.relativeX-o.x;e.moveBy(Blockly.RTL?t-n:n,e.relativeY-o.y)}},Blockly.Realtime.deleteBlock=function(e){Blockly.Realtime.doWithinSync_(function(){e.dispose(!0,!0,!0)})},Blockly.Realtime.loadBlocks_=function(){for(var e=Blockly.Realtime.topBlocks_,t=0;t=e.clientX&&0==e.clientY&&0==e.button)e.stopPropagation();else{Blockly.removeAllRanges();var t=e.clientY-Blockly.Flyout.startDownEvent_.clientY;Math.sqrt(Math.pow(e.clientX-Blockly.Flyout.startDownEvent_.clientX,2)+Math.pow(t,2))>Blockly.DRAG_RADIUS&&Blockly.Flyout.startFlyout_.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_)}},Blockly.Flyout.prototype.createBlockFunc_=function(e){var t=this;return function(o){if(!Blockly.isRightButton(o)&&!e.disabled){var n=Blockly.Xml.blockToDom_(e),n=Blockly.Xml.domToBlock(t.targetWorkspace_,n),i=e.getSvgRoot();if(!i)throw"originBlock is not rendered.";var i=Blockly.getSvgXY_(i),r=n.getSvgRoot();if(!r)throw"block is not rendered.";r=Blockly.getSvgXY_(r),n.moveBy(i.x-r.x,i.y-r.y),t.autoClose?t.hide():t.filterForCapacity_(),n.onMouseDown_(o)}}},Blockly.Flyout.prototype.filterForCapacity_=function(){for(var e,t=this.targetWorkspace_.remainingCapacity(),o=this.workspace_.getTopBlocks(!1),n=0;e=o[n];n++){var i=e.getDescendants().length>t;e.setDisabled(i)}},Blockly.Flyout.terminateDrag_=function(){Blockly.Flyout.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_),Blockly.Flyout.onMouseUpWrapper_=null),Blockly.Flyout.onMouseMoveBlockWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveBlockWrapper_),Blockly.Flyout.onMouseMoveBlockWrapper_=null),Blockly.Flyout.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveWrapper_),Blockly.Flyout.onMouseMoveWrapper_=null),Blockly.Flyout.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_),Blockly.Flyout.onMouseUpWrapper_=null),Blockly.Flyout.startDownEvent_=null,Blockly.Flyout.startBlock_=null,Blockly.Flyout.startFlyout_=null},Blockly.Flyout.prototype.getRect=function(){var e=Blockly.getSvgXY_(this.svgGroup_).x;return Blockly.RTL||(e-=1e7),new goog.math.Rect(e,-1e7,1e7+this.width_,this.height_+2e7)},Blockly.Toolbox=function(e,t){this.HtmlDiv=goog.dom.createDom("div","blocklyToolboxDiv"),this.HtmlDiv.setAttribute("dir",Blockly.RTL?"RTL":"LTR"),t.appendChild(this.HtmlDiv),this.flyout_=new Blockly.Flyout,e.appendChild(this.flyout_.createDom()),Blockly.bindEvent_(this.HtmlDiv,"mousedown",this,function(e){Blockly.isRightButton(e)||e.target==this.HtmlDiv?Blockly.hideChaff(!1):Blockly.hideChaff(!0)})},Blockly.Toolbox.prototype.width=0,Blockly.Toolbox.prototype.selectedOption_=null,Blockly.Toolbox.prototype.CONFIG_={indentWidth:19,cssRoot:"blocklyTreeRoot",cssHideRoot:"blocklyHidden",cssItem:"",cssTreeRow:"blocklyTreeRow",cssItemLabel:"blocklyTreeLabel",cssTreeIcon:"blocklyTreeIcon",cssExpandedFolderIcon:"blocklyTreeIconOpen",cssFileIcon:"blocklyTreeIconNone",cssSelectedRow:"blocklyTreeSelected"},Blockly.Toolbox.prototype.init=function(e){this.CONFIG_.cleardotPath=Blockly.pathToMedia+"1x1.gif",this.CONFIG_.cssCollapsedFolderIcon="blocklyTreeIconClosed"+(Blockly.RTL?"Rtl":"Ltr");var t=new Blockly.Toolbox.TreeControl(this,this.CONFIG_);this.tree_=t,t.setShowRootNode(!1),t.setShowLines(!1),t.setShowExpandIcons(!1),t.setSelectedItem(null),this.HtmlDiv.style.display="block",this.flyout_.init(e),this.populate_(),t.render(this.HtmlDiv);var o=this;goog.events.listen(window,goog.events.EventType.RESIZE,function(){o.position_()}),this.position_()},Blockly.Toolbox.prototype.position_=function(){var e=this.HtmlDiv,t=goog.style.getBorderBox(Blockly.svg),o=Blockly.svgSize();Blockly.RTL?(t=Blockly.convertCoordinates(0,0,!1),e.style.left=t.x+o.width-e.offsetWidth+"px"):e.style.marginLeft=t.left,e.style.height=o.height+1+"px",this.width=e.offsetWidth,Blockly.RTL||--this.width},Blockly.Toolbox.prototype.populate_=function(){function e(o,n){for(var i,r=0;i=o.childNodes[r];r++)if(i.tagName){var s=i.tagName.toUpperCase();if("CATEGORY"==s){s=t.createNode(i.getAttribute("name")),s.blocks=[],n.add(s);var l=i.getAttribute("custom");l?s.blocks=l:e(i,s)}else"HR"==s?console.warn("The
    separator tag in the toolbox XML needs to be changed to (due to a bug in IE)."):"SEP"==s?n.add(new Blockly.Toolbox.TreeSeparator):"BLOCK"==s&&n.blocks.push(i)}}var t=this.tree_;if(t.removeChildren(),t.blocks=[],e(Blockly.languageTree,this.tree_),t.blocks.length)throw"Toolbox cannot have both blocks and categories in the root level.";Blockly.fireUiEvent(window,"resize")},Blockly.Toolbox.prototype.clearSelection=function(){this.tree_.setSelectedItem(null)},Blockly.Toolbox.prototype.getRect=function(){var e=Blockly.RTL?Blockly.svgSize().width-this.width:-1e7;return new goog.math.Rect(e,-1e7,1e7+this.width,2e7)},Blockly.Toolbox.TreeControl=function(e,t){this.toolbox_=e,goog.ui.tree.TreeControl.call(this,goog.html.SafeHtml.EMPTY,t)},goog.inherits(Blockly.Toolbox.TreeControl,goog.ui.tree.TreeControl),Blockly.Toolbox.TreeControl.prototype.enterDocument=function(){if(Blockly.Toolbox.TreeControl.superClass_.enterDocument.call(this),goog.events.BrowserFeature.TOUCH_ENABLED){var e=this.getElement();Blockly.bindEvent_(e,goog.events.EventType.TOUCHSTART,this,this.handleTouchEvent_)}},Blockly.Toolbox.TreeControl.prototype.handleTouchEvent_=function(e){e.preventDefault();var t=this.getNodeFromEvent_(e);t&&e.type===goog.events.EventType.TOUCHSTART&&setTimeout(function(){t.onMouseDown(e)},1)},Blockly.Toolbox.TreeControl.prototype.createNode=function(e){return new Blockly.Toolbox.TreeNode(this.toolbox_,e?goog.html.SafeHtml.htmlEscape(e):goog.html.SafeHtml.EMPTY,this.getConfig(),this.getDomHelper())},Blockly.Toolbox.TreeControl.prototype.setSelectedItem=function(e){this.selectedItem_!=e&&(goog.ui.tree.TreeControl.prototype.setSelectedItem.call(this,e),e&&e.blocks&&e.blocks.length?this.toolbox_.flyout_.show(e.blocks):this.toolbox_.flyout_.hide())},Blockly.Toolbox.TreeNode=function(e,t,o,n){goog.ui.tree.TreeNode.call(this,t,o,n),e&&(t=function(){Blockly.fireUiEvent(window,"resize")},goog.events.listen(e.tree_,goog.ui.tree.BaseNode.EventType.EXPAND,t),goog.events.listen(e.tree_,goog.ui.tree.BaseNode.EventType.COLLAPSE,t))},goog.inherits(Blockly.Toolbox.TreeNode,goog.ui.tree.TreeNode),goog.ui.tree.BaseNode.prototype.getExpandIconSafeHtml=function(){return goog.html.SafeHtml.create("span")},Blockly.Toolbox.TreeNode.prototype.onMouseDown=function(){this.hasChildren()&&this.isUserCollapsible_?(this.toggle(),this.select()):this.isSelected()?this.getTree().setSelectedItem(null):this.select(),this.updateRow()},Blockly.Toolbox.TreeNode.prototype.onDoubleClick_=function(){},Blockly.Toolbox.TreeSeparator=function(){Blockly.Toolbox.TreeNode.call(this,null,"",Blockly.Toolbox.TreeSeparator.CONFIG_)},goog.inherits(Blockly.Toolbox.TreeSeparator,Blockly.Toolbox.TreeNode),Blockly.Toolbox.TreeSeparator.CONFIG_={cssTreeRow:"blocklyTreeSeparator"},Blockly.Css={},Blockly.Css.Cursor={OPEN:"handopen",CLOSED:"handclosed",DELETE:"handdelete"},Blockly.Css.currentCursor_="",Blockly.Css.styleSheet_=null,Blockly.Css.mediaPath_="",Blockly.Css.inject=function(){var e=".blocklyDraggable {}\n";Blockly.hasCss&&(e+=Blockly.Css.CONTENT.join("\n")),Blockly.Css.mediaPath_=Blockly.pathToMedia.replace(/[\\\/]$/,""),e=e.replace(/<<>>/g,Blockly.Css.mediaPath_),Blockly.Css.styleSheet_=goog.cssom.addCssText(e).sheet,Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)},Blockly.Css.setCursor=function(e){if(!Blockly.readOnly&&Blockly.Css.currentCursor_!=e){Blockly.Css.currentCursor_=e;var t="url("+Blockly.Css.mediaPath_+"/"+e+".cur) "+(e==Blockly.Css.Cursor.OPEN?"8 5":"7 3")+", auto";goog.cssom.replaceCssRule("",".blocklyDraggable {\n cursor: "+t+";\n}\n",Blockly.Css.styleSheet_,0);for(var o,n=document.getElementsByClassName("blocklyToolboxDiv"),i=0;o=n[i];i++)o.style.cursor=e==Blockly.Css.Cursor.OPEN?"":t;Blockly.svg&&(Blockly.svg.style.cursor=e==Blockly.Css.Cursor.OPEN?"":t)}},Blockly.Css.CONTENT=[".blocklySvg {"," background-color: #fff;"," border: 1px solid #ddd;"," overflow: hidden;","}",".blocklyWidgetDiv {"," display: none;"," position: absolute;"," z-index: 999;","}",".blocklyResizeSE {"," cursor: se-resize;"," fill: #aaa;","}",".blocklyResizeSW {"," cursor: sw-resize;"," fill: #aaa;","}",".blocklyResizeLine {"," stroke: #888;"," stroke-width: 1;","}",".blocklyHighlightedConnectionPath {"," fill: none;"," stroke: #fc3;"," stroke-width: 4px;","}",".blocklyPathLight {"," fill: none;"," stroke-linecap: round;"," stroke-width: 2;","}",".blocklySelected>.blocklyPath {"," stroke: #fc3;"," stroke-width: 3px;","}",".blocklySelected>.blocklyPathLight {"," display: none;","}",".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {"," fill-opacity: .8;"," stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {"," display: none;","}",".blocklyDisabled>.blocklyPath {"," fill-opacity: .5;"," stroke-opacity: .5;","}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {"," display: none;","}",".blocklyText {"," cursor: default;"," fill: #fff;"," font-family: sans-serif;"," font-size: 11pt;","}",".blocklyNonEditableText>text {"," pointer-events: none;","}",".blocklyNonEditableText>rect,",".blocklyEditableText>rect {"," fill: #fff;"," fill-opacity: .6;","}",".blocklyNonEditableText>text,",".blocklyEditableText>text {"," fill: #000;","}",".blocklyEditableText:hover>rect {"," stroke: #fff;"," stroke-width: 2;","}",".blocklyBubbleText {"," fill: #000;","}",".blocklySvg text {"," user-select: none;"," -moz-user-select: none;"," -webkit-user-select: none;"," cursor: inherit;","}",".blocklyHidden {"," display: none;","}",".blocklyFieldDropdown:not(.blocklyHidden) {"," display: block;","}",".blocklyTooltipBackground {"," fill: #ffffc7;"," stroke: #d8d8d8;"," stroke-width: 1px;","}",".blocklyTooltipShadow,",".blocklyDropdownMenuShadow {"," fill: #bbb;"," filter: url(#blocklyShadowFilter);","}",".blocklyTooltipText {"," fill: #000;"," font-family: sans-serif;"," font-size: 9pt;","}",".blocklyIconShield {"," cursor: default;"," fill: #00c;"," stroke: #ccc;"," stroke-width: 1px;","}",".blocklyIconGroup:hover>.blocklyIconShield {"," fill: #00f;"," stroke: #fff;","}",".blocklyIconGroup:hover>.blocklyIconMark {"," fill: #fff;","}",".blocklyIconMark {"," cursor: default !important;"," fill: #ccc;"," font-family: sans-serif;"," font-size: 9pt;"," font-weight: bold;"," text-anchor: middle;","}",".blocklyWarningBody {","}",".blocklyMinimalBody {"," margin: 0;"," padding: 0;","}",".blocklyCommentTextarea {"," background-color: #ffc;"," border: 0;"," margin: 0;"," padding: 2px;"," resize: none;","}",".blocklyHtmlInput {"," border: none;"," font-family: sans-serif;"," font-size: 11pt;"," outline: none;"," width: 100%","}",".blocklyMutatorBackground {"," fill: #fff;"," stroke: #ddd;"," stroke-width: 1;","}",".blocklyFlyoutBackground {"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyColourBackground {"," fill: #666;","}",".blocklyScrollbarBackground {"," fill: #fff;"," stroke: #e4e4e4;"," stroke-width: 1;","}",".blocklyScrollbarKnob {"," fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",".blocklyScrollbarKnob:hover {"," fill: #bbb;","}",".blocklyInvalidInput {"," background: #faa;","}",".blocklyAngleCircle {"," stroke: #444;"," stroke-width: 1;"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyAngleMarks {"," stroke: #444;"," stroke-width: 1;","}",".blocklyAngleGauge {"," fill: #f88;"," fill-opacity: .8; ","}",".blocklyAngleLine {"," stroke: #f00;"," stroke-width: 2;"," stroke-linecap: round;","}",".blocklyContextMenu {"," border-radius: 4px;","}",".blocklyDropdownMenu {"," padding: 0 !important;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(<<>>/sprites.png) no-repeat -48px -16px !important;","}",".blocklyToolboxDiv {"," background-color: #ddd;"," display: none;"," overflow-x: visible;"," overflow-y: auto;"," position: absolute;","}",".blocklyTreeRoot {"," padding: 4px 0;","}",".blocklyTreeRoot:focus {"," outline: none;","}",".blocklyTreeRow {"," line-height: 22px;"," height: 22px;"," padding-right: 1em;"," white-space: nowrap;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {'," padding-right: 0;"," padding-left: 1em !important;","}",".blocklyTreeRow:hover {"," background-color: #e4e4e4;","}",".blocklyTreeSeparator {"," border-bottom: solid #e5e5e5 1px;"," height: 0px;"," margin: 5px 0;","}",".blocklyTreeIcon {"," background-image: url(<<>>/sprites.png);"," height: 16px;"," vertical-align: middle;"," width: 16px;","}",".blocklyTreeIconClosedLtr {"," background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {"," background-position: 0px -1px;","}",".blocklyTreeIconOpen {"," background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {"," background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {"," background-position: 0px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {"," background-position: -16px -17px;","}",".blocklyTreeIconNone,",".blocklyTreeSelected>.blocklyTreeIconNone {"," background-position: -48px -1px;","}",".blocklyTreeLabel {"," cursor: default;"," font-family: sans-serif;"," font-size: 16px;"," padding: 0 3px;"," vertical-align: middle;","}",".blocklyTreeSelected {"," background-color: #57e !important;","}",".blocklyTreeSelected .blocklyTreeLabel {"," color: #fff;","}",".blocklyWidgetDiv .goog-palette {"," outline: none;"," cursor: default;","}",".blocklyWidgetDiv .goog-palette-table {"," border: 1px solid #666;"," border-collapse: collapse;","}",".blocklyWidgetDiv .goog-palette-cell {"," height: 13px;"," width: 15px;"," margin: 0;"," border: 0;"," text-align: center;"," vertical-align: middle;"," border-right: 1px solid #666;"," font-size: 1px;","}",".blocklyWidgetDiv .goog-palette-colorswatch {"," position: relative;"," height: 13px;"," width: 15px;"," border: 1px solid #666;","}",".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {"," border: 1px solid #FFF;","}",".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {"," border: 1px solid #000;"," color: #fff;","}",".blocklyWidgetDiv .goog-menu {"," background: #fff;"," border-color: #ccc #666 #666 #ccc;"," border-style: solid;"," border-width: 1px;"," cursor: default;"," font: normal 13px Arial, sans-serif;"," margin: 0;"," outline: none;"," padding: 4px 0;"," position: absolute;"," z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem {"," color: #000;"," font: normal 13px Arial, sans-serif;"," list-style: none;"," margin: 0;"," padding: 4px 7em 4px 28px;"," white-space: nowrap;","}",".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {"," padding-left: 7em;"," padding-right: 28px;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {"," padding-left: 12px;","}",".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {"," padding-right: 20px;","}",".blocklyWidgetDiv .goog-menuitem-content {"," color: #000;"," font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content {"," color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon {"," opacity: 0.3;"," -moz-opacity: 0.3;"," filter: alpha(opacity=30);","}",".blocklyWidgetDiv .goog-menuitem-highlight,",".blocklyWidgetDiv .goog-menuitem-hover {"," background-color: #d6e9f8;"," border-color: #d6e9f8;"," border-style: dotted;"," border-width: 1px 0;"," padding-bottom: 3px;"," padding-top: 3px;","}",".blocklyWidgetDiv .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-icon {"," background-repeat: no-repeat;"," height: 16px;"," left: 6px;"," position: absolute;"," right: auto;"," vertical-align: middle;"," width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon {"," left: auto;"," right: 6px;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;","}",".blocklyWidgetDiv .goog-menuitem-accel {"," color: #999;"," direction: ltr;"," left: auto;"," padding: 0 6px;"," position: absolute;"," right: 0;"," text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {"," left: 0;"," right: auto;"," text-align: left;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {"," text-decoration: underline;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {"," color: #999;"," font-size: 12px;"," padding-left: 4px;","}",".blocklyWidgetDiv .goog-menuseparator {"," border-top: 1px solid #ccc;"," margin: 4px 0;"," padding: 0;","}",""],Blockly.WidgetDiv={},Blockly.WidgetDiv.DIV=null,Blockly.WidgetDiv.owner_=null,Blockly.WidgetDiv.dispose_=null,Blockly.WidgetDiv.show=function(e,t){Blockly.WidgetDiv.hide(),Blockly.WidgetDiv.owner_=e,Blockly.WidgetDiv.dispose_=t,Blockly.WidgetDiv.DIV.style.display="block"},Blockly.WidgetDiv.hide=function(){Blockly.WidgetDiv.owner_&&(Blockly.WidgetDiv.DIV.style.display="none",Blockly.WidgetDiv.dispose_&&Blockly.WidgetDiv.dispose_(),Blockly.WidgetDiv.owner_=null,Blockly.WidgetDiv.dispose_=null,goog.dom.removeChildren(Blockly.WidgetDiv.DIV))},Blockly.WidgetDiv.isVisible=function(){return!!Blockly.WidgetDiv.owner_},Blockly.WidgetDiv.hideIfOwner=function(e){Blockly.WidgetDiv.owner_==e&&Blockly.WidgetDiv.hide()},Blockly.WidgetDiv.position=function(e,t,o,n){to.width+n.x&&(e=o.width+n.x):ee.viewHeight+o||e.contentLeft<(Blockly.RTL?e.viewLeft:t)||e.contentLeft+e.contentWidth>(Blockly.RTL?e.viewWidth:e.viewWidth+t))for(var n,i=Blockly.mainWorkspace.getTopBlocks(!1),r=0;n=i[r];r++){var s=n.getRelativeToSurfaceXY(),l=n.getHeightWidth(),a=o+25-l.height-s.y;a>0&&n.moveBy(0,a),a=o+e.viewHeight-25-s.y,0>a&&n.moveBy(0,a),a=25+t-s.x-(Blockly.RTL?0:l.width),a>0&&n.moveBy(a,0),a=t+e.viewWidth-25-s.x+(Blockly.RTL?l.width:0),0>a&&n.moveBy(a,0)}}})),n.appendChild(Blockly.Tooltip.createDom()),e.appendChild(n),Blockly.svg=n,Blockly.svgResize(),Blockly.WidgetDiv.DIV=goog.dom.createDom("div","blocklyWidgetDiv"),Blockly.WidgetDiv.DIV.style.direction=Blockly.RTL?"rtl":"ltr",document.body.appendChild(Blockly.WidgetDiv.DIV)},Blockly.init_=function(){if(Blockly.bindEvent_(Blockly.svg,"mousedown",null,Blockly.onMouseDown_),Blockly.bindEvent_(Blockly.svg,"contextmenu",null,Blockly.onContextMenu_),Blockly.bindEvent_(Blockly.WidgetDiv.DIV,"contextmenu",null,Blockly.onContextMenu_),Blockly.documentEventsBound_||(Blockly.bindEvent_(window,"resize",document,Blockly.svgResize),Blockly.bindEvent_(document,"keydown",null,Blockly.onKeyDown_),document.addEventListener("mouseup",Blockly.onMouseUp_,!1),goog.userAgent.IPAD&&Blockly.bindEvent_(window,"orientationchange",document,function(){Blockly.fireUiEvent(window,"resize")}),Blockly.documentEventsBound_=!0),Blockly.languageTree)if(Blockly.mainWorkspace.toolbox_)Blockly.mainWorkspace.toolbox_.init(Blockly.mainWorkspace);else if(Blockly.mainWorkspace.flyout_){Blockly.mainWorkspace.flyout_.init(Blockly.mainWorkspace),Blockly.mainWorkspace.flyout_.show(Blockly.languageTree.childNodes),Blockly.mainWorkspace.scrollX=Blockly.mainWorkspace.flyout_.width_,Blockly.RTL&&(Blockly.mainWorkspace.scrollX*=-1);var e="translate("+Blockly.mainWorkspace.scrollX+", 0)";Blockly.mainWorkspace.getCanvas().setAttribute("transform",e),Blockly.mainWorkspace.getBubbleCanvas().setAttribute("transform",e)}if(Blockly.hasScrollbars&&(Blockly.mainWorkspace.scrollbar=new Blockly.ScrollbarPair(Blockly.mainWorkspace),Blockly.mainWorkspace.scrollbar.resize()),Blockly.mainWorkspace.addTrashcan(),Blockly.hasSounds){Blockly.loadAudio_([Blockly.pathToMedia+"click.mp3",Blockly.pathToMedia+"click.wav",Blockly.pathToMedia+"click.ogg"],"click"),Blockly.loadAudio_([Blockly.pathToMedia+"delete.mp3",Blockly.pathToMedia+"delete.ogg",Blockly.pathToMedia+"delete.wav"],"delete");var t=[],e=function(){for(;t.length;)Blockly.unbindEvent_(t.pop());Blockly.preloadAudio_()};t.push(Blockly.bindEvent_(document,"mousemove",null,e)),t.push(Blockly.bindEvent_(document,"touchstart",null,e))}},Blockly.updateToolbox=function(e){if(e=Blockly.parseToolboxTree_(e)){if(!Blockly.languageTree)throw"Existing toolbox is null. Can't create new toolbox.";if(e.getElementsByTagName("category").length){if(!Blockly.hasCategories)throw"Existing toolbox has no categories. Can't change mode.";Blockly.languageTree=e,Blockly.mainWorkspace.toolbox_.populate_()}else{if(Blockly.hasCategories)throw"Existing toolbox has categories. Can't change mode.";Blockly.languageTree=e,Blockly.mainWorkspace.flyout_.show(Blockly.languageTree.childNodes)}}else if(Blockly.languageTree)throw"Can't nullify an existing toolbox."},Blockly.utils={},Blockly.addClass_=function(e,t){var o=e.getAttribute("class")||"";-1==(" "+o+" ").indexOf(" "+t+" ")&&(o&&(o+=" "),e.setAttribute("class",o+t))},Blockly.removeClass_=function(e,t){var o=e.getAttribute("class");if(-1!=(" "+o+" ").indexOf(" "+t+" ")){for(var o=o.split(/\s+/),n=0;ni;i++){for(var r=e[0][i],s=1;si;i++){for(var r=e[0].substr(-i-1,1),s=1;s0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);for(this.elseifCount_=0,e=e.getInputTargetBlock("STACK");e;){switch(e.type){case"controls_if_elseif":this.elseifCount_++;var t=this.appendValueInput("IF"+this.elseifCount_).setCheck("Boolean").appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSEIF),o=this.appendStatementInput("DO"+this.elseifCount_);o.appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN),e.valueConnection_&&t.connection.connect(e.valueConnection_),e.statementConnection_&&o.connection.connect(e.statementConnection_);break;case"controls_if_else":this.elseCount_++,t=this.appendStatementInput("ELSE"),t.appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSE),e.statementConnection_&&t.connection.connect(e.statementConnection_);break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},saveConnections:function(e){e=e.getInputTargetBlock("STACK");for(var t=1;e;){switch(e.type){case"controls_if_elseif":var o=this.getInput("IF"+t),n=this.getInput("DO"+t);e.valueConnection_=o&&o.connection.targetConnection,e.statementConnection_=n&&n.connection.targetConnection,t++;break;case"controls_if_else":n=this.getInput("ELSE"),e.statementConnection_=n&&n.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}}},Blockly.Blocks.controls_if_if={init:function(){this.setColour(Blockly.Blocks.logic.HUE),this.appendDummyInput().appendField(Blockly.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Blockly.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Blockly.Blocks.controls_if_elseif={init:function(){this.setColour(Blockly.Blocks.logic.HUE),this.appendDummyInput().appendField(Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Blockly.Blocks.controls_if_else={init:function(){this.setColour(Blockly.Blocks.logic.HUE),this.appendDummyInput().appendField(Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Blockly.Blocks.logic_compare={init:function(){var e=Blockly.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setHelpUrl(Blockly.Msg.LOGIC_COMPARE_HELPURL),this.setColour(Blockly.Blocks.logic.HUE),this.setOutput(!0,"Boolean"),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Blockly.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip(function(){var e=t.getFieldValue("OP");return{EQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[e]})},onchange:function(){if(this.workspace){var e=this.getInputTargetBlock("A"),t=this.getInputTargetBlock("B");e&&!t?this.blockAPriority_=!1:!e&&t?this.blockAPriority_=!0:e&&t&&!e.outputConnection.checkType_(t.outputConnection)&&(e=this.blockAPriority_?t:e,e.setParent(null),e.bumpNeighbours_())}}},Blockly.Blocks.logic_operation={init:function(){var e=[[Blockly.Msg.LOGIC_OPERATION_AND,"AND"],[Blockly.Msg.LOGIC_OPERATION_OR,"OR"]];this.setHelpUrl(Blockly.Msg.LOGIC_OPERATION_HELPURL),this.setColour(Blockly.Blocks.logic.HUE),this.setOutput(!0,"Boolean"),this.appendValueInput("A").setCheck("Boolean"),this.appendValueInput("B").setCheck("Boolean").appendField(new Blockly.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip(function(){var e=t.getFieldValue("OP");return{AND:Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR}[e]})}},Blockly.Blocks.logic_negate={init:function(){this.setHelpUrl(Blockly.Msg.LOGIC_NEGATE_HELPURL),this.setColour(Blockly.Blocks.logic.HUE),this.setOutput(!0,"Boolean"),this.interpolateMsg(Blockly.Msg.LOGIC_NEGATE_TITLE,["BOOL","Boolean",Blockly.ALIGN_RIGHT],Blockly.ALIGN_RIGHT),this.setTooltip(Blockly.Msg.LOGIC_NEGATE_TOOLTIP)}},Blockly.Blocks.logic_boolean={init:function(){var e=[[Blockly.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Blockly.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setHelpUrl(Blockly.Msg.LOGIC_BOOLEAN_HELPURL),this.setColour(Blockly.Blocks.logic.HUE),this.setOutput(!0,"Boolean"),this.appendDummyInput().appendField(new Blockly.FieldDropdown(e),"BOOL"),this.setTooltip(Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Blockly.Blocks.logic_null={init:function(){this.setHelpUrl(Blockly.Msg.LOGIC_NULL_HELPURL),this.setColour(Blockly.Blocks.logic.HUE),this.setOutput(!0),this.appendDummyInput().appendField(Blockly.Msg.LOGIC_NULL),this.setTooltip(Blockly.Msg.LOGIC_NULL_TOOLTIP)}},Blockly.Blocks.logic_ternary={init:function(){this.setHelpUrl(Blockly.Msg.LOGIC_TERNARY_HELPURL),this.setColour(Blockly.Blocks.logic.HUE),this.appendValueInput("IF").setCheck("Boolean").appendField(Blockly.Msg.LOGIC_TERNARY_CONDITION),this.appendValueInput("THEN").appendField(Blockly.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("ELSE").appendField(Blockly.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setTooltip(Blockly.Msg.LOGIC_TERNARY_TOOLTIP)}},Blockly.Blocks.loops={},Blockly.Blocks.loops.HUE=120,Blockly.Blocks.controls_repeat={init:function(){this.setHelpUrl(Blockly.Msg.CONTROLS_REPEAT_HELPURL),this.setColour(Blockly.Blocks.loops.HUE),this.appendDummyInput().appendField(Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new Blockly.FieldTextInput("10",Blockly.FieldTextInput.nonnegativeIntegerValidator),"TIMES").appendField(Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Blockly.Msg.CONTROLS_REPEAT_TOOLTIP)}},Blockly.Blocks.controls_repeat_ext={init:function(){this.setHelpUrl(Blockly.Msg.CONTROLS_REPEAT_HELPURL),this.setColour(Blockly.Blocks.loops.HUE),this.interpolateMsg(Blockly.Msg.CONTROLS_REPEAT_TITLE,["TIMES","Number",Blockly.ALIGN_RIGHT],Blockly.ALIGN_RIGHT),this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Blockly.Msg.CONTROLS_REPEAT_TOOLTIP)}},Blockly.Blocks.controls_whileUntil={init:function(){var e=[[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]];this.setHelpUrl(Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL),this.setColour(Blockly.Blocks.loops.HUE),this.appendValueInput("BOOL").setCheck("Boolean").appendField(new Blockly.FieldDropdown(e),"MODE"),this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip(function(){var e=t.getFieldValue("MODE");return{WHILE:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]})}},Blockly.Blocks.controls_for={init:function(){this.setHelpUrl(Blockly.Msg.CONTROLS_FOR_HELPURL),this.setColour(Blockly.Blocks.loops.HUE),this.appendDummyInput().appendField(Blockly.Msg.CONTROLS_FOR_INPUT_WITH).appendField(new Blockly.FieldVariable(null),"VAR"),this.interpolateMsg(Blockly.Msg.CONTROLS_FOR_INPUT_FROM_TO_BY,["FROM","Number",Blockly.ALIGN_RIGHT],["TO","Number",Blockly.ALIGN_RIGHT],["BY","Number",Blockly.ALIGN_RIGHT],Blockly.ALIGN_RIGHT),this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOR_INPUT_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",e.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Blockly.Names.equals(e,this.getFieldValue("VAR"))&&this.setFieldValue(t,"VAR")},customContextMenu:function(e){if(!this.isCollapsed()){var t={enabled:!0},o=this.getFieldValue("VAR");t.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1",o),o=goog.dom.createDom("field",null,o),o.setAttribute("name","VAR"),o=goog.dom.createDom("block",null,o),o.setAttribute("type","variables_get"),t.callback=Blockly.ContextMenu.callbackFactory(this,o),e.push(t) }}},Blockly.Blocks.controls_forEach={init:function(){this.setHelpUrl(Blockly.Msg.CONTROLS_FOREACH_HELPURL),this.setColour(Blockly.Blocks.loops.HUE),this.appendValueInput("LIST").setCheck("Array").appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_ITEM).appendField(new Blockly.FieldVariable(null),"VAR").appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_INLIST),Blockly.Msg.CONTROLS_FOREACH_INPUT_INLIST_TAIL&&(this.appendDummyInput().appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_INLIST_TAIL),this.setInputsInline(!0)),this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOREACH_TOOLTIP.replace("%1",e.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Blockly.Names.equals(e,this.getFieldValue("VAR"))&&this.setFieldValue(t,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu},Blockly.Blocks.controls_flow_statements={init:function(){var e=[[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];this.setHelpUrl(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL),this.setColour(Blockly.Blocks.loops.HUE),this.appendDummyInput().appendField(new Blockly.FieldDropdown(e),"FLOW"),this.setPreviousStatement(!0);var t=this;this.setTooltip(function(){var e=t.getFieldValue("FLOW");return{BREAK:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[e]})},onchange:function(){if(this.workspace){var e=!1,t=this;do{if("controls_repeat"==t.type||"controls_repeat_ext"==t.type||"controls_forEach"==t.type||"controls_for"==t.type||"controls_whileUntil"==t.type){e=!0;break}t=t.getSurroundParent()}while(t);e?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)}}},Blockly.Blocks.math={},Blockly.Blocks.math.HUE=230,Blockly.Blocks.math_number={init:function(){this.setHelpUrl(Blockly.Msg.MATH_NUMBER_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.appendDummyInput().appendField(new Blockly.FieldTextInput("0",Blockly.FieldTextInput.numberValidator),"NUM"),this.setOutput(!0,"Number"),this.setTooltip(Blockly.Msg.MATH_NUMBER_TOOLTIP)}},Blockly.Blocks.math_arithmetic={init:function(){var e=[[Blockly.Msg.MATH_ADDITION_SYMBOL,"ADD"],[Blockly.Msg.MATH_SUBTRACTION_SYMBOL,"MINUS"],[Blockly.Msg.MATH_MULTIPLICATION_SYMBOL,"MULTIPLY"],[Blockly.Msg.MATH_DIVISION_SYMBOL,"DIVIDE"],[Blockly.Msg.MATH_POWER_SYMBOL,"POWER"]];this.setHelpUrl(Blockly.Msg.MATH_ARITHMETIC_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.setOutput(!0,"Number"),this.appendValueInput("A").setCheck("Number"),this.appendValueInput("B").setCheck("Number").appendField(new Blockly.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip(function(){var e=t.getFieldValue("OP");return{ADD:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]})}},Blockly.Blocks.math_single={init:function(){var e=[[Blockly.Msg.MATH_SINGLE_OP_ROOT,"ROOT"],[Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE,"ABS"],["-","NEG"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]];this.setHelpUrl(Blockly.Msg.MATH_SINGLE_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.setOutput(!0,"Number"),this.interpolateMsg("%1 %2",["OP",new Blockly.FieldDropdown(e)],["NUM","Number",Blockly.ALIGN_RIGHT],Blockly.ALIGN_RIGHT);var t=this;this.setTooltip(function(){var e=t.getFieldValue("OP");return{ROOT:Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT,ABS:Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS,NEG:Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG,LN:Blockly.Msg.MATH_SINGLE_TOOLTIP_LN,LOG10:Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10,EXP:Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP,POW10:Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10}[e]})}},Blockly.Blocks.math_trig={init:function(){var e=[[Blockly.Msg.MATH_TRIG_SIN,"SIN"],[Blockly.Msg.MATH_TRIG_COS,"COS"],[Blockly.Msg.MATH_TRIG_TAN,"TAN"],[Blockly.Msg.MATH_TRIG_ASIN,"ASIN"],[Blockly.Msg.MATH_TRIG_ACOS,"ACOS"],[Blockly.Msg.MATH_TRIG_ATAN,"ATAN"]];this.setHelpUrl(Blockly.Msg.MATH_TRIG_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.setOutput(!0,"Number"),this.appendValueInput("NUM").setCheck("Number").appendField(new Blockly.FieldDropdown(e),"OP");var t=this;this.setTooltip(function(){var e=t.getFieldValue("OP");return{SIN:Blockly.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Blockly.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Blockly.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN}[e]})}},Blockly.Blocks.math_constant={init:function(){this.setHelpUrl(Blockly.Msg.MATH_CONSTANT_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.setOutput(!0,"Number"),this.appendDummyInput().appendField(new Blockly.FieldDropdown([["π","PI"],["e","E"],["φ","GOLDEN_RATIO"],["sqrt(2)","SQRT2"],["sqrt(½)","SQRT1_2"],["∞","INFINITY"]]),"CONSTANT"),this.setTooltip(Blockly.Msg.MATH_CONSTANT_TOOLTIP)}},Blockly.Blocks.math_number_property={init:function(){var e=[[Blockly.Msg.MATH_IS_EVEN,"EVEN"],[Blockly.Msg.MATH_IS_ODD,"ODD"],[Blockly.Msg.MATH_IS_PRIME,"PRIME"],[Blockly.Msg.MATH_IS_WHOLE,"WHOLE"],[Blockly.Msg.MATH_IS_POSITIVE,"POSITIVE"],[Blockly.Msg.MATH_IS_NEGATIVE,"NEGATIVE"],[Blockly.Msg.MATH_IS_DIVISIBLE_BY,"DIVISIBLE_BY"]];this.setColour(Blockly.Blocks.math.HUE),this.appendValueInput("NUMBER_TO_CHECK").setCheck("Number"),e=new Blockly.FieldDropdown(e,function(e){this.sourceBlock_.updateShape_("DIVISIBLE_BY"==e)}),this.appendDummyInput().appendField(e,"PROPERTY"),this.setInputsInline(!0),this.setOutput(!0,"Boolean"),this.setTooltip(Blockly.Msg.MATH_IS_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation"),t="DIVISIBLE_BY"==this.getFieldValue("PROPERTY");return e.setAttribute("divisor_input",t),e},domToMutation:function(e){e="true"==e.getAttribute("divisor_input"),this.updateShape_(e)},updateShape_:function(e){var t=this.getInput("DIVISOR");e?t||this.appendValueInput("DIVISOR").setCheck("Number"):t&&this.removeInput("DIVISOR")}},Blockly.Blocks.math_change={init:function(){this.setHelpUrl(Blockly.Msg.MATH_CHANGE_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.interpolateMsg(Blockly.Msg.MATH_CHANGE_TITLE_CHANGE+" %1 "+Blockly.Msg.MATH_CHANGE_INPUT_BY+" %2",["VAR",new Blockly.FieldVariable(Blockly.Msg.MATH_CHANGE_TITLE_ITEM)],["DELTA","Number",Blockly.ALIGN_RIGHT],Blockly.ALIGN_RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip(function(){return Blockly.Msg.MATH_CHANGE_TOOLTIP.replace("%1",e.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Blockly.Names.equals(e,this.getFieldValue("VAR"))&&this.setFieldValue(t,"VAR")}},Blockly.Blocks.math_round={init:function(){var e=[[Blockly.Msg.MATH_ROUND_OPERATOR_ROUND,"ROUND"],[Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP,"ROUNDUP"],[Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN,"ROUNDDOWN"]];this.setHelpUrl(Blockly.Msg.MATH_ROUND_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.setOutput(!0,"Number"),this.appendValueInput("NUM").setCheck("Number").appendField(new Blockly.FieldDropdown(e),"OP"),this.setTooltip(Blockly.Msg.MATH_ROUND_TOOLTIP)}},Blockly.Blocks.math_on_list={init:function(){var e=[[Blockly.Msg.MATH_ONLIST_OPERATOR_SUM,"SUM"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MIN,"MIN"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MAX,"MAX"],[Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE,"AVERAGE"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN,"MEDIAN"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MODE,"MODE"],[Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV,"STD_DEV"],[Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM,"RANDOM"]],t=this;this.setHelpUrl(Blockly.Msg.MATH_ONLIST_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.setOutput(!0,"Number"),e=new Blockly.FieldDropdown(e,function(e){"MODE"==e?t.outputConnection.setCheck("Array"):t.outputConnection.setCheck("Number")}),this.appendValueInput("LIST").setCheck("Array").appendField(e,"OP"),this.setTooltip(function(){var e=t.getFieldValue("OP");return{SUM:Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM,MIN:Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN,MAX:Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX,AVERAGE:Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE,MEDIAN:Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN,MODE:Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE,STD_DEV:Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV,RANDOM:Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM}[e]})}},Blockly.Blocks.math_modulo={init:function(){this.setHelpUrl(Blockly.Msg.MATH_MODULO_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.setOutput(!0,"Number"),this.interpolateMsg(Blockly.Msg.MATH_MODULO_TITLE,["DIVIDEND","Number",Blockly.ALIGN_RIGHT],["DIVISOR","Number",Blockly.ALIGN_RIGHT],Blockly.ALIGN_RIGHT),this.setInputsInline(!0),this.setTooltip(Blockly.Msg.MATH_MODULO_TOOLTIP)}},Blockly.Blocks.math_constrain={init:function(){this.setHelpUrl(Blockly.Msg.MATH_CONSTRAIN_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.setOutput(!0,"Number"),this.interpolateMsg(Blockly.Msg.MATH_CONSTRAIN_TITLE,["VALUE","Number",Blockly.ALIGN_RIGHT],["LOW","Number",Blockly.ALIGN_RIGHT],["HIGH","Number",Blockly.ALIGN_RIGHT],Blockly.ALIGN_RIGHT),this.setInputsInline(!0),this.setTooltip(Blockly.Msg.MATH_CONSTRAIN_TOOLTIP)}},Blockly.Blocks.math_random_int={init:function(){this.setHelpUrl(Blockly.Msg.MATH_RANDOM_INT_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.setOutput(!0,"Number"),this.interpolateMsg(Blockly.Msg.MATH_RANDOM_INT_TITLE,["FROM","Number",Blockly.ALIGN_RIGHT],["TO","Number",Blockly.ALIGN_RIGHT],Blockly.ALIGN_RIGHT),this.setInputsInline(!0),this.setTooltip(Blockly.Msg.MATH_RANDOM_INT_TOOLTIP)}},Blockly.Blocks.math_random_float={init:function(){this.setHelpUrl(Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL),this.setColour(Blockly.Blocks.math.HUE),this.setOutput(!0,"Number"),this.appendDummyInput().appendField(Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM),this.setTooltip(Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP)}},Blockly.Blocks.procedures={},Blockly.Blocks.procedures.HUE=290,Blockly.Blocks.procedures_defnoreturn={init:function(){this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.setColour(Blockly.Blocks.procedures.HUE);var e=Blockly.Procedures.findLegalName(Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,this);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(new Blockly.FieldTextInput(e,Blockly.Procedures.rename),"NAME").appendField("","PARAMS"),this.setMutator(new Blockly.Mutator(["procedures_mutatorarg"])),this.setTooltip(Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.arguments_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(e){this.hasStatements_!==e&&(e?(this.appendStatementInput("STACK").appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=e)},updateParams_:function(){for(var e=!1,t={},o=0;o=0;n--){var i=this.getInput("ARG"+n);if(i){var r=i.connection.targetConnection;this.quarkConnections_[this.quarkArguments_[n]]=r,this.removeInput("ARG"+n)}}for(this.arguments_=[].concat(e),this.quarkArguments_=t,n=0;n,.?\/]/g,"_"),-1!="0123456789".indexOf(e[0])&&(e="_"+e)):e="unnamed",e},function(){var e=this,t=e._,o={},n=Array.prototype,i=Object.prototype,r=Function.prototype,s=n.push,l=n.slice,a=n.concat,c=i.toString,g=i.hasOwnProperty,u=n.forEach,h=n.map,d=n.reduce,p=n.reduceRight,f=n.filter,m=n.every,y=n.some,_=n.indexOf,E=n.lastIndexOf,v=Array.isArray,C=Object.keys,B=r.bind,k=function(e){return e instanceof k?e:this instanceof k?(this._wrapped=e,void 0):new k(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=k),exports._=k):e._=k,k.VERSION="1.5.2";var b=k.each=k.forEach=function(e,t,n){if(null!=e)if(u&&e.forEach===u)e.forEach(t,n);else if(e.length===+e.length){for(var i=0,r=e.length;r>i;i++)if(t.call(n,e[i],i,e)===o)return}else for(var s=k.keys(e),i=0,r=s.length;r>i;i++)if(t.call(n,e[s[i]],s[i],e)===o)return};k.map=k.collect=function(e,t,o){var n=[];return null==e?n:h&&e.map===h?e.map(t,o):(b(e,function(e,i,r){n.push(t.call(o,e,i,r))}),n)};var A="Reduce of empty array with no initial value";k.reduce=k.foldl=k.inject=function(e,t,o,n){var i=arguments.length>2;if(null==e&&(e=[]),d&&e.reduce===d)return n&&(t=k.bind(t,n)),i?e.reduce(t,o):e.reduce(t);if(b(e,function(e,r,s){i?o=t.call(n,o,e,r,s):(o=e,i=!0)}),!i)throw new TypeError(A);return o},k.reduceRight=k.foldr=function(e,t,o,n){var i=arguments.length>2;if(null==e&&(e=[]),p&&e.reduceRight===p)return n&&(t=k.bind(t,n)),i?e.reduceRight(t,o):e.reduceRight(t);var r=e.length;if(r!==+r){var s=k.keys(e);r=s.length}if(b(e,function(l,a,c){a=s?s[--r]:--r,i?o=t.call(n,o,e[a],a,c):(o=e[a],i=!0)}),!i)throw new TypeError(A);return o},k.find=k.detect=function(e,t,o){var n;return T(e,function(e,i,r){return t.call(o,e,i,r)?(n=e,!0):void 0}),n},k.filter=k.select=function(e,t,o){var n=[];return null==e?n:f&&e.filter===f?e.filter(t,o):(b(e,function(e,i,r){t.call(o,e,i,r)&&n.push(e)}),n)},k.reject=function(e,t,o){return k.filter(e,function(e,n,i){return!t.call(o,e,n,i)},o)},k.every=k.all=function(e,t,n){t||(t=k.identity);var i=!0;return null==e?i:m&&e.every===m?e.every(t,n):(b(e,function(e,r,s){return(i=i&&t.call(n,e,r,s))?void 0:o}),!!i)};var T=k.some=k.any=function(e,t,n){t||(t=k.identity);var i=!1;return null==e?i:y&&e.some===y?e.some(t,n):(b(e,function(e,r,s){return i||(i=t.call(n,e,r,s))?o:void 0}),!!i)};k.contains=k.include=function(e,t){return null==e?!1:_&&e.indexOf===_?-1!=e.indexOf(t):T(e,function(e){return e===t})},k.invoke=function(e,t){var o=l.call(arguments,2),n=k.isFunction(t);return k.map(e,function(e){return(n?t:e[t]).apply(e,o)})},k.pluck=function(e,t){return k.map(e,function(e){return e[t]})},k.where=function(e,t,o){return k.isEmpty(t)?o?void 0:[]:k[o?"find":"filter"](e,function(e){for(var o in t)if(t[o]!==e[o])return!1;return!0})},k.findWhere=function(e,t){return k.where(e,t,!0)},k.max=function(e,t,o){if(!t&&k.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&k.isEmpty(e))return-1/0;var n={computed:-1/0,value:-1/0};return b(e,function(e,i,r){var s=t?t.call(o,e,i,r):e;s>n.computed&&(n={value:e,computed:s})}),n.value},k.min=function(e,t,o){if(!t&&k.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&k.isEmpty(e))return 1/0;var n={computed:1/0,value:1/0};return b(e,function(e,i,r){var s=t?t.call(o,e,i,r):e;sn||void 0===o)return 1;if(n>o||void 0===n)return-1}return e.index-t.index}),"value")};var R=function(e){return function(t,o,n){var i={},r=null==o?k.identity:S(o);return b(t,function(o,s){var l=r.call(n,o,s,t);e(i,l,o)}),i}};k.groupBy=R(function(e,t,o){(k.has(e,t)?e[t]:e[t]=[]).push(o)}),k.indexBy=R(function(e,t,o){e[t]=o}),k.countBy=R(function(e,t){k.has(e,t)?e[t]++:e[t]=1}),k.sortedIndex=function(e,t,o,n){o=null==o?k.identity:S(o);for(var i=o.call(n,t),r=0,s=e.length;s>r;){var l=r+s>>>1;o.call(n,e[l])=0})})},k.difference=function(e){var t=a.apply(n,l.call(arguments,1));return k.filter(e,function(e){return!k.contains(t,e)})},k.zip=function(){for(var e=k.max(k.pluck(arguments,"length").concat(0)),t=new Array(e),o=0;e>o;o++)t[o]=k.pluck(arguments,""+o);return t},k.object=function(e,t){if(null==e)return{};for(var o={},n=0,i=e.length;i>n;n++)t?o[e[n]]=t[n]:o[e[n][0]]=e[n][1];return o},k.indexOf=function(e,t,o){if(null==e)return-1;var n=0,i=e.length;if(o){if("number"!=typeof o)return n=k.sortedIndex(e,t),e[n]===t?n:-1;n=0>o?Math.max(0,i+o):o}if(_&&e.indexOf===_)return e.indexOf(t,o);for(;i>n;n++)if(e[n]===t)return n;return-1},k.lastIndexOf=function(e,t,o){if(null==e)return-1;var n=null!=o;if(E&&e.lastIndexOf===E)return n?e.lastIndexOf(t,o):e.lastIndexOf(t);for(var i=n?o:e.length;i--;)if(e[i]===t)return i;return-1},k.range=function(e,t,o){arguments.length<=1&&(t=e||0,e=0),o=arguments[2]||1;for(var n=Math.max(Math.ceil((t-e)/o),0),i=0,r=new Array(n);n>i;)r[i++]=e,e+=o;return r};var D=function(){};k.bind=function(e,t){var o,n;if(B&&e.bind===B)return B.apply(e,l.call(arguments,1));if(!k.isFunction(e))throw new TypeError;return o=l.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,o.concat(l.call(arguments)));D.prototype=e.prototype;var i=new D;D.prototype=null;var r=e.apply(i,o.concat(l.call(arguments)));return Object(r)===r?r:i}},k.partial=function(e){var t=l.call(arguments,1);return function(){return e.apply(this,t.concat(l.call(arguments)))}},k.bindAll=function(e){var t=l.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return b(t,function(t){e[t]=k.bind(e[t],e)}),e},k.memoize=function(e,t){var o={};return t||(t=k.identity),function(){var n=t.apply(this,arguments);return k.has(o,n)?o[n]:o[n]=e.apply(this,arguments)}},k.delay=function(e,t){var o=l.call(arguments,2);return setTimeout(function(){return e.apply(null,o)},t)},k.defer=function(e){return k.delay.apply(k,[e,1].concat(l.call(arguments,1)))},k.throttle=function(e,t,o){var n,i,r,s=null,l=0;o||(o={});var a=function(){l=o.leading===!1?0:new Date,s=null,r=e.apply(n,i)};return function(){var c=new Date;l||o.leading!==!1||(l=c);var g=t-(c-l);return n=this,i=arguments,0>=g?(clearTimeout(s),s=null,l=c,r=e.apply(n,i)):s||o.trailing===!1||(s=setTimeout(a,g)),r}},k.debounce=function(e,t,o){var n,i,r,s,l;return function(){r=this,i=arguments,s=new Date;var a=function(){var c=new Date-s;t>c?n=setTimeout(a,t-c):(n=null,o||(l=e.apply(r,i)))},c=o&&!n;return n||(n=setTimeout(a,t)),c&&(l=e.apply(r,i)),l}},k.once=function(e){var t,o=!1;return function(){return o?t:(o=!0,t=e.apply(this,arguments),e=null,t)}},k.wrap=function(e,t){return function(){var o=[e];return s.apply(o,arguments),t.apply(this,o)}},k.compose=function(){var e=arguments;return function(){for(var t=arguments,o=e.length-1;o>=0;o--)t=[e[o].apply(this,t)];return t[0]}},k.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},k.keys=C||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var o in e)k.has(e,o)&&t.push(o);return t},k.values=function(e){for(var t=k.keys(e),o=t.length,n=new Array(o),i=0;o>i;i++)n[i]=e[t[i]];return n},k.pairs=function(e){for(var t=k.keys(e),o=t.length,n=new Array(o),i=0;o>i;i++)n[i]=[t[i],e[t[i]]];return n},k.invert=function(e){for(var t={},o=k.keys(e),n=0,i=o.length;i>n;n++)t[e[o[n]]]=o[n];return t},k.functions=k.methods=function(e){var t=[];for(var o in e)k.isFunction(e[o])&&t.push(o);return t.sort()},k.extend=function(e){return b(l.call(arguments,1),function(t){if(t)for(var o in t)e[o]=t[o]}),e},k.pick=function(e){var t={},o=a.apply(n,l.call(arguments,1));return b(o,function(o){o in e&&(t[o]=e[o])}),t},k.omit=function(e){var t={},o=a.apply(n,l.call(arguments,1));for(var i in e)k.contains(o,i)||(t[i]=e[i]);return t},k.defaults=function(e){return b(l.call(arguments,1),function(t){if(t)for(var o in t)void 0===e[o]&&(e[o]=t[o])}),e},k.clone=function(e){return k.isObject(e)?k.isArray(e)?e.slice():k.extend({},e):e},k.tap=function(e,t){return t(e),e};var w=function(e,t,o,n){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof k&&(e=e._wrapped),t instanceof k&&(t=t._wrapped);var i=c.call(e);if(i!=c.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;for(var r=o.length;r--;)if(o[r]==e)return n[r]==t;var s=e.constructor,l=t.constructor;if(s!==l&&!(k.isFunction(s)&&s instanceof s&&k.isFunction(l)&&l instanceof l))return!1;o.push(e),n.push(t);var a=0,g=!0;if("[object Array]"==i){if(a=e.length,g=a==t.length)for(;a--&&(g=w(e[a],t[a],o,n)););}else{for(var u in e)if(k.has(e,u)&&(a++,!(g=k.has(t,u)&&w(e[u],t[u],o,n))))break;if(g){for(u in t)if(k.has(t,u)&&!a--)break;g=!a}}return o.pop(),n.pop(),g};k.isEqual=function(e,t){return w(e,t,[],[])},k.isEmpty=function(e){if(null==e)return!0;if(k.isArray(e)||k.isString(e))return 0===e.length;for(var t in e)if(k.has(e,t))return!1;return!0},k.isElement=function(e){return!(!e||1!==e.nodeType)},k.isArray=v||function(e){return"[object Array]"==c.call(e)},k.isObject=function(e){return e===Object(e)},b(["Arguments","Function","String","Number","Date","RegExp"],function(e){k["is"+e]=function(t){return c.call(t)=="[object "+e+"]"}}),k.isArguments(arguments)||(k.isArguments=function(e){return!(!e||!k.has(e,"callee"))}),"function"!=typeof/./&&(k.isFunction=function(e){return"function"==typeof e}),k.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},k.isNaN=function(e){return k.isNumber(e)&&e!=+e},k.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==c.call(e)},k.isNull=function(e){return null===e},k.isUndefined=function(e){return void 0===e},k.has=function(e,t){return g.call(e,t)},k.noConflict=function(){return e._=t,this},k.identity=function(e){return e},k.times=function(e,t,o){for(var n=Array(Math.max(0,e)),i=0;e>i;i++)n[i]=t.call(o,i);return n},k.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var L={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};L.unescape=k.invert(L.escape);var F={escape:new RegExp("["+k.keys(L.escape).join("")+"]","g"),unescape:new RegExp("("+k.keys(L.unescape).join("|")+")","g")};k.each(["escape","unescape"],function(e){k[e]=function(t){return null==t?"":(""+t).replace(F[e],function(t){return L[e][t]})}}),k.result=function(e,t){if(null==e)return void 0;var o=e[t];return k.isFunction(o)?o.call(e):o},k.mixin=function(e){b(k.functions(e),function(t){var o=k[t]=e[t];k.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),P.call(this,o.apply(k,e))}})};var O=0;k.uniqueId=function(e){var t=++O+"";return e?e+t:t},k.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var N=/(.)^/,M={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},x=/\\|'|\r|\n|\t|\u2028|\u2029/g;k.template=function(e,t,o){var n;o=k.defaults({},o,k.templateSettings);var i=new RegExp([(o.escape||N).source,(o.interpolate||N).source,(o.evaluate||N).source].join("|")+"|$","g"),r=0,s="__p+='";e.replace(i,function(t,o,n,i,l){return s+=e.slice(r,l).replace(x,function(e){return"\\"+M[e]}),o&&(s+="'+\n((__t=("+o+"))==null?'':_.escape(__t))+\n'"),n&&(s+="'+\n((__t=("+n+"))==null?'':__t)+\n'"),i&&(s+="';\n"+i+"\n__p+='"),r=l+t.length,t}),s+="';\n",o.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{n=new Function(o.variable||"obj","_",s)}catch(l){throw l.source=s,l}if(t)return n(t,k);var a=function(e){return n.call(this,e,k)};return a.source="function("+(o.variable||"obj")+"){\n"+s+"}",a},k.chain=function(e){return k(e).chain()};var P=function(e){return this._chain?k(e).chain():e};k.mixin(k),b(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=n[e];k.prototype[e]=function(){var o=this._wrapped;return t.apply(o,arguments),"shift"!=e&&"splice"!=e||0!==o.length||delete o[0],P.call(this,o)}}),b(["concat","join","slice"],function(e){var t=n[e];k.prototype[e]=function(){return P.call(this,t.apply(this._wrapped,arguments))}}),k.extend(k.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),function(){{var e,t=this,o=t.Backbone,n=[],i=(n.push,n.slice);n.splice}e="undefined"!=typeof exports?exports:t.Backbone={},e.VERSION="1.1.0";var r=t._;r||"undefined"==typeof require||(r=require("underscore")),e.$=t.jQuery||t.Zepto||t.ender||t.$,e.noConflict=function(){return t.Backbone=o,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s=e.Events={on:function(e,t,o){if(!a(this,"on",e,[t,o])||!t)return this;this._events||(this._events={});var n=this._events[e]||(this._events[e]=[]);return n.push({callback:t,context:o,ctx:o||this}),this},once:function(e,t,o){if(!a(this,"once",e,[t,o])||!t)return this;var n=this,i=r.once(function(){n.off(e,i),t.apply(this,arguments)});return i._callback=t,this.on(e,i,o)},off:function(e,t,o){var n,i,s,l,c,g,u,h;if(!this._events||!a(this,"off",e,[t,o]))return this;if(!e&&!t&&!o)return this._events={},this;for(l=e?[e]:r.keys(this._events),c=0,g=l.length;g>c;c++)if(e=l[c],s=this._events[e]){if(this._events[e]=n=[],t||o)for(u=0,h=s.length;h>u;u++)i=s[u],(t&&t!==i.callback&&t!==i.callback._callback||o&&o!==i.context)&&n.push(i);n.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this;var t=i.call(arguments,1);if(!a(this,"trigger",e,t))return this;var o=this._events[e],n=this._events.all;return o&&c(o,t),n&&c(n,arguments),this},stopListening:function(e,t,o){var n=this._listeningTo;if(!n)return this;var i=!t&&!o;o||"object"!=typeof t||(o=this),e&&((n={})[e._listenId]=e);for(var s in n)e=n[s],e.off(t,o,this),(i||r.isEmpty(e._events))&&delete this._listeningTo[s];return this}},l=/\s+/,a=function(e,t,o,n){if(!o)return!0;if("object"==typeof o){for(var i in o)e[t].apply(e,[i,o[i]].concat(n));return!1}if(l.test(o)){for(var r=o.split(l),s=0,a=r.length;a>s;s++)e[t].apply(e,[r[s]].concat(n));return!1}return!0},c=function(e,t){var o,n=-1,i=e.length,r=t[0],s=t[1],l=t[2];switch(t.length){case 0:for(;++nh;h++)this.trigger("change:"+l[h],this,u[l[h]],o)}if(c)return this;if(!a)for(;this._pending;)this._pending=!1,this.trigger("change",this,o);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,r.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var o in this.attributes)t[o]=void 0;return this.set(t,r.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!r.isEmpty(this.changed):r.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?r.clone(this.changed):!1;var t,o=!1,n=this._changing?this._previousAttributes:this.attributes;for(var i in e)r.isEqual(n[i],t=e[i])||((o||(o={}))[i]=t);return o},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return r.clone(this._previousAttributes)},fetch:function(e){e=e?r.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,o=e.success;return e.success=function(n){return t.set(t.parse(n,e),e)?(o&&o(t,n,e),t.trigger("sync",t,n,e),void 0):!1},M(this,e),this.sync("read",this,e)},save:function(e,t,o){var n,i,s,l=this.attributes;if(null==e||"object"==typeof e?(n=e,o=t):(n={})[e]=t,o=r.extend({validate:!0},o),n&&!o.wait){if(!this.set(n,o))return!1}else if(!this._validate(n,o))return!1;n&&o.wait&&(this.attributes=r.extend({},l,n)),void 0===o.parse&&(o.parse=!0);var a=this,c=o.success;return o.success=function(e){a.attributes=l;var t=a.parse(e,o);return o.wait&&(t=r.extend(n||{},t)),r.isObject(t)&&!a.set(t,o)?!1:(c&&c(a,e,o),a.trigger("sync",a,e,o),void 0)},M(this,o),i=this.isNew()?"create":o.patch?"patch":"update","patch"===i&&(o.attrs=n),s=this.sync(i,this,o),n&&o.wait&&(this.attributes=l),s},destroy:function(e){e=e?r.clone(e):{};var t=this,o=e.success,n=function(){t.trigger("destroy",t,t.collection,e)};if(e.success=function(i){(e.wait||t.isNew())&&n(),o&&o(t,i,e),t.isNew()||t.trigger("sync",t,i,e)},this.isNew())return e.success(),!1;M(this,e);var i=this.sync("delete",this,e);return e.wait||n(),i},url:function(){var e=r.result(this,"urlRoot")||r.result(this.collection,"url")||N();return this.isNew()?e:e+("/"===e.charAt(e.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(e){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(e){return this._validate({},r.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=r.extend({},this.attributes,e);var o=this.validationError=this.validate(e,t)||null;return o?(this.trigger("invalid",this,o,r.extend(t,{validationError:o})),!1):!0}});var h=["keys","values","pairs","invert","pick","omit"];r.each(h,function(e){u.prototype[e]=function(){var t=i.call(arguments);return t.unshift(this.attributes),r[e].apply(r,t)}});var d=e.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,r.extend({silent:!0},t))},p={add:!0,remove:!0,merge:!0},f={add:!0,remove:!1};r.extend(d.prototype,s,{model:u,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return e.sync.apply(this,arguments)},add:function(e,t){return this.set(e,r.extend({merge:!1},t,f))},remove:function(e,t){var o=!r.isArray(e);e=o?[e]:r.clone(e),t||(t={});var n,i,s,l;for(n=0,i=e.length;i>n;n++)l=e[n]=this.get(e[n]),l&&(delete this._byId[l.id],delete this._byId[l.cid],s=this.indexOf(l),this.models.splice(s,1),this.length--,t.silent||(t.index=s,l.trigger("remove",l,this,t)),this._removeReference(l));return o?e[0]:e},set:function(e,t){t=r.defaults({},t,p),t.parse&&(e=this.parse(e,t));var o=!r.isArray(e);e=o?e?[e]:[]:r.clone(e);var n,i,s,l,a,c,g,h=t.at,d=this.model,f=this.comparator&&null==h&&t.sort!==!1,m=r.isString(this.comparator)?this.comparator:null,y=[],_=[],E={},v=t.add,C=t.merge,B=t.remove,k=!f&&v&&B?[]:!1;for(n=0,i=e.length;i>n;n++){if(a=e[n],s=a instanceof u?l=a:a[d.prototype.idAttribute],c=this.get(s))B&&(E[c.cid]=!0),C&&(a=a===l?l.attributes:a,t.parse&&(a=c.parse(a,t)),c.set(a,t),f&&!g&&c.hasChanged(m)&&(g=!0)),e[n]=c;else if(v){if(l=e[n]=this._prepareModel(a,t),!l)continue;y.push(l),l.on("all",this._onModelEvent,this),this._byId[l.cid]=l,null!=l.id&&(this._byId[l.id]=l)}k&&k.push(c||l)}if(B){for(n=0,i=this.length;i>n;++n)E[(l=this.models[n]).cid]||_.push(l);_.length&&this.remove(_,t)}if(y.length||k&&k.length)if(f&&(g=!0),this.length+=y.length,null!=h)for(n=0,i=y.length;i>n;n++)this.models.splice(h+n,0,y[n]);else{k&&(this.models.length=0);var b=k||y;for(n=0,i=b.length;i>n;n++)this.models.push(b[n])}if(g&&this.sort({silent:!0}),!t.silent){for(n=0,i=y.length;i>n;n++)(l=y[n]).trigger("add",l,this,t);(g||k&&k.length)&&this.trigger("sort",this,t)}return o?e[0]:e},reset:function(e,t){t||(t={});for(var o=0,n=this.models.length;n>o;o++)this._removeReference(this.models[o]);return t.previousModels=this.models,this._reset(),e=this.add(e,r.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,r.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return this.add(e,r.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(){return i.apply(this.models,arguments)},get:function(e){return null==e?void 0:this._byId[e.id]||this._byId[e.cid]||this._byId[e]},at:function(e){return this.models[e]},where:function(e,t){return r.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var o in e)if(e[o]!==t.get(o))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),r.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(r.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return r.invoke(this.models,"get",e)},fetch:function(e){e=e?r.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=e.success,o=this;return e.success=function(n){var i=e.reset?"reset":"set";o[i](n,e),t&&t(o,n,e),o.trigger("sync",o,n,e)},M(this,e),this.sync("read",this,e)},create:function(e,t){if(t=t?r.clone(t):{},!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var o=this,n=t.success;return t.success=function(e,t,i){i.wait&&o.add(e,i),n&&n(e,t,i)},e.save(null,t),e},parse:function(e){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof u)return e.collection||(e.collection=this),e;t=t?r.clone(t):{},t.collection=this;var o=new this.model(e,t);return o.validationError?(this.trigger("invalid",this,o.validationError,t),!1):o},_removeReference:function(e){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,o,n){("add"!==e&&"remove"!==e||o===this)&&("destroy"===e&&this.remove(t,n),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],null!=t.id&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments))}});var m=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain"];r.each(m,function(e){d.prototype[e]=function(){var t=i.call(arguments);return t.unshift(this.models),r[e].apply(r,t)}});var y=["groupBy","countBy","sortBy"];r.each(y,function(e){d.prototype[e]=function(t,o){var n=r.isFunction(t)?t:function(e){return e.get(t)};return r[e](this.models,n,o)}});var _=e.View=function(e){this.cid=r.uniqueId("view"),e||(e={}),r.extend(this,r.pick(e,v)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},E=/^(\S+)\s*(.*)$/,v=["model","collection","el","id","attributes","className","tagName","events"];r.extend(_.prototype,s,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(t,o){return this.$el&&this.undelegateEvents(),this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0],o!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=r.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var o=e[t];if(r.isFunction(o)||(o=this[e[t]]),o){var n=t.match(E),i=n[1],s=n[2];o=r.bind(o,this),i+=".delegateEvents"+this.cid,""===s?this.$el.on(i,o):this.$el.on(i,s,o)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(r.result(this,"el"),!1);else{var t=r.extend({},r.result(this,"attributes"));this.id&&(t.id=r.result(this,"id")),this.className&&(t["class"]=r.result(this,"className"));var o=e.$("<"+r.result(this,"tagName")+">").attr(t);this.setElement(o,!1)}}}),e.sync=function(t,o,n){var i=B[t];r.defaults(n||(n={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var s={type:i,dataType:"json"};if(n.url||(s.url=r.result(o,"url")||N()),null!=n.data||!o||"create"!==t&&"update"!==t&&"patch"!==t||(s.contentType="application/json",s.data=JSON.stringify(n.attrs||o.toJSON(n))),n.emulateJSON&&(s.contentType="application/x-www-form-urlencoded",s.data=s.data?{model:s.data}:{}),n.emulateHTTP&&("PUT"===i||"DELETE"===i||"PATCH"===i)){s.type="POST",n.emulateJSON&&(s.data._method=i);var l=n.beforeSend;n.beforeSend=function(e){return e.setRequestHeader("X-HTTP-Method-Override",i),l?l.apply(this,arguments):void 0}}"GET"===s.type||n.emulateJSON||(s.processData=!1),"PATCH"===s.type&&C&&(s.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var a=n.xhr=e.ajax(r.extend(s,n));return o.trigger("request",o,a,n),a};var C=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),B={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var k=e.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},b=/\((.*?)\)/g,A=/(\(\?)?:\w+/g,T=/\*\w+/g,S=/[\-{}\[\]+?.,\\\^$|#\s]/g;r.extend(k.prototype,s,{initialize:function(){},route:function(t,o,n){r.isRegExp(t)||(t=this._routeToRegExp(t)),r.isFunction(o)&&(n=o,o=""),n||(n=this[o]);var i=this; return e.history.route(t,function(r){var s=i._extractParameters(t,r);n&&n.apply(i,s),i.trigger.apply(i,["route:"+o].concat(s)),i.trigger("route",o,s),e.history.trigger("route",i,o,s)}),this},navigate:function(t,o){return e.history.navigate(t,o),this},_bindRoutes:function(){if(this.routes){this.routes=r.result(this,"routes");for(var e,t=r.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(S,"\\$&").replace(b,"(?:$1)?").replace(A,function(e,t){return t?e:"([^/]+)"}).replace(T,"(.*?)"),new RegExp("^"+e+"$")},_extractParameters:function(e,t){var o=e.exec(t).slice(1);return r.map(o,function(e){return e?decodeURIComponent(e):null})}});var R=e.History=function(){this.handlers=[],r.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},I=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,w=/msie [\w.]+/,L=/\/$/,F=/[?#].*$/;R.started=!1,r.extend(R.prototype,s,{interval:50,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=this.location.pathname;var o=this.root.replace(L,"");e.indexOf(o)||(e=e.slice(o.length))}else e=this.getHash();return e.replace(I,"")},start:function(t){if(R.started)throw new Error("Backbone.history has already been started");R.started=!0,this.options=r.extend({root:"/"},this.options,t),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 o=this.getFragment(),n=document.documentMode,i=w.exec(navigator.userAgent.toLowerCase())&&(!n||7>=n);this.root=("/"+this.root+"/").replace(D,"/"),i&&this._wantsHashChange&&(this.iframe=e.$('