all-extern.js 1.2 MB

12345678910111213141516171819202122232425262728293031323334353637
  1. !function(t,e){function i(t){var e=t.length,i=oe.type(t);return oe.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===i||"function"!==i&&(0===e||"number"==typeof e&&e>0&&e-1 in t)}function n(t){var e=fe[t]={};return oe.each(t.match(ae)||[],function(t,i){e[i]=!0}),e}function r(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=oe.expando+Math.random()}function o(t,i,n){var r;if(n===e&&1===t.nodeType)if(r="data-"+i.replace(ye,"-$1").toLowerCase(),n=t.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:ve.test(n)?JSON.parse(n):n}catch(o){}me.set(t,i,n)}else n=e;return n}function s(){return!0}function a(){return!1}function l(){try{return G.activeElement}catch(t){}}function h(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function c(t,e,i){if(oe.isFunction(e))return oe.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return oe.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(Ce.test(e))return oe.filter(e,t,i);e=oe.filter(e,t)}return oe.grep(t,function(t){return ee.call(e,t)>=0!==i})}function u(t,e){return oe.nodeName(t,"table")&&oe.nodeName(1===e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function d(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function p(t){var e=Be.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function f(t,e){for(var i=t.length,n=0;i>n;n++)ge.set(t[n],"globalEval",!e||ge.get(e[n],"globalEval"))}function m(t,e){var i,n,r,o,s,a,l,h;if(1===e.nodeType){if(ge.hasData(t)&&(o=ge.access(t),s=ge.set(e,o),h=o.events)){delete s.handle,s.events={};for(r in h)for(i=0,n=h[r].length;n>i;i++)oe.event.add(e,r,h[r][i])}me.hasData(t)&&(a=me.access(t),l=oe.extend({},a),me.set(e,l))}}function g(t,i){var n=t.getElementsByTagName?t.getElementsByTagName(i||"*"):t.querySelectorAll?t.querySelectorAll(i||"*"):[];return i===e||i&&oe.nodeName(t,i)?oe.merge([t],n):n}function v(t,e){var i=e.nodeName.toLowerCase();"input"===i&&Fe.test(t.type)?e.checked=t.checked:("input"===i||"textarea"===i)&&(e.defaultValue=t.defaultValue)}function y(t,e){if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),n=e,r=Qe.length;r--;)if(e=Qe[r]+i,e in t)return e;return n}function E(t,e){return t=e||t,"none"===oe.css(t,"display")||!oe.contains(t.ownerDocument,t)}function b(e){return t.getComputedStyle(e,null)}function _(t,e){for(var i,n,r,o=[],s=0,a=t.length;a>s;s++)n=t[s],n.style&&(o[s]=ge.get(n,"olddisplay"),i=n.style.display,e?(o[s]||"none"!==i||(n.style.display=""),""===n.style.display&&E(n)&&(o[s]=ge.access(n,"olddisplay",R(n.nodeName)))):o[s]||(r=E(n),(i&&"none"!==i||!r)&&ge.set(n,"olddisplay",r?i:oe.css(n,"display"))));for(s=0;a>s;s++)n=t[s],n.style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?o[s]||"":"none"));return t}function T(t,e,i){var n=Xe.exec(e);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):e}function x(t,e,i,n,r){for(var o=i===(n?"border":"content")?4:"width"===e?1:0,s=0;4>o;o+=2)"margin"===i&&(s+=oe.css(t,i+Je[o],!0,r)),n?("content"===i&&(s-=oe.css(t,"padding"+Je[o],!0,r)),"margin"!==i&&(s-=oe.css(t,"border"+Je[o]+"Width",!0,r))):(s+=oe.css(t,"padding"+Je[o],!0,r),"padding"!==i&&(s+=oe.css(t,"border"+Je[o]+"Width",!0,r)));return s}function w(t,e,i){var n=!0,r="width"===e?t.offsetWidth:t.offsetHeight,o=b(t),s=oe.support.boxSizing&&"border-box"===oe.css(t,"boxSizing",!1,o);if(0>=r||null==r){if(r=Ve(t,e,o),(0>r||null==r)&&(r=t.style[e]),Ze.test(r))return r;n=s&&(oe.support.boxSizingReliable||r===t.style[e]),r=parseFloat(r)||0}return r+x(t,e,i||(s?"border":"content"),n,o)+"px"}function R(t){var e=G,i=qe[t];return i||(i=S(t,e),"none"!==i&&i||(je=(je||oe("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(e.documentElement),e=(je[0].contentWindow||je[0].contentDocument).document,e.write("<!doctype html><html><body>"),e.close(),i=S(t,e),je.detach()),qe[t]=i),i}function S(t,e){var i=oe(e.createElement(t)).appendTo(e.body),n=oe.css(i[0],"display");return i.remove(),n}function M(t,e,i,n){var r;if(oe.isArray(e))oe.each(e,function(e,r){i||ei.test(t)?n(t,r):M(t+"["+("object"==typeof r?e:"")+"]",r,i,n)});else if(i||"object"!==oe.type(e))n(t,e);else for(r in e)M(t+"["+r+"]",e[r],i,n)}function C(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,r=0,o=e.toLowerCase().match(ae)||[];if(oe.isFunction(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function H(t,i,n,r){function o(l){var h;return s[l]=!0,oe.each(t[l]||[],function(t,l){var c=l(i,n,r);return"string"!=typeof c||a||s[c]?a?!(h=c):e:(i.dataTypes.unshift(c),o(c),!1)}),h}var s={},a=t===yi;return o(i.dataTypes[0])||!s["*"]&&o("*")}function D(t,i){var n,r,o=oe.ajaxSettings.flatOptions||{};for(n in i)i[n]!==e&&((o[n]?t:r||(r={}))[n]=i[n]);return r&&oe.extend(!0,t,r),t}function P(t,i,n){for(var r,o,s,a,l=t.contents,h=t.dataTypes;"*"===h[0];)h.shift(),r===e&&(r=t.mimeType||i.getResponseHeader("Content-Type"));if(r)for(o in l)if(l[o]&&l[o].test(r)){h.unshift(o);break}if(h[0]in n)s=h[0];else{for(o in n){if(!h[0]||t.converters[o+" "+h[0]]){s=o;break}a||(a=o)}s=s||a}return s?(s!==h[0]&&h.unshift(s),n[s]):e}function k(t,e,i,n){var r,o,s,a,l,h={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)h[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=h[l+" "+o]||h["* "+o],!s)for(r in h)if(a=r.split(" "),a[1]===o&&(s=h[l+" "+a[0]]||h["* "+a[0]])){s===!0?s=h[r]:h[r]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(u){return{state:"parsererror",error:s?u:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function A(){return setTimeout(function(){Mi=e}),Mi=oe.now()}function L(t,e,i){for(var n,r=(Ai[e]||[]).concat(Ai["*"]),o=0,s=r.length;s>o;o++)if(n=r[o].call(i,e,t))return n}function I(t,e,i){var n,r,o=0,s=ki.length,a=oe.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=Mi||A(),i=Math.max(0,h.startTime+h.duration-e),n=i/h.duration||0,o=1-n,s=0,l=h.tweens.length;l>s;s++)h.tweens[s].run(o);return a.notifyWith(t,[h,o,i]),1>o&&l?i:(a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:oe.extend({},e),opts:oe.extend(!0,{specialEasing:{}},i),originalProperties:e,originalOptions:i,startTime:Mi||A(),duration:i.duration,tweens:[],createTween:function(e,i){var n=oe.Tween(t,h.opts,e,i,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(n),n},stop:function(e){var i=0,n=e?h.tweens.length:0;if(r)return this;for(r=!0;n>i;i++)h.tweens[i].run(1);return e?a.resolveWith(t,[h,e]):a.rejectWith(t,[h,e]),this}}),c=h.props;for(F(c,h.opts.specialEasing);s>o;o++)if(n=ki[o].call(h,t,c,h.opts))return n;return oe.map(c,L,h),oe.isFunction(h.opts.start)&&h.opts.start.call(t,h),oe.fx.timer(oe.extend(l,{elem:t,anim:h,queue:h.opts.queue})),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always)}function F(t,e){var i,n,r,o,s;for(i in t)if(n=oe.camelCase(i),r=e[n],o=t[i],oe.isArray(o)&&(r=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),s=oe.cssHooks[n],s&&"expand"in s){o=s.expand(o),delete t[n];for(i in o)i in t||(t[i]=o[i],e[i]=r)}else e[n]=r}function N(t,i,n){var r,o,s,a,l,h,c=this,u={},d=t.style,p=t.nodeType&&E(t),f=ge.get(t,"fxshow");n.queue||(l=oe._queueHooks(t,"fx"),null==l.unqueued&&(l.unqueued=0,h=l.empty.fire,l.empty.fire=function(){l.unqueued||h()}),l.unqueued++,c.always(function(){c.always(function(){l.unqueued--,oe.queue(t,"fx").length||l.empty.fire()})})),1===t.nodeType&&("height"in i||"width"in i)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===oe.css(t,"display")&&"none"===oe.css(t,"float")&&(d.display="inline-block")),n.overflow&&(d.overflow="hidden",c.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in i)if(o=i[r],Hi.exec(o)){if(delete i[r],s=s||"toggle"===o,o===(p?"hide":"show")){if("show"!==o||!f||f[r]===e)continue;p=!0}u[r]=f&&f[r]||oe.style(t,r)}if(!oe.isEmptyObject(u)){f?"hidden"in f&&(p=f.hidden):f=ge.access(t,"fxshow",{}),s&&(f.hidden=!p),p?oe(t).show():c.done(function(){oe(t).hide()}),c.done(function(){var e;ge.remove(t,"fxshow");for(e in u)oe.style(t,e,u[e])});for(r in u)a=L(p?f[r]:0,r,c),r in f||(f[r]=a.start,p&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function z(t,e,i,n,r){return new z.prototype.init(t,e,i,n,r)}function B(t,e){var i,n={height:t},r=0;for(e=e?1:0;4>r;r+=2-e)i=Je[r],n["margin"+i]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function O(t){return oe.isWindow(t)?t:9===t.nodeType&&t.defaultView}var U,V,j=typeof e,W=t.location,G=t.document,X=G.documentElement,Z=t.jQuery,Y=t.$,q={},$=[],K="2.0.3",J=$.concat,Q=$.push,te=$.slice,ee=$.indexOf,ie=q.toString,ne=q.hasOwnProperty,re=K.trim,oe=function(t,e){return new oe.fn.init(t,e,U)},se=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ae=/\S+/g,le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,he=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ce=/^-ms-/,ue=/-([\da-z])/gi,de=function(t,e){return e.toUpperCase()},pe=function(){G.removeEventListener("DOMContentLoaded",pe,!1),t.removeEventListener("load",pe,!1),oe.ready()};oe.fn=oe.prototype={jquery:K,constructor:oe,init:function(t,i,n){var r,o;if(!t)return this;if("string"==typeof t){if(r="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:le.exec(t),!r||!r[1]&&i)return!i||i.jquery?(i||n).find(t):this.constructor(i).find(t);if(r[1]){if(i=i instanceof oe?i[0]:i,oe.merge(this,oe.parseHTML(r[1],i&&i.nodeType?i.ownerDocument||i:G,!0)),he.test(r[1])&&oe.isPlainObject(i))for(r in i)oe.isFunction(this[r])?this[r](i[r]):this.attr(r,i[r]);return this}return o=G.getElementById(r[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=G,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):oe.isFunction(t)?n.ready(t):(t.selector!==e&&(this.selector=t.selector,this.context=t.context),oe.makeArray(t,this))},selector:"",length:0,toArray:function(){return te.call(this)},get:function(t){return null==t?this.toArray():0>t?this[this.length+t]:this[t]},pushStack:function(t){var e=oe.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return oe.each(this,t,e)},ready:function(t){return oe.ready.promise().done(t),this},slice:function(){return this.pushStack(te.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(0>t?e:0);return this.pushStack(i>=0&&e>i?[this[i]]:[])},map:function(t){return this.pushStack(oe.map(this,function(e,i){return t.call(e,i,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:Q,sort:[].sort,splice:[].splice},oe.fn.init.prototype=oe.fn,oe.extend=oe.fn.extend=function(){var t,i,n,r,o,s,a=arguments[0]||{},l=1,h=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},l=2),"object"==typeof a||oe.isFunction(a)||(a={}),h===l&&(a=this,--l);h>l;l++)if(null!=(t=arguments[l]))for(i in t)n=a[i],r=t[i],a!==r&&(c&&r&&(oe.isPlainObject(r)||(o=oe.isArray(r)))?(o?(o=!1,s=n&&oe.isArray(n)?n:[]):s=n&&oe.isPlainObject(n)?n:{},a[i]=oe.extend(c,s,r)):r!==e&&(a[i]=r));return a},oe.extend({expando:"jQuery"+(K+Math.random()).replace(/\D/g,""),noConflict:function(e){return t.$===oe&&(t.$=Y),e&&t.jQuery===oe&&(t.jQuery=Z),oe},isReady:!1,readyWait:1,holdReady:function(t){t?oe.readyWait++:oe.ready(!0)},ready:function(t){(t===!0?--oe.readyWait:oe.isReady)||(oe.isReady=!0,t!==!0&&--oe.readyWait>0||(V.resolveWith(G,[oe]),oe.fn.trigger&&oe(G).trigger("ready").off("ready")))},isFunction:function(t){return"function"===oe.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?q[ie.call(t)]||"object":typeof t},isPlainObject:function(t){if("object"!==oe.type(t)||t.nodeType||oe.isWindow(t))return!1;try{if(t.constructor&&!ne.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}return!0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},error:function(t){throw Error(t)},parseHTML:function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||G;var n=he.exec(t),r=!i&&[];return n?[e.createElement(n[1])]:(n=oe.buildFragment([t],e,r),r&&oe(r).remove(),oe.merge([],n.childNodes))},parseJSON:JSON.parse,parseXML:function(t){var i,n;if(!t||"string"!=typeof t)return null;try{n=new DOMParser,i=n.parseFromString(t,"text/xml")}catch(r){i=e}return(!i||i.getElementsByTagName("parsererror").length)&&oe.error("Invalid XML: "+t),i},noop:function(){},globalEval:function(t){var e,i=eval;t=oe.trim(t),t&&(1===t.indexOf("use strict")?(e=G.createElement("script"),e.text=t,G.head.appendChild(e).parentNode.removeChild(e)):i(t))},camelCase:function(t){return t.replace(ce,"ms-").replace(ue,de)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,n){var r,o=0,s=t.length,a=i(t);if(n){if(a)for(;s>o&&(r=e.apply(t[o],n),r!==!1);o++);else for(o in t)if(r=e.apply(t[o],n),r===!1)break}else if(a)for(;s>o&&(r=e.call(t[o],o,t[o]),r!==!1);o++);else for(o in t)if(r=e.call(t[o],o,t[o]),r===!1)break;return t},trim:function(t){return null==t?"":re.call(t)},makeArray:function(t,e){var n=e||[];return null!=t&&(i(Object(t))?oe.merge(n,"string"==typeof t?[t]:t):Q.call(n,t)),n},inArray:function(t,e,i){return null==e?-1:ee.call(e,t,i)},merge:function(t,i){var n=i.length,r=t.length,o=0;if("number"==typeof n)for(;n>o;o++)t[r++]=i[o];else for(;i[o]!==e;)t[r++]=i[o++];return t.length=r,t},grep:function(t,e,i){var n,r=[],o=0,s=t.length;for(i=!!i;s>o;o++)n=!!e(t[o],o),i!==n&&r.push(t[o]);return r},map:function(t,e,n){var r,o=0,s=t.length,a=i(t),l=[];if(a)for(;s>o;o++)r=e(t[o],o,n),null!=r&&(l[l.length]=r);else for(o in t)r=e(t[o],o,n),null!=r&&(l[l.length]=r);return J.apply([],l)},guid:1,proxy:function(t,i){var n,r,o;return"string"==typeof i&&(n=t[i],i=t,t=n),oe.isFunction(t)?(r=te.call(arguments,2),o=function(){return t.apply(i||this,r.concat(te.call(arguments)))},o.guid=t.guid=t.guid||oe.guid++,o):e},access:function(t,i,n,r,o,s,a){var l=0,h=t.length,c=null==n;if("object"===oe.type(n)){o=!0;for(l in n)oe.access(t,i,l,n[l],!0,s,a)}else if(r!==e&&(o=!0,oe.isFunction(r)||(a=!0),c&&(a?(i.call(t,r),i=null):(c=i,i=function(t,e,i){return c.call(oe(t),i)})),i))for(;h>l;l++)i(t[l],n,a?r:r.call(t[l],l,i(t[l],n)));return o?t:c?i.call(t):h?i(t[0],n):s},now:Date.now,swap:function(t,e,i,n){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];r=i.apply(t,n||[]);for(o in e)t.style[o]=s[o];return r}}),oe.ready.promise=function(e){return V||(V=oe.Deferred(),"complete"===G.readyState?setTimeout(oe.ready):(G.addEventListener("DOMContentLoaded",pe,!1),t.addEventListener("load",pe,!1))),V.promise(e)},oe.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){q["[object "+e+"]"]=e.toLowerCase()}),U=oe(G),function(t,e){function i(t,e,i,n){var r,o,s,a,l,h,c,u,f,m;if((e?e.ownerDocument||e:O)!==k&&P(e),e=e||k,i=i||[],!t||"string"!=typeof t)return i;if(1!==(a=e.nodeType)&&9!==a)return[];if(L&&!n){if(r=Ee.exec(t))if(s=r[1]){if(9===a){if(o=e.getElementById(s),!o||!o.parentNode)return i;if(o.id===s)return i.push(o),i}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(s))&&z(e,o)&&o.id===s)return i.push(o),i}else{if(r[2])return te.apply(i,e.getElementsByTagName(t)),i;if((s=r[3])&&x.getElementsByClassName&&e.getElementsByClassName)return te.apply(i,e.getElementsByClassName(s)),i}if(x.qsa&&(!I||!I.test(t))){if(u=c=B,f=e,m=9===a&&t,1===a&&"object"!==e.nodeName.toLowerCase()){for(h=d(t),(c=e.getAttribute("id"))?u=c.replace(Te,"\\$&"):e.setAttribute("id",u),u="[id='"+u+"'] ",l=h.length;l--;)h[l]=u+p(h[l]);f=pe.test(t)&&e.parentNode||e,m=h.join(",")}if(m)try{return te.apply(i,f.querySelectorAll(m)),i}catch(g){}finally{c||e.removeAttribute("id")}}}return _(t.replace(ce,"$1"),e,i,n)}function n(){function t(i,n){return e.push(i+=" ")>R.cacheLength&&delete t[e.shift()],t[i]=n}var e=[];return t}function r(t){return t[B]=!0,t}function o(t){var e=k.createElement("div");try{return!!t(e)}catch(i){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function s(t,e){for(var i=t.split("|"),n=t.length;n--;)R.attrHandle[i[n]]=e}function a(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||q)-(~t.sourceIndex||q);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function l(t){return function(e){var i=e.nodeName.toLowerCase();return"input"===i&&e.type===t}}function h(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function c(t){return r(function(e){return e=+e,r(function(i,n){for(var r,o=t([],i.length,e),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))})})}function u(){}function d(t,e){var n,r,o,s,a,l,h,c=W[t+" "];if(c)return e?0:c.slice(0);for(a=t,l=[],h=R.preFilter;a;){(!n||(r=ue.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),n=!1,(r=de.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(ce," ")}),a=a.slice(n.length));for(s in R.filter)!(r=ve[s].exec(a))||h[s]&&!(r=h[s](r))||(n=r.shift(),o.push({value:n,type:s,matches:r}),a=a.slice(n.length));if(!n)break}return e?a.length:a?i.error(t):W(t,l).slice(0)}function p(t){for(var e=0,i=t.length,n="";i>e;e++)n+=t[e].value;return n}function f(t,e,i){var n=e.dir,r=i&&"parentNode"===n,o=V++;return e.first?function(e,i,o){for(;e=e[n];)if(1===e.nodeType||r)return t(e,i,o)}:function(e,i,s){var a,l,h,c=U+" "+o;if(s){for(;e=e[n];)if((1===e.nodeType||r)&&t(e,i,s))return!0}else for(;e=e[n];)if(1===e.nodeType||r)if(h=e[B]||(e[B]={}),(l=h[n])&&l[0]===c){if((a=l[1])===!0||a===w)return a===!0}else if(l=h[n]=[c],l[1]=t(e,i,s)||w,l[1]===!0)return!0}}function m(t){return t.length>1?function(e,i,n){for(var r=t.length;r--;)if(!t[r](e,i,n))return!1;return!0}:t[0]}function g(t,e,i,n,r){for(var o,s=[],a=0,l=t.length,h=null!=e;l>a;a++)(o=t[a])&&(!i||i(o,n,r))&&(s.push(o),h&&e.push(a));return s}function v(t,e,i,n,o,s){return n&&!n[B]&&(n=v(n)),o&&!o[B]&&(o=v(o,s)),r(function(r,s,a,l){var h,c,u,d=[],p=[],f=s.length,m=r||b(e||"*",a.nodeType?[a]:a,[]),v=!t||!r&&e?m:g(m,d,t,a,l),y=i?o||(r?t:f||n)?[]:s:v;if(i&&i(v,y,a,l),n)for(h=g(y,p),n(h,[],a,l),c=h.length;c--;)(u=h[c])&&(y[p[c]]=!(v[p[c]]=u));if(r){if(o||t){if(o){for(h=[],c=y.length;c--;)(u=y[c])&&h.push(v[c]=u);o(null,y=[],h,l)}for(c=y.length;c--;)(u=y[c])&&(h=o?ie.call(r,u):d[c])>-1&&(r[h]=!(s[h]=u))}}else y=g(y===s?y.splice(f,y.length):y),o?o(null,s,y,l):te.apply(s,y)})}function y(t){for(var e,i,n,r=t.length,o=R.relative[t[0].type],s=o||R.relative[" "],a=o?1:0,l=f(function(t){return t===e},s,!0),h=f(function(t){return ie.call(e,t)>-1},s,!0),c=[function(t,i,n){return!o&&(n||i!==H)||((e=i).nodeType?l(t,i,n):h(t,i,n))}];r>a;a++)if(i=R.relative[t[a].type])c=[f(m(c),i)];else{if(i=R.filter[t[a].type].apply(null,t[a].matches),i[B]){for(n=++a;r>n&&!R.relative[t[n].type];n++);return v(a>1&&m(c),a>1&&p(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(ce,"$1"),i,n>a&&y(t.slice(a,n)),r>n&&y(t=t.slice(n)),r>n&&p(t))}c.push(i)}return m(c)}function E(t,e){var n=0,o=e.length>0,s=t.length>0,a=function(r,a,l,h,c){var u,d,p,f=[],m=0,v="0",y=r&&[],E=null!=c,b=H,_=r||s&&R.find.TAG("*",c&&a.parentNode||a),T=U+=null==b?1:Math.random()||.1;for(E&&(H=a!==k&&a,w=n);null!=(u=_[v]);v++){if(s&&u){for(d=0;p=t[d++];)if(p(u,a,l)){h.push(u);break}E&&(U=T,w=++n)}o&&((u=!p&&u)&&m--,r&&y.push(u))}if(m+=v,o&&v!==m){for(d=0;p=e[d++];)p(y,f,a,l);if(r){if(m>0)for(;v--;)y[v]||f[v]||(f[v]=J.call(h));f=g(f)}te.apply(h,f),E&&!r&&f.length>0&&m+e.length>1&&i.uniqueSort(h)}return E&&(U=T,H=b),y};return o?r(a):a}function b(t,e,n){for(var r=0,o=e.length;o>r;r++)i(t,e[r],n);return n}function _(t,e,i,n){var r,o,s,a,l,h=d(t);if(!n&&1===h.length){if(o=h[0]=h[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&x.getById&&9===e.nodeType&&L&&R.relative[o[1].type]){if(e=(R.find.ID(s.matches[0].replace(xe,we),e)||[])[0],!e)return i;t=t.slice(o.shift().value.length)}for(r=ve.needsContext.test(t)?0:o.length;r--&&(s=o[r],!R.relative[a=s.type]);)if((l=R.find[a])&&(n=l(s.matches[0].replace(xe,we),pe.test(o[0].type)&&e.parentNode||e))){if(o.splice(r,1),t=n.length&&p(o),!t)return te.apply(i,n),i;break}}return C(t,h)(n,e,!L,i,pe.test(t)),i}var T,x,w,R,S,M,C,H,D,P,k,A,L,I,F,N,z,B="sizzle"+-new Date,O=t.document,U=0,V=0,j=n(),W=n(),G=n(),X=!1,Z=function(t,e){return t===e?(X=!0,0):0},Y=typeof e,q=1<<31,$={}.hasOwnProperty,K=[],J=K.pop,Q=K.push,te=K.push,ee=K.slice,ie=K.indexOf||function(t){for(var e=0,i=this.length;i>e;e++)if(this[e]===t)return e;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",re="[\\x20\\t\\r\\n\\f]",se="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ae=se.replace("w","w#"),le="\\["+re+"*("+se+")"+re+"*(?:([*^$|!~]?=)"+re+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ae+")|)|)"+re+"*\\]",he=":("+se+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+le.replace(3,8)+")*)|.*)\\)|)",ce=RegExp("^"+re+"+|((?:^|[^\\\\])(?:\\\\.)*)"+re+"+$","g"),ue=RegExp("^"+re+"*,"+re+"*"),de=RegExp("^"+re+"*([>+~]|"+re+")"+re+"*"),pe=RegExp(re+"*[+~]"),fe=RegExp("="+re+"*([^\\]'\"]*)"+re+"*\\]","g"),me=RegExp(he),ge=RegExp("^"+ae+"$"),ve={ID:RegExp("^#("+se+")"),CLASS:RegExp("^\\.("+se+")"),TAG:RegExp("^("+se.replace("w","w*")+")"),ATTR:RegExp("^"+le),PSEUDO:RegExp("^"+he),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+re+"*(even|odd|(([+-]|)(\\d*)n|)"+re+"*(?:([+-]|)"+re+"*(\\d+)|))"+re+"*\\)|)","i"),bool:RegExp("^(?:"+ne+")$","i"),needsContext:RegExp("^"+re+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+re+"*((?:-\\d)?\\d*)"+re+"*\\)|)(?=[^-]|$)","i")},ye=/^[^{]+\{\s*\[native \w/,Ee=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/^(?:input|select|textarea|button)$/i,_e=/^h\d$/i,Te=/'|\\/g,xe=RegExp("\\\\([\\da-f]{1,6}"+re+"?|("+re+")|.)","ig"),we=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{te.apply(K=ee.call(O.childNodes),O.childNodes),K[O.childNodes.length].nodeType}catch(Re){te={apply:K.length?function(t,e){Q.apply(t,ee.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}M=i.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},x=i.support={},P=i.setDocument=function(t){var i=t?t.ownerDocument||t:O,n=i.defaultView;return i!==k&&9===i.nodeType&&i.documentElement?(k=i,A=i.documentElement,L=!M(i),n&&n.attachEvent&&n!==n.top&&n.attachEvent("onbeforeunload",function(){P()}),x.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),x.getElementsByTagName=o(function(t){return t.appendChild(i.createComment("")),!t.getElementsByTagName("*").length}),x.getElementsByClassName=o(function(t){return t.innerHTML="<div class='a'></div><div class='a i'></div>",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),x.getById=o(function(t){return A.appendChild(t).id=B,!i.getElementsByName||!i.getElementsByName(B).length}),x.getById?(R.find.ID=function(t,e){if(typeof e.getElementById!==Y&&L){var i=e.getElementById(t);return i&&i.parentNode?[i]:[]}},R.filter.ID=function(t){var e=t.replace(xe,we);return function(t){return t.getAttribute("id")===e}}):(delete R.find.ID,R.filter.ID=function(t){var e=t.replace(xe,we);return function(t){var i=typeof t.getAttributeNode!==Y&&t.getAttributeNode("id");return i&&i.value===e}}),R.find.TAG=x.getElementsByTagName?function(t,i){return typeof i.getElementsByTagName!==Y?i.getElementsByTagName(t):e}:function(t,e){var i,n=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},R.find.CLASS=x.getElementsByClassName&&function(t,i){return typeof i.getElementsByClassName!==Y&&L?i.getElementsByClassName(t):e},F=[],I=[],(x.qsa=ye.test(i.querySelectorAll))&&(o(function(t){t.innerHTML="<select><option selected=''></option></select>",t.querySelectorAll("[selected]").length||I.push("\\["+re+"*(?:value|"+ne+")"),t.querySelectorAll(":checked").length||I.push(":checked")}),o(function(t){var e=i.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("t",""),t.querySelectorAll("[t^='']").length&&I.push("[*^$]="+re+"*(?:''|\"\")"),t.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),I.push(",.*:")})),(x.matchesSelector=ye.test(N=A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&o(function(t){x.disconnectedMatch=N.call(t,"div"),N.call(t,"[s!='']:x"),F.push("!=",he)}),I=I.length&&RegExp(I.join("|")),F=F.length&&RegExp(F.join("|")),z=ye.test(A.contains)||A.compareDocumentPosition?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},Z=A.compareDocumentPosition?function(t,e){if(t===e)return X=!0,0;var n=e.compareDocumentPosition&&t.compareDocumentPosition&&t.compareDocumentPosition(e);return n?1&n||!x.sortDetached&&e.compareDocumentPosition(t)===n?t===i||z(O,t)?-1:e===i||z(O,e)?1:D?ie.call(D,t)-ie.call(D,e):0:4&n?-1:1:t.compareDocumentPosition?-1:1}:function(t,e){var n,r=0,o=t.parentNode,s=e.parentNode,l=[t],h=[e];if(t===e)return X=!0,0;if(!o||!s)return t===i?-1:e===i?1:o?-1:s?1:D?ie.call(D,t)-ie.call(D,e):0;if(o===s)return a(t,e);for(n=t;n=n.parentNode;)l.unshift(n);for(n=e;n=n.parentNode;)h.unshift(n);for(;l[r]===h[r];)r++;return r?a(l[r],h[r]):l[r]===O?-1:h[r]===O?1:0},i):k},i.matches=function(t,e){return i(t,null,null,e)},i.matchesSelector=function(t,e){if((t.ownerDocument||t)!==k&&P(t),e=e.replace(fe,"='$1']"),!(!x.matchesSelector||!L||F&&F.test(e)||I&&I.test(e)))try{var n=N.call(t,e);if(n||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(r){}return i(e,k,null,[t]).length>0},i.contains=function(t,e){return(t.ownerDocument||t)!==k&&P(t),z(t,e)},i.attr=function(t,i){(t.ownerDocument||t)!==k&&P(t);var n=R.attrHandle[i.toLowerCase()],r=n&&$.call(R.attrHandle,i.toLowerCase())?n(t,i,!L):e;return r===e?x.attributes||!L?t.getAttribute(i):(r=t.getAttributeNode(i))&&r.specified?r.value:null:r},i.error=function(t){throw Error("Syntax error, unrecognized expression: "+t)},i.uniqueSort=function(t){var e,i=[],n=0,r=0;if(X=!x.detectDuplicates,D=!x.sortStable&&t.slice(0),t.sort(Z),X){for(;e=t[r++];)e===t[r]&&(n=i.push(r));for(;n--;)t.splice(i[n],1)}return t},S=i.getText=function(t){var e,i="",n=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=S(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[n];n++)i+=S(e);return i},R=i.selectors={cacheLength:50,createPseudo:r,match:ve,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(xe,we),t[3]=(t[4]||t[5]||"").replace(xe,we),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||i.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&i.error(t[0]),t},PSEUDO:function(t){var i,n=!t[5]&&t[2];return ve.CHILD.test(t[0])?null:(t[3]&&t[4]!==e?t[2]=t[4]:n&&me.test(n)&&(i=d(n,!0))&&(i=n.indexOf(")",n.length-i)-n.length)&&(t[0]=t[0].slice(0,i),t[2]=n.slice(0,i)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(xe,we).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=j[t+" "];return e||(e=RegExp("(^|"+re+")"+t+"("+re+"|$)"))&&j(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==Y&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(r){var o=i.attr(r,t);return null==o?"!="===e:e?(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o+" ").indexOf(n)>-1:"|="===e?o===n||o.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(t,e,i,n,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===r?function(t){return!!t.parentNode}:function(e,i,l){var h,c,u,d,p,f,m=o!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a;if(g){if(o){for(;m;){for(u=e;u=u[m];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&y){for(c=g[B]||(g[B]={}),h=c[t]||[],p=h[0]===U&&h[1],d=h[0]===U&&h[2],u=p&&g.childNodes[p];u=++p&&u&&u[m]||(d=p=0)||f.pop();)if(1===u.nodeType&&++d&&u===e){c[t]=[U,p,d];break}}else if(y&&(h=(e[B]||(e[B]={}))[t])&&h[0]===U)d=h[1];else for(;(u=++p&&u&&u[m]||(d=p=0)||f.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++d||(y&&((u[B]||(u[B]={}))[t]=[U,d]),u!==e)););return d-=r,d===n||0===d%n&&d/n>=0}}},PSEUDO:function(t,e){var n,o=R.pseudos[t]||R.setFilters[t.toLowerCase()]||i.error("unsupported pseudo: "+t);return o[B]?o(e):o.length>1?(n=[t,t,"",e],R.setFilters.hasOwnProperty(t.toLowerCase())?r(function(t,i){for(var n,r=o(t,e),s=r.length;s--;)n=ie.call(t,r[s]),t[n]=!(i[n]=r[s])}):function(t){return o(t,0,n)}):o}},pseudos:{not:r(function(t){var e=[],i=[],n=C(t.replace(ce,"$1"));return n[B]?r(function(t,e,i,r){for(var o,s=n(t,null,r,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,r,o){return e[0]=t,n(e,null,o,i),!i.pop()}}),has:r(function(t){return function(e){return i(t,e).length>0}}),contains:r(function(t){return function(e){return(e.textContent||e.innerText||S(e)).indexOf(t)>-1}}),lang:r(function(t){return ge.test(t||"")||i.error("unsupported lang: "+t),t=t.replace(xe,we).toLowerCase(),function(e){var i;do if(i=L?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===A},focus:function(t){return t===k.activeElement&&(!k.hasFocus||k.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeName>"@"||3===t.nodeType||4===t.nodeType)return!1;return!0},parent:function(t){return!R.pseudos.empty(t)},header:function(t){return _e.test(t.nodeName)},input:function(t){return be.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||e.toLowerCase()===t.type)},first:c(function(){return[0]}),last:c(function(t,e){return[e-1]}),eq:c(function(t,e,i){return[0>i?i+e:i]}),even:c(function(t,e){for(var i=0;e>i;i+=2)t.push(i);return t}),odd:c(function(t,e){for(var i=1;e>i;i+=2)t.push(i);return t}),lt:c(function(t,e,i){for(var n=0>i?i+e:i;--n>=0;)t.push(n);return t}),gt:c(function(t,e,i){for(var n=0>i?i+e:i;e>++n;)t.push(n);return t})}},R.pseudos.nth=R.pseudos.eq;for(T in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})R.pseudos[T]=l(T);for(T in{submit:!0,reset:!0})R.pseudos[T]=h(T);
  2. u.prototype=R.filters=R.pseudos,R.setFilters=new u,C=i.compile=function(t,e){var i,n=[],r=[],o=G[t+" "];if(!o){for(e||(e=d(t)),i=e.length;i--;)o=y(e[i]),o[B]?n.push(o):r.push(o);o=G(t,E(r,n))}return o},x.sortStable=B.split("").sort(Z).join("")===B,x.detectDuplicates=X,P(),x.sortDetached=o(function(t){return 1&t.compareDocumentPosition(k.createElement("div"))}),o(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||s("type|href|height|width",function(t,i,n){return n?e:t.getAttribute(i,"type"===i.toLowerCase()?1:2)}),x.attributes&&o(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||s("value",function(t,i,n){return n||"input"!==t.nodeName.toLowerCase()?e:t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||s(ne,function(t,i,n){var r;return n?e:(r=t.getAttributeNode(i))&&r.specified?r.value:t[i]===!0?i.toLowerCase():null}),oe.find=i,oe.expr=i.selectors,oe.expr[":"]=oe.expr.pseudos,oe.unique=i.uniqueSort,oe.text=i.getText,oe.isXMLDoc=i.isXML,oe.contains=i.contains}(t);var fe={};oe.Callbacks=function(t){t="string"==typeof t?fe[t]||n(t):oe.extend({},t);var i,r,o,s,a,l,h=[],c=!t.once&&[],u=function(e){for(i=t.memory&&e,r=!0,l=s||0,s=0,a=h.length,o=!0;h&&a>l;l++)if(h[l].apply(e[0],e[1])===!1&&t.stopOnFalse){i=!1;break}o=!1,h&&(c?c.length&&u(c.shift()):i?h=[]:d.disable())},d={add:function(){if(h){var e=h.length;!function n(e){oe.each(e,function(e,i){var r=oe.type(i);"function"===r?t.unique&&d.has(i)||h.push(i):i&&i.length&&"string"!==r&&n(i)})}(arguments),o?a=h.length:i&&(s=e,u(i))}return this},remove:function(){return h&&oe.each(arguments,function(t,e){for(var i;(i=oe.inArray(e,h,i))>-1;)h.splice(i,1),o&&(a>=i&&a--,l>=i&&l--)}),this},has:function(t){return t?oe.inArray(t,h)>-1:!(!h||!h.length)},empty:function(){return h=[],a=0,this},disable:function(){return h=c=i=e,this},disabled:function(){return!h},lock:function(){return c=e,i||d.disable(),this},locked:function(){return!c},fireWith:function(t,e){return!h||r&&!c||(e=e||[],e=[t,e.slice?e.slice():e],o?c.push(e):u(e)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!r}};return d},oe.extend({Deferred:function(t){var e=[["resolve","done",oe.Callbacks("once memory"),"resolved"],["reject","fail",oe.Callbacks("once memory"),"rejected"],["notify","progress",oe.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return oe.Deferred(function(i){oe.each(e,function(e,o){var s=o[0],a=oe.isFunction(t[e])&&t[e];r[o[1]](function(){var t=a&&a.apply(this,arguments);t&&oe.isFunction(t.promise)?t.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[s+"With"](this===n?i.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?oe.extend(t,n):n}},r={};return n.pipe=n.then,oe.each(e,function(t,o){var s=o[2],a=o[3];n[o[1]]=s.add,a&&s.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?n:this,arguments),this},r[o[0]+"With"]=s.fireWith}),n.promise(r),t&&t.call(r,r),r},when:function(t){var e,i,n,r=0,o=te.call(arguments),s=o.length,a=1!==s||t&&oe.isFunction(t.promise)?s:0,l=1===a?t:oe.Deferred(),h=function(t,i,n){return function(r){i[t]=this,n[t]=arguments.length>1?te.call(arguments):r,n===e?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(s>1)for(e=Array(s),i=Array(s),n=Array(s);s>r;r++)o[r]&&oe.isFunction(o[r].promise)?o[r].promise().done(h(r,n,o)).fail(l.reject).progress(h(r,i,e)):--a;return a||l.resolveWith(n,o),l.promise()}}),oe.support=function(e){var i=G.createElement("input"),n=G.createDocumentFragment(),r=G.createElement("div"),o=G.createElement("select"),s=o.appendChild(G.createElement("option"));return i.type?(i.type="checkbox",e.checkOn=""!==i.value,e.optSelected=s.selected,e.reliableMarginRight=!0,e.boxSizingReliable=!0,e.pixelPosition=!1,i.checked=!0,e.noCloneChecked=i.cloneNode(!0).checked,o.disabled=!0,e.optDisabled=!s.disabled,i=G.createElement("input"),i.value="t",i.type="radio",e.radioValue="t"===i.value,i.setAttribute("checked","t"),i.setAttribute("name","t"),n.appendChild(i),e.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,e.focusinBubbles="onfocusin"in t,r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",e.clearCloneStyle="content-box"===r.style.backgroundClip,oe(function(){var i,n,o="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",s=G.getElementsByTagName("body")[0];s&&(i=G.createElement("div"),i.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(i).appendChild(r),r.innerHTML="",r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",oe.swap(s,null!=s.style.zoom?{zoom:1}:{},function(){e.boxSizing=4===r.offsetWidth}),t.getComputedStyle&&(e.pixelPosition="1%"!==(t.getComputedStyle(r,null)||{}).top,e.boxSizingReliable="4px"===(t.getComputedStyle(r,null)||{width:"4px"}).width,n=r.appendChild(G.createElement("div")),n.style.cssText=r.style.cssText=o,n.style.marginRight=n.style.width="0",r.style.width="1px",e.reliableMarginRight=!parseFloat((t.getComputedStyle(n,null)||{}).marginRight)),s.removeChild(i))}),e):e}({});var me,ge,ve=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,ye=/([A-Z])/g;r.uid=1,r.accepts=function(t){return t.nodeType?1===t.nodeType||9===t.nodeType:!0},r.prototype={key:function(t){if(!r.accepts(t))return 0;var e={},i=t[this.expando];if(!i){i=r.uid++;try{e[this.expando]={value:i},Object.defineProperties(t,e)}catch(n){e[this.expando]=i,oe.extend(t,e)}}return this.cache[i]||(this.cache[i]={}),i},set:function(t,e,i){var n,r=this.key(t),o=this.cache[r];if("string"==typeof e)o[e]=i;else if(oe.isEmptyObject(o))oe.extend(this.cache[r],e);else for(n in e)o[n]=e[n];return o},get:function(t,i){var n=this.cache[this.key(t)];return i===e?n:n[i]},access:function(t,i,n){var r;return i===e||i&&"string"==typeof i&&n===e?(r=this.get(t,i),r!==e?r:this.get(t,oe.camelCase(i))):(this.set(t,i,n),n!==e?n:i)},remove:function(t,i){var n,r,o,s=this.key(t),a=this.cache[s];if(i===e)this.cache[s]={};else{oe.isArray(i)?r=i.concat(i.map(oe.camelCase)):(o=oe.camelCase(i),i in a?r=[i,o]:(r=o,r=r in a?[r]:r.match(ae)||[])),n=r.length;for(;n--;)delete a[r[n]]}},hasData:function(t){return!oe.isEmptyObject(this.cache[t[this.expando]]||{})},discard:function(t){t[this.expando]&&delete this.cache[t[this.expando]]}},me=new r,ge=new r,oe.extend({acceptData:r.accepts,hasData:function(t){return me.hasData(t)||ge.hasData(t)},data:function(t,e,i){return me.access(t,e,i)},removeData:function(t,e){me.remove(t,e)},_data:function(t,e,i){return ge.access(t,e,i)},_removeData:function(t,e){ge.remove(t,e)}}),oe.fn.extend({data:function(t,i){var n,r,s=this[0],a=0,l=null;if(t===e){if(this.length&&(l=me.get(s),1===s.nodeType&&!ge.get(s,"hasDataAttrs"))){for(n=s.attributes;n.length>a;a++)r=n[a].name,0===r.indexOf("data-")&&(r=oe.camelCase(r.slice(5)),o(s,r,l[r]));ge.set(s,"hasDataAttrs",!0)}return l}return"object"==typeof t?this.each(function(){me.set(this,t)}):oe.access(this,function(i){var n,r=oe.camelCase(t);if(s&&i===e){if(n=me.get(s,t),n!==e)return n;if(n=me.get(s,r),n!==e)return n;if(n=o(s,r,e),n!==e)return n}else this.each(function(){var n=me.get(this,r);me.set(this,r,i),-1!==t.indexOf("-")&&n!==e&&me.set(this,t,i)})},null,i,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){me.remove(this,t)})}}),oe.extend({queue:function(t,i,n){var r;return t?(i=(i||"fx")+"queue",r=ge.get(t,i),n&&(!r||oe.isArray(n)?r=ge.access(t,i,oe.makeArray(n)):r.push(n)),r||[]):e},dequeue:function(t,e){e=e||"fx";var i=oe.queue(t,e),n=i.length,r=i.shift(),o=oe._queueHooks(t,e),s=function(){oe.dequeue(t,e)};"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===e&&i.unshift("inprogress"),delete o.stop,r.call(t,s,o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return ge.get(t,i)||ge.access(t,i,{empty:oe.Callbacks("once memory").add(function(){ge.remove(t,[e+"queue",i])})})}}),oe.fn.extend({queue:function(t,i){var n=2;return"string"!=typeof t&&(i=t,t="fx",n--),n>arguments.length?oe.queue(this[0],t):i===e?this:this.each(function(){var e=oe.queue(this,t,i);oe._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&oe.dequeue(this,t)})},dequeue:function(t){return this.each(function(){oe.dequeue(this,t)})},delay:function(t,e){return t=oe.fx?oe.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,i){var n=setTimeout(e,t);i.stop=function(){clearTimeout(n)}})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,i){var n,r=1,o=oe.Deferred(),s=this,a=this.length,l=function(){--r||o.resolveWith(s,[s])};for("string"!=typeof t&&(i=t,t=e),t=t||"fx";a--;)n=ge.get(s[a],t+"queueHooks"),n&&n.empty&&(r++,n.empty.add(l));return l(),o.promise(i)}});var Ee,be,_e=/[\t\r\n\f]/g,Te=/\r/g,xe=/^(?:input|select|textarea|button)$/i;oe.fn.extend({attr:function(t,e){return oe.access(this,oe.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){oe.removeAttr(this,t)})},prop:function(t,e){return oe.access(this,oe.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[oe.propFix[t]||t]})},addClass:function(t){var e,i,n,r,o,s=0,a=this.length,l="string"==typeof t&&t;if(oe.isFunction(t))return this.each(function(e){oe(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(ae)||[];a>s;s++)if(i=this[s],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(_e," "):" ")){for(o=0;r=e[o++];)0>n.indexOf(" "+r+" ")&&(n+=r+" ");i.className=oe.trim(n)}return this},removeClass:function(t){var e,i,n,r,o,s=0,a=this.length,l=0===arguments.length||"string"==typeof t&&t;if(oe.isFunction(t))return this.each(function(e){oe(this).removeClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(ae)||[];a>s;s++)if(i=this[s],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(_e," "):"")){for(o=0;r=e[o++];)for(;n.indexOf(" "+r+" ")>=0;)n=n.replace(" "+r+" "," ");i.className=t?oe.trim(n):""}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):this.each(oe.isFunction(t)?function(i){oe(this).toggleClass(t.call(this,i,this.className,e),e)}:function(){if("string"===i)for(var e,n=0,r=oe(this),o=t.match(ae)||[];e=o[n++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else(i===j||"boolean"===i)&&(this.className&&ge.set(this,"__className__",this.className),this.className=this.className||t===!1?"":ge.get(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",i=0,n=this.length;n>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(_e," ").indexOf(e)>=0)return!0;return!1},val:function(t){var i,n,r,o=this[0];return arguments.length?(r=oe.isFunction(t),this.each(function(n){var o;1===this.nodeType&&(o=r?t.call(this,n,oe(this).val()):t,null==o?o="":"number"==typeof o?o+="":oe.isArray(o)&&(o=oe.map(o,function(t){return null==t?"":t+""})),i=oe.valHooks[this.type]||oe.valHooks[this.nodeName.toLowerCase()],i&&"set"in i&&i.set(this,o,"value")!==e||(this.value=o))})):o?(i=oe.valHooks[o.type]||oe.valHooks[o.nodeName.toLowerCase()],i&&"get"in i&&(n=i.get(o,"value"))!==e?n:(n=o.value,"string"==typeof n?n.replace(Te,""):null==n?"":n)):void 0}}),oe.extend({valHooks:{option:{get:function(t){var e=t.attributes.value;return!e||e.specified?t.value:t.text}},select:{get:function(t){for(var e,i,n=t.options,r=t.selectedIndex,o="select-one"===t.type||0>r,s=o?null:[],a=o?r+1:n.length,l=0>r?a:o?r:0;a>l;l++)if(i=n[l],!(!i.selected&&l!==r||(oe.support.optDisabled?i.disabled:null!==i.getAttribute("disabled"))||i.parentNode.disabled&&oe.nodeName(i.parentNode,"optgroup"))){if(e=oe(i).val(),o)return e;s.push(e)}return s},set:function(t,e){for(var i,n,r=t.options,o=oe.makeArray(e),s=r.length;s--;)n=r[s],(n.selected=oe.inArray(oe(n).val(),o)>=0)&&(i=!0);return i||(t.selectedIndex=-1),o}}},attr:function(t,i,n){var r,o,s=t.nodeType;return t&&3!==s&&8!==s&&2!==s?typeof t.getAttribute===j?oe.prop(t,i,n):(1===s&&oe.isXMLDoc(t)||(i=i.toLowerCase(),r=oe.attrHooks[i]||(oe.expr.match.bool.test(i)?be:Ee)),n===e?r&&"get"in r&&null!==(o=r.get(t,i))?o:(o=oe.find.attr(t,i),null==o?e:o):null!==n?r&&"set"in r&&(o=r.set(t,n,i))!==e?o:(t.setAttribute(i,n+""),n):(oe.removeAttr(t,i),e)):void 0},removeAttr:function(t,e){var i,n,r=0,o=e&&e.match(ae);if(o&&1===t.nodeType)for(;i=o[r++];)n=oe.propFix[i]||i,oe.expr.match.bool.test(i)&&(t[n]=!1),t.removeAttribute(i)},attrHooks:{type:{set:function(t,e){if(!oe.support.radioValue&&"radio"===e&&oe.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(t,i,n){var r,o,s,a=t.nodeType;return t&&3!==a&&8!==a&&2!==a?(s=1!==a||!oe.isXMLDoc(t),s&&(i=oe.propFix[i]||i,o=oe.propHooks[i]),n!==e?o&&"set"in o&&(r=o.set(t,n,i))!==e?r:t[i]=n:o&&"get"in o&&null!==(r=o.get(t,i))?r:t[i]):void 0},propHooks:{tabIndex:{get:function(t){return t.hasAttribute("tabindex")||xe.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),be={set:function(t,e,i){return e===!1?oe.removeAttr(t,i):t.setAttribute(i,i),i}},oe.each(oe.expr.match.bool.source.match(/\w+/g),function(t,i){var n=oe.expr.attrHandle[i]||oe.find.attr;oe.expr.attrHandle[i]=function(t,i,r){var o=oe.expr.attrHandle[i],s=r?e:(oe.expr.attrHandle[i]=e)!=n(t,i,r)?i.toLowerCase():null;return oe.expr.attrHandle[i]=o,s}}),oe.support.optSelected||(oe.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),oe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){oe.propFix[this.toLowerCase()]=this}),oe.each(["radio","checkbox"],function(){oe.valHooks[this]={set:function(t,i){return oe.isArray(i)?t.checked=oe.inArray(oe(t).val(),i)>=0:e}},oe.support.checkOn||(oe.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var we=/^key/,Re=/^(?:mouse|contextmenu)|click/,Se=/^(?:focusinfocus|focusoutblur)$/,Me=/^([^.]*)(?:\.(.+)|)$/;oe.event={global:{},add:function(t,i,n,r,o){var s,a,l,h,c,u,d,p,f,m,g,v=ge.get(t);if(v){for(n.handler&&(s=n,n=s.handler,o=s.selector),n.guid||(n.guid=oe.guid++),(h=v.events)||(h=v.events={}),(a=v.handle)||(a=v.handle=function(t){return typeof oe===j||t&&oe.event.triggered===t.type?e:oe.event.dispatch.apply(a.elem,arguments)},a.elem=t),i=(i||"").match(ae)||[""],c=i.length;c--;)l=Me.exec(i[c])||[],f=g=l[1],m=(l[2]||"").split(".").sort(),f&&(d=oe.event.special[f]||{},f=(o?d.delegateType:d.bindType)||f,d=oe.event.special[f]||{},u=oe.extend({type:f,origType:g,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&oe.expr.match.needsContext.test(o),namespace:m.join(".")},s),(p=h[f])||(p=h[f]=[],p.delegateCount=0,d.setup&&d.setup.call(t,r,m,a)!==!1||t.addEventListener&&t.addEventListener(f,a,!1)),d.add&&(d.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,u):p.push(u),oe.event.global[f]=!0);t=null}},remove:function(t,e,i,n,r){var o,s,a,l,h,c,u,d,p,f,m,g=ge.hasData(t)&&ge.get(t);if(g&&(l=g.events)){for(e=(e||"").match(ae)||[""],h=e.length;h--;)if(a=Me.exec(e[h])||[],p=m=a[1],f=(a[2]||"").split(".").sort(),p){for(u=oe.event.special[p]||{},p=(n?u.delegateType:u.bindType)||p,d=l[p]||[],a=a[2]&&RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)c=d[o],!r&&m!==c.origType||i&&i.guid!==c.guid||a&&!a.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,u.remove&&u.remove.call(t,c));s&&!d.length&&(u.teardown&&u.teardown.call(t,f,g.handle)!==!1||oe.removeEvent(t,p,g.handle),delete l[p])}else for(p in l)oe.event.remove(t,p+e[h],i,n,!0);oe.isEmptyObject(l)&&(delete g.handle,ge.remove(t,"events"))}},trigger:function(i,n,r,o){var s,a,l,h,c,u,d,p=[r||G],f=ne.call(i,"type")?i.type:i,m=ne.call(i,"namespace")?i.namespace.split("."):[];if(a=l=r=r||G,3!==r.nodeType&&8!==r.nodeType&&!Se.test(f+oe.event.triggered)&&(f.indexOf(".")>=0&&(m=f.split("."),f=m.shift(),m.sort()),c=0>f.indexOf(":")&&"on"+f,i=i[oe.expando]?i:new oe.Event(f,"object"==typeof i&&i),i.isTrigger=o?2:3,i.namespace=m.join("."),i.namespace_re=i.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,i.result=e,i.target||(i.target=r),n=null==n?[i]:oe.makeArray(n,[i]),d=oe.event.special[f]||{},o||!d.trigger||d.trigger.apply(r,n)!==!1)){if(!o&&!d.noBubble&&!oe.isWindow(r)){for(h=d.delegateType||f,Se.test(h+f)||(a=a.parentNode);a;a=a.parentNode)p.push(a),l=a;l===(r.ownerDocument||G)&&p.push(l.defaultView||l.parentWindow||t)}for(s=0;(a=p[s++])&&!i.isPropagationStopped();)i.type=s>1?h:d.bindType||f,u=(ge.get(a,"events")||{})[i.type]&&ge.get(a,"handle"),u&&u.apply(a,n),u=c&&a[c],u&&oe.acceptData(a)&&u.apply&&u.apply(a,n)===!1&&i.preventDefault();return i.type=f,o||i.isDefaultPrevented()||d._default&&d._default.apply(p.pop(),n)!==!1||!oe.acceptData(r)||c&&oe.isFunction(r[f])&&!oe.isWindow(r)&&(l=r[c],l&&(r[c]=null),oe.event.triggered=f,r[f](),oe.event.triggered=e,l&&(r[c]=l)),i.result}},dispatch:function(t){t=oe.event.fix(t);var i,n,r,o,s,a=[],l=te.call(arguments),h=(ge.get(this,"events")||{})[t.type]||[],c=oe.event.special[t.type]||{};if(l[0]=t,t.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,t)!==!1){for(a=oe.event.handlers.call(this,t,h),i=0;(o=a[i++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,n=0;(s=o.handlers[n++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(s.namespace))&&(t.handleObj=s,t.data=s.data,r=((oe.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l),r!==e&&(t.result=r)===!1&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,i){var n,r,o,s,a=[],l=i.delegateCount,h=t.target;if(l&&h.nodeType&&(!t.button||"click"!==t.type))for(;h!==this;h=h.parentNode||this)if(h.disabled!==!0||"click"!==t.type){for(r=[],n=0;l>n;n++)s=i[n],o=s.selector+" ",r[o]===e&&(r[o]=s.needsContext?oe(o,this).index(h)>=0:oe.find(o,this,null,[h]).length),r[o]&&r.push(s);r.length&&a.push({elem:h,handlers:r})}return i.length>l&&a.push({elem:this,handlers:i.slice(l)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,i){var n,r,o,s=i.button;return null==t.pageX&&null!=i.clientX&&(n=t.target.ownerDocument||G,r=n.documentElement,o=n.body,t.pageX=i.clientX+(r&&r.scrollLeft||o&&o.scrollLeft||0)-(r&&r.clientLeft||o&&o.clientLeft||0),t.pageY=i.clientY+(r&&r.scrollTop||o&&o.scrollTop||0)-(r&&r.clientTop||o&&o.clientTop||0)),t.which||s===e||(t.which=1&s?1:2&s?3:4&s?2:0),t}},fix:function(t){if(t[oe.expando])return t;var e,i,n,r=t.type,o=t,s=this.fixHooks[r];for(s||(this.fixHooks[r]=s=Re.test(r)?this.mouseHooks:we.test(r)?this.keyHooks:{}),n=s.props?this.props.concat(s.props):this.props,t=new oe.Event(o),e=n.length;e--;)i=n[e],t[i]=o[i];return t.target||(t.target=G),3===t.target.nodeType&&(t.target=t.target.parentNode),s.filter?s.filter(t,o):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==l()&&this.focus?(this.focus(),!1):e},delegateType:"focusin"},blur:{trigger:function(){return this===l()&&this.blur?(this.blur(),!1):e},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&oe.nodeName(this,"input")?(this.click(),!1):e},_default:function(t){return oe.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){t.result!==e&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,i,n){var r=oe.extend(new oe.Event,i,{type:t,isSimulated:!0,originalEvent:{}});n?oe.event.trigger(r,null,e):oe.event.dispatch.call(e,r),r.isDefaultPrevented()&&i.preventDefault()}},oe.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i,!1)},oe.Event=function(t,i){return this instanceof oe.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||t.getPreventDefault&&t.getPreventDefault()?s:a):this.type=t,i&&oe.extend(this,i),this.timeStamp=t&&t.timeStamp||oe.now(),this[oe.expando]=!0,e):new oe.Event(t,i)},oe.Event.prototype={isDefaultPrevented:a,isPropagationStopped:a,isImmediatePropagationStopped:a,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=s,t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=s,t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=s,this.stopPropagation()}},oe.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(t,e){oe.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,r=t.relatedTarget,o=t.handleObj;return(!r||r!==n&&!oe.contains(n,r))&&(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=e),i}}}),oe.support.focusinBubbles||oe.each({focus:"focusin",blur:"focusout"},function(t,e){var i=0,n=function(t){oe.event.simulate(e,t.target,oe.event.fix(t),!0)};oe.event.special[e]={setup:function(){0===i++&&G.addEventListener(t,n,!0)},teardown:function(){0===--i&&G.removeEventListener(t,n,!0)}}}),oe.fn.extend({on:function(t,i,n,r,o){var s,l;if("object"==typeof t){"string"!=typeof i&&(n=n||i,i=e);for(l in t)this.on(l,i,n,t[l],o);return this}if(null==n&&null==r?(r=i,n=i=e):null==r&&("string"==typeof i?(r=n,n=e):(r=n,n=i,i=e)),r===!1)r=a;else if(!r)return this;return 1===o&&(s=r,r=function(t){return oe().off(t),s.apply(this,arguments)},r.guid=s.guid||(s.guid=oe.guid++)),this.each(function(){oe.event.add(this,t,r,n,i)})},one:function(t,e,i,n){return this.on(t,e,i,n,1)},off:function(t,i,n){var r,o;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,oe(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(o in t)this.off(o,i,t[o]);return this}return(i===!1||"function"==typeof i)&&(n=i,i=e),n===!1&&(n=a),this.each(function(){oe.event.remove(this,t,n,i)})},trigger:function(t,e){return this.each(function(){oe.event.trigger(t,e,this)})},triggerHandler:function(t,i){var n=this[0];return n?oe.event.trigger(t,i,n,!0):e}});var Ce=/^.[^:#\[\.,]*$/,He=/^(?:parents|prev(?:Until|All))/,De=oe.expr.match.needsContext,Pe={children:!0,contents:!0,next:!0,prev:!0};oe.fn.extend({find:function(t){var e,i=[],n=this,r=n.length;if("string"!=typeof t)return this.pushStack(oe(t).filter(function(){for(e=0;r>e;e++)if(oe.contains(n[e],this))return!0}));for(e=0;r>e;e++)oe.find(t,n[e],i);return i=this.pushStack(r>1?oe.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},has:function(t){var e=oe(t,this),i=e.length;return this.filter(function(){for(var t=0;i>t;t++)if(oe.contains(this,e[t]))return!0})},not:function(t){return this.pushStack(c(this,t||[],!0))},filter:function(t){return this.pushStack(c(this,t||[],!1))},is:function(t){return!!c(this,"string"==typeof t&&De.test(t)?oe(t):t||[],!1).length},closest:function(t,e){for(var i,n=0,r=this.length,o=[],s=De.test(t)||"string"!=typeof t?oe(t,e||this.context):0;r>n;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(11>i.nodeType&&(s?s.index(i)>-1:1===i.nodeType&&oe.find.matchesSelector(i,t))){i=o.push(i);break}return this.pushStack(o.length>1?oe.unique(o):o)},index:function(t){return t?"string"==typeof t?ee.call(oe(t),this[0]):ee.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){var i="string"==typeof t?oe(t,e):oe.makeArray(t&&t.nodeType?[t]:t),n=oe.merge(this.get(),i);return this.pushStack(oe.unique(n))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),oe.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return oe.dir(t,"parentNode")},parentsUntil:function(t,e,i){return oe.dir(t,"parentNode",i)},next:function(t){return h(t,"nextSibling")},prev:function(t){return h(t,"previousSibling")},nextAll:function(t){return oe.dir(t,"nextSibling")},prevAll:function(t){return oe.dir(t,"previousSibling")},nextUntil:function(t,e,i){return oe.dir(t,"nextSibling",i)},prevUntil:function(t,e,i){return oe.dir(t,"previousSibling",i)},siblings:function(t){return oe.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return oe.sibling(t.firstChild)},contents:function(t){return t.contentDocument||oe.merge([],t.childNodes)}},function(t,e){oe.fn[t]=function(i,n){var r=oe.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=oe.filter(n,r)),this.length>1&&(Pe[t]||oe.unique(r),He.test(t)&&r.reverse()),this.pushStack(r)}}),oe.extend({filter:function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?oe.find.matchesSelector(n,t)?[n]:[]:oe.find.matches(t,oe.grep(e,function(t){return 1===t.nodeType}))},dir:function(t,i,n){for(var r=[],o=n!==e;(t=t[i])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&oe(t).is(n))break;r.push(t)}return r},sibling:function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}});var ke=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ae=/<([\w:]+)/,Le=/<|&#?\w+;/,Ie=/<(?:script|style|link)/i,Fe=/^(?:checkbox|radio)$/i,Ne=/checked\s*(?:[^=]|=\s*.checked.)/i,ze=/^$|\/(?:java|ecma)script/i,Be=/^true\/(.*)/,Oe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ue={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ue.optgroup=Ue.option,Ue.tbody=Ue.tfoot=Ue.colgroup=Ue.caption=Ue.thead,Ue.th=Ue.td,oe.fn.extend({text:function(t){return oe.access(this,function(t){return t===e?oe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||G).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=u(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=u(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var i,n=t?oe.filter(t,this):this,r=0;null!=(i=n[r]);r++)e||1!==i.nodeType||oe.cleanData(g(i)),i.parentNode&&(e&&oe.contains(i.ownerDocument,i)&&f(g(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(oe.cleanData(g(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return oe.clone(this,t,e)})},html:function(t){return oe.access(this,function(t){var i=this[0]||{},n=0,r=this.length;if(t===e&&1===i.nodeType)return i.innerHTML;if("string"==typeof t&&!Ie.test(t)&&!Ue[(Ae.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(ke,"<$1></$2>");try{for(;r>n;n++)i=this[n]||{},1===i.nodeType&&(oe.cleanData(g(i,!1)),i.innerHTML=t);i=0}catch(o){}}i&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=oe.map(this,function(t){return[t.nextSibling,t.parentNode]}),e=0;return this.domManip(arguments,function(i){var n=t[e++],r=t[e++];r&&(n&&n.parentNode!==r&&(n=this.nextSibling),oe(this).remove(),r.insertBefore(i,n))},!0),e?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e,i){t=J.apply([],t);var n,r,o,s,a,l,h=0,c=this.length,u=this,f=c-1,m=t[0],v=oe.isFunction(m);if(v||!(1>=c||"string"!=typeof m||oe.support.checkClone)&&Ne.test(m))return this.each(function(n){var r=u.eq(n);v&&(t[0]=m.call(this,n,r.html())),r.domManip(t,e,i)});if(c&&(n=oe.buildFragment(t,this[0].ownerDocument,!1,!i&&this),r=n.firstChild,1===n.childNodes.length&&(n=r),r)){for(o=oe.map(g(n,"script"),d),s=o.length;c>h;h++)a=n,h!==f&&(a=oe.clone(a,!0,!0),s&&oe.merge(o,g(a,"script"))),e.call(this[h],a,h);if(s)for(l=o[o.length-1].ownerDocument,oe.map(o,p),h=0;s>h;h++)a=o[h],ze.test(a.type||"")&&!ge.access(a,"globalEval")&&oe.contains(l,a)&&(a.src?oe._evalUrl(a.src):oe.globalEval(a.textContent.replace(Oe,"")))}return this}}),oe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){oe.fn[t]=function(t){for(var i,n=[],r=oe(t),o=r.length-1,s=0;o>=s;s++)i=s===o?this:this.clone(!0),oe(r[s])[e](i),Q.apply(n,i.get());return this.pushStack(n)}}),oe.extend({clone:function(t,e,i){var n,r,o,s,a=t.cloneNode(!0),l=oe.contains(t.ownerDocument,t);if(!(oe.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||oe.isXMLDoc(t)))for(s=g(a),o=g(t),n=0,r=o.length;r>n;n++)v(o[n],s[n]);if(e)if(i)for(o=o||g(t),s=s||g(a),n=0,r=o.length;r>n;n++)m(o[n],s[n]);else m(t,a);return s=g(a,"script"),s.length>0&&f(s,!l&&g(t,"script")),a},buildFragment:function(t,e,i,n){for(var r,o,s,a,l,h,c=0,u=t.length,d=e.createDocumentFragment(),p=[];u>c;c++)if(r=t[c],r||0===r)if("object"===oe.type(r))oe.merge(p,r.nodeType?[r]:r);else if(Le.test(r)){for(o=o||d.appendChild(e.createElement("div")),s=(Ae.exec(r)||["",""])[1].toLowerCase(),a=Ue[s]||Ue._default,o.innerHTML=a[1]+r.replace(ke,"<$1></$2>")+a[2],h=a[0];h--;)o=o.lastChild;oe.merge(p,o.childNodes),o=d.firstChild,o.textContent=""}else p.push(e.createTextNode(r));for(d.textContent="",c=0;r=p[c++];)if((!n||-1===oe.inArray(r,n))&&(l=oe.contains(r.ownerDocument,r),o=g(d.appendChild(r),"script"),l&&f(o),i))for(h=0;r=o[h++];)ze.test(r.type||"")&&i.push(r);return d},cleanData:function(t){for(var i,n,o,s,a,l,h=oe.event.special,c=0;(n=t[c])!==e;c++){if(r.accepts(n)&&(a=n[ge.expando],a&&(i=ge.cache[a]))){if(o=Object.keys(i.events||{}),o.length)for(l=0;(s=o[l])!==e;l++)h[s]?oe.event.remove(n,s):oe.removeEvent(n,s,i.handle);ge.cache[a]&&delete ge.cache[a]}delete me.cache[n[me.expando]]}},_evalUrl:function(t){return oe.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),oe.fn.extend({wrapAll:function(t){var e;return oe.isFunction(t)?this.each(function(e){oe(this).wrapAll(t.call(this,e))}):(this[0]&&(e=oe(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return this.each(oe.isFunction(t)?function(e){oe(this).wrapInner(t.call(this,e))}:function(){var e=oe(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=oe.isFunction(t);return this.each(function(i){oe(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){oe.nodeName(this,"body")||oe(this).replaceWith(this.childNodes)}).end()}});var Ve,je,We=/^(none|table(?!-c[ea]).+)/,Ge=/^margin/,Xe=RegExp("^("+se+")(.*)$","i"),Ze=RegExp("^("+se+")(?!px)[a-z%]+$","i"),Ye=RegExp("^([+-])=("+se+")","i"),qe={BODY:"block"},$e={position:"absolute",visibility:"hidden",display:"block"},Ke={letterSpacing:0,fontWeight:400},Je=["Top","Right","Bottom","Left"],Qe=["Webkit","O","Moz","ms"];oe.fn.extend({css:function(t,i){return oe.access(this,function(t,i,n){var r,o,s={},a=0;if(oe.isArray(i)){for(r=b(t),o=i.length;o>a;a++)s[i[a]]=oe.css(t,i[a],!1,r);return s}return n!==e?oe.style(t,i,n):oe.css(t,i)
  3. },t,i,arguments.length>1)},show:function(){return _(this,!0)},hide:function(){return _(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){E(this)?oe(this).show():oe(this).hide()})}}),oe.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Ve(t,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,i,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,a,l=oe.camelCase(i),h=t.style;return i=oe.cssProps[l]||(oe.cssProps[l]=y(h,l)),a=oe.cssHooks[i]||oe.cssHooks[l],n===e?a&&"get"in a&&(o=a.get(t,!1,r))!==e?o:h[i]:(s=typeof n,"string"===s&&(o=Ye.exec(n))&&(n=(o[1]+1)*o[2]+parseFloat(oe.css(t,i)),s="number"),null==n||"number"===s&&isNaN(n)||("number"!==s||oe.cssNumber[l]||(n+="px"),oe.support.clearCloneStyle||""!==n||0!==i.indexOf("background")||(h[i]="inherit"),a&&"set"in a&&(n=a.set(t,n,r))===e||(h[i]=n)),e)}},css:function(t,i,n,r){var o,s,a,l=oe.camelCase(i);return i=oe.cssProps[l]||(oe.cssProps[l]=y(t.style,l)),a=oe.cssHooks[i]||oe.cssHooks[l],a&&"get"in a&&(o=a.get(t,!0,n)),o===e&&(o=Ve(t,i,r)),"normal"===o&&i in Ke&&(o=Ke[i]),""===n||n?(s=parseFloat(o),n===!0||oe.isNumeric(s)?s||0:o):o}}),Ve=function(t,i,n){var r,o,s,a=n||b(t),l=a?a.getPropertyValue(i)||a[i]:e,h=t.style;return a&&(""!==l||oe.contains(t.ownerDocument,t)||(l=oe.style(t,i)),Ze.test(l)&&Ge.test(i)&&(r=h.width,o=h.minWidth,s=h.maxWidth,h.minWidth=h.maxWidth=h.width=l,l=a.width,h.width=r,h.minWidth=o,h.maxWidth=s)),l},oe.each(["height","width"],function(t,i){oe.cssHooks[i]={get:function(t,n,r){return n?0===t.offsetWidth&&We.test(oe.css(t,"display"))?oe.swap(t,$e,function(){return w(t,i,r)}):w(t,i,r):e},set:function(t,e,n){var r=n&&b(t);return T(t,e,n?x(t,i,n,oe.support.boxSizing&&"border-box"===oe.css(t,"boxSizing",!1,r),r):0)}}}),oe(function(){oe.support.reliableMarginRight||(oe.cssHooks.marginRight={get:function(t,i){return i?oe.swap(t,{display:"inline-block"},Ve,[t,"marginRight"]):e}}),!oe.support.pixelPosition&&oe.fn.position&&oe.each(["top","left"],function(t,i){oe.cssHooks[i]={get:function(t,n){return n?(n=Ve(t,i),Ze.test(n)?oe(t).position()[i]+"px":n):e}}})}),oe.expr&&oe.expr.filters&&(oe.expr.filters.hidden=function(t){return 0>=t.offsetWidth&&0>=t.offsetHeight},oe.expr.filters.visible=function(t){return!oe.expr.filters.hidden(t)}),oe.each({margin:"",padding:"",border:"Width"},function(t,e){oe.cssHooks[t+e]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];4>n;n++)r[t+Je[n]+e]=o[n]||o[n-2]||o[0];return r}},Ge.test(t)||(oe.cssHooks[t+e].set=T)});var ti=/%20/g,ei=/\[\]$/,ii=/\r?\n/g,ni=/^(?:submit|button|image|reset|file)$/i,ri=/^(?:input|select|textarea|keygen)/i;oe.fn.extend({serialize:function(){return oe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=oe.prop(this,"elements");return t?oe.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!oe(this).is(":disabled")&&ri.test(this.nodeName)&&!ni.test(t)&&(this.checked||!Fe.test(t))}).map(function(t,e){var i=oe(this).val();return null==i?null:oe.isArray(i)?oe.map(i,function(t){return{name:e.name,value:t.replace(ii,"\r\n")}}):{name:e.name,value:i.replace(ii,"\r\n")}}).get()}}),oe.param=function(t,i){var n,r=[],o=function(t,e){e=oe.isFunction(e)?e():null==e?"":e,r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(i===e&&(i=oe.ajaxSettings&&oe.ajaxSettings.traditional),oe.isArray(t)||t.jquery&&!oe.isPlainObject(t))oe.each(t,function(){o(this.name,this.value)});else for(n in t)M(n,t[n],i,o);return r.join("&").replace(ti,"+")},oe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){oe.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),oe.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}});var oi,si,ai=oe.now(),li=/\?/,hi=/#.*$/,ci=/([?&])_=[^&]*/,ui=/^(.*?):[ \t]*([^\r\n]*)$/gm,di=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,pi=/^(?:GET|HEAD)$/,fi=/^\/\//,mi=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,gi=oe.fn.load,vi={},yi={},Ei="*/".concat("*");try{si=W.href}catch(bi){si=G.createElement("a"),si.href="",si=si.href}oi=mi.exec(si.toLowerCase())||[],oe.fn.load=function(t,i,n){if("string"!=typeof t&&gi)return gi.apply(this,arguments);var r,o,s,a=this,l=t.indexOf(" ");return l>=0&&(r=t.slice(l),t=t.slice(0,l)),oe.isFunction(i)?(n=i,i=e):i&&"object"==typeof i&&(o="POST"),a.length>0&&oe.ajax({url:t,type:o,dataType:"html",data:i}).done(function(t){s=arguments,a.html(r?oe("<div>").append(oe.parseHTML(t)).find(r):t)}).complete(n&&function(t,e){a.each(n,s||[t.responseText,e,t])}),this},oe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){oe.fn[e]=function(t){return this.on(e,t)}}),oe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:si,type:"GET",isLocal:di.test(oi[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ei,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":oe.parseJSON,"text xml":oe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?D(D(t,oe.ajaxSettings),e):D(oe.ajaxSettings,t)},ajaxPrefilter:C(vi),ajaxTransport:C(yi),ajax:function(t,i){function n(t,i,n,a){var h,u,y,E,_,x=i;2!==b&&(b=2,l&&clearTimeout(l),r=e,s=a||"",T.readyState=t>0?4:0,h=t>=200&&300>t||304===t,n&&(E=P(d,T,n)),E=k(d,E,T,h),h?(d.ifModified&&(_=T.getResponseHeader("Last-Modified"),_&&(oe.lastModified[o]=_),_=T.getResponseHeader("etag"),_&&(oe.etag[o]=_)),204===t||"HEAD"===d.type?x="nocontent":304===t?x="notmodified":(x=E.state,u=E.data,y=E.error,h=!y)):(y=x,(t||!x)&&(x="error",0>t&&(t=0))),T.status=t,T.statusText=(i||x)+"",h?m.resolveWith(p,[u,x,T]):m.rejectWith(p,[T,x,y]),T.statusCode(v),v=e,c&&f.trigger(h?"ajaxSuccess":"ajaxError",[T,d,h?u:y]),g.fireWith(p,[T,x]),c&&(f.trigger("ajaxComplete",[T,d]),--oe.active||oe.event.trigger("ajaxStop")))}"object"==typeof t&&(i=t,t=e),i=i||{};var r,o,s,a,l,h,c,u,d=oe.ajaxSetup({},i),p=d.context||d,f=d.context&&(p.nodeType||p.jquery)?oe(p):oe.event,m=oe.Deferred(),g=oe.Callbacks("once memory"),v=d.statusCode||{},y={},E={},b=0,_="canceled",T={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!a)for(a={};e=ui.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return b||(t=E[i]=E[i]||t,y[t]=e),this},overrideMimeType:function(t){return b||(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>b)for(e in t)v[e]=[v[e],t[e]];else T.always(t[T.status]);return this},abort:function(t){var e=t||_;return r&&r.abort(e),n(0,e),this}};if(m.promise(T).complete=g.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||si)+"").replace(hi,"").replace(fi,oi[1]+"//"),d.type=i.method||i.type||d.method||d.type,d.dataTypes=oe.trim(d.dataType||"*").toLowerCase().match(ae)||[""],null==d.crossDomain&&(h=mi.exec(d.url.toLowerCase()),d.crossDomain=!(!h||h[1]===oi[1]&&h[2]===oi[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(oi[3]||("http:"===oi[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=oe.param(d.data,d.traditional)),H(vi,d,i,T),2===b)return T;c=d.global,c&&0===oe.active++&&oe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!pi.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(li.test(o)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=ci.test(o)?o.replace(ci,"$1_="+ai++):o+(li.test(o)?"&":"?")+"_="+ai++)),d.ifModified&&(oe.lastModified[o]&&T.setRequestHeader("If-Modified-Since",oe.lastModified[o]),oe.etag[o]&&T.setRequestHeader("If-None-Match",oe.etag[o])),(d.data&&d.hasContent&&d.contentType!==!1||i.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Ei+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)T.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();_="abort";for(u in{success:1,error:1,complete:1})T[u](d[u]);if(r=H(yi,d,i,T)){T.readyState=1,c&&f.trigger("ajaxSend",[T,d]),d.async&&d.timeout>0&&(l=setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,r.send(y,n)}catch(x){if(!(2>b))throw x;n(-1,x)}}else n(-1,"No Transport");return T},getJSON:function(t,e,i){return oe.get(t,e,i,"json")},getScript:function(t,i){return oe.get(t,e,i,"script")}}),oe.each(["get","post"],function(t,i){oe[i]=function(t,n,r,o){return oe.isFunction(n)&&(o=o||r,r=n,n=e),oe.ajax({url:t,type:i,dataType:o,data:n,success:r})}}),oe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return oe.globalEval(t),t}}}),oe.ajaxPrefilter("script",function(t){t.cache===e&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),oe.ajaxTransport("script",function(t){if(t.crossDomain){var e,i;return{send:function(n,r){e=oe("<script>").prop({async:!0,charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&r("error"===t.type?404:200,t.type)}),G.head.appendChild(e[0])},abort:function(){i&&i()}}}});var _i=[],Ti=/(=)\?(?=&|$)|\?\?/;oe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=_i.pop()||oe.expando+"_"+ai++;return this[t]=!0,t}}),oe.ajaxPrefilter("json jsonp",function(i,n,r){var o,s,a,l=i.jsonp!==!1&&(Ti.test(i.url)?"url":"string"==typeof i.data&&!(i.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ti.test(i.data)&&"data");return l||"jsonp"===i.dataTypes[0]?(o=i.jsonpCallback=oe.isFunction(i.jsonpCallback)?i.jsonpCallback():i.jsonpCallback,l?i[l]=i[l].replace(Ti,"$1"+o):i.jsonp!==!1&&(i.url+=(li.test(i.url)?"&":"?")+i.jsonp+"="+o),i.converters["script json"]=function(){return a||oe.error(o+" was not called"),a[0]},i.dataTypes[0]="json",s=t[o],t[o]=function(){a=arguments},r.always(function(){t[o]=s,i[o]&&(i.jsonpCallback=n.jsonpCallback,_i.push(o)),a&&oe.isFunction(s)&&s(a[0]),a=s=e}),"script"):e}),oe.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(t){}};var xi=oe.ajaxSettings.xhr(),wi={0:200,1223:204},Ri=0,Si={};t.ActiveXObject&&oe(t).on("unload",function(){for(var t in Si)Si[t]();Si=e}),oe.support.cors=!!xi&&"withCredentials"in xi,oe.support.ajax=xi=!!xi,oe.ajaxTransport(function(t){var i;return oe.support.cors||xi&&!t.crossDomain?{send:function(n,r){var o,s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)a.setRequestHeader(o,n[o]);i=function(t){return function(){i&&(delete Si[s],i=a.onload=a.onerror=null,"abort"===t?a.abort():"error"===t?r(a.status||404,a.statusText):r(wi[a.status]||a.status,a.statusText,"string"==typeof a.responseText?{text:a.responseText}:e,a.getAllResponseHeaders()))}},a.onload=i(),a.onerror=i("error"),i=Si[s=Ri++]=i("abort"),a.send(t.hasContent&&t.data||null)},abort:function(){i&&i()}}:e});var Mi,Ci,Hi=/^(?:toggle|show|hide)$/,Di=RegExp("^(?:([+-])=|)("+se+")([a-z%]*)$","i"),Pi=/queueHooks$/,ki=[N],Ai={"*":[function(t,e){var i=this.createTween(t,e),n=i.cur(),r=Di.exec(e),o=r&&r[3]||(oe.cssNumber[t]?"":"px"),s=(oe.cssNumber[t]||"px"!==o&&+n)&&Di.exec(oe.css(i.elem,t)),a=1,l=20;if(s&&s[3]!==o){o=o||s[3],r=r||[],s=+n||1;do a=a||".5",s/=a,oe.style(i.elem,t,s+o);while(a!==(a=i.cur()/n)&&1!==a&&--l)}return r&&(s=i.start=+s||+n||0,i.unit=o,i.end=r[1]?s+(r[1]+1)*r[2]:+r[2]),i}]};oe.Animation=oe.extend(I,{tweener:function(t,e){oe.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var i,n=0,r=t.length;r>n;n++)i=t[n],Ai[i]=Ai[i]||[],Ai[i].unshift(e)},prefilter:function(t,e){e?ki.unshift(t):ki.push(t)}}),oe.Tween=z,z.prototype={constructor:z,init:function(t,e,i,n,r,o){this.elem=t,this.prop=i,this.easing=r||"swing",this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(oe.cssNumber[i]?"":"px")},cur:function(){var t=z.propHooks[this.prop];return t&&t.get?t.get(this):z.propHooks._default.get(this)},run:function(t){var e,i=z.propHooks[this.prop];return this.pos=e=this.options.duration?oe.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=oe.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){oe.fx.step[t.prop]?oe.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[oe.cssProps[t.prop]]||oe.cssHooks[t.prop])?oe.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},oe.each(["toggle","show","hide"],function(t,e){var i=oe.fn[e];oe.fn[e]=function(t,n,r){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(B(e,!0),t,n,r)}}),oe.fn.extend({fadeTo:function(t,e,i,n){return this.filter(E).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var r=oe.isEmptyObject(t),o=oe.speed(e,i,n),s=function(){var e=I(this,oe.extend({},t),o);(r||ge.get(this,"finish"))&&e.stop(!0)};return s.finish=s,r||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(t,i,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=i,i=t,t=e),i&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,i=null!=t&&t+"queueHooks",o=oe.timers,s=ge.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&Pi.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));(e||!n)&&oe.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,i=ge.get(this),n=i[t+"queue"],r=i[t+"queueHooks"],o=oe.timers,s=n?n.length:0;for(i.finish=!0,oe.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;s>e;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),oe.each({slideDown:B("show"),slideUp:B("hide"),slideToggle:B("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){oe.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),oe.speed=function(t,e,i){var n=t&&"object"==typeof t?oe.extend({},t):{complete:i||!i&&e||oe.isFunction(t)&&t,duration:t,easing:i&&e||e&&!oe.isFunction(e)&&e};return n.duration=oe.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in oe.fx.speeds?oe.fx.speeds[n.duration]:oe.fx.speeds._default,(null==n.queue||n.queue===!0)&&(n.queue="fx"),n.old=n.complete,n.complete=function(){oe.isFunction(n.old)&&n.old.call(this),n.queue&&oe.dequeue(this,n.queue)},n},oe.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},oe.timers=[],oe.fx=z.prototype.init,oe.fx.tick=function(){var t,i=oe.timers,n=0;for(Mi=oe.now();i.length>n;n++)t=i[n],t()||i[n]!==t||i.splice(n--,1);i.length||oe.fx.stop(),Mi=e},oe.fx.timer=function(t){t()&&oe.timers.push(t)&&oe.fx.start()},oe.fx.interval=13,oe.fx.start=function(){Ci||(Ci=setInterval(oe.fx.tick,oe.fx.interval))},oe.fx.stop=function(){clearInterval(Ci),Ci=null},oe.fx.speeds={slow:600,fast:200,_default:400},oe.fx.step={},oe.expr&&oe.expr.filters&&(oe.expr.filters.animated=function(t){return oe.grep(oe.timers,function(e){return t===e.elem}).length}),oe.fn.offset=function(t){if(arguments.length)return t===e?this:this.each(function(e){oe.offset.setOffset(this,t,e)});var i,n,r=this[0],o={top:0,left:0},s=r&&r.ownerDocument;return s?(i=s.documentElement,oe.contains(i,r)?(typeof r.getBoundingClientRect!==j&&(o=r.getBoundingClientRect()),n=O(s),{top:o.top+n.pageYOffset-i.clientTop,left:o.left+n.pageXOffset-i.clientLeft}):o):void 0},oe.offset={setOffset:function(t,e,i){var n,r,o,s,a,l,h,c=oe.css(t,"position"),u=oe(t),d={};"static"===c&&(t.style.position="relative"),a=u.offset(),o=oe.css(t,"top"),l=oe.css(t,"left"),h=("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1,h?(n=u.position(),s=n.top,r=n.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),oe.isFunction(e)&&(e=e.call(t,i,a)),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+r),"using"in e?e.using.call(t,d):u.css(d)}},oe.fn.extend({position:function(){if(this[0]){var t,e,i=this[0],n={top:0,left:0};return"fixed"===oe.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),oe.nodeName(t[0],"html")||(n=t.offset()),n.top+=oe.css(t[0],"borderTopWidth",!0),n.left+=oe.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-oe.css(i,"marginTop",!0),left:e.left-n.left-oe.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||X;t&&!oe.nodeName(t,"html")&&"static"===oe.css(t,"position");)t=t.offsetParent;return t||X})}}),oe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(i,n){var r="pageYOffset"===n;oe.fn[i]=function(o){return oe.access(this,function(i,o,s){var a=O(i);return s===e?a?a[n]:i[o]:(a?a.scrollTo(r?t.pageXOffset:s,r?s:t.pageYOffset):i[o]=s,e)},i,o,arguments.length,null)}}),oe.each({Height:"height",Width:"width"},function(t,i){oe.each({padding:"inner"+t,content:i,"":"outer"+t},function(n,r){oe.fn[r]=function(r,o){var s=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||o===!0?"margin":"border");return oe.access(this,function(i,n,r){var o;return oe.isWindow(i)?i.document.documentElement["client"+t]:9===i.nodeType?(o=i.documentElement,Math.max(i.body["scroll"+t],o["scroll"+t],i.body["offset"+t],o["offset"+t],o["client"+t])):r===e?oe.css(i,n,a):oe.style(i,n,r,a)},i,s?r:e,s,null)}})}),oe.fn.size=function(){return this.length},oe.fn.andSelf=oe.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=oe:"function"==typeof define&&define.amd&&define("jquery",[],function(){return oe}),"object"==typeof t&&"object"==typeof t.document&&(t.jQuery=t.$=oe)}(window),function(t,e){function i(e,i){var r,o,s,a=e.nodeName.toLowerCase();return"area"===a?(r=e.parentNode,o=r.name,e.href&&o&&"map"===r.nodeName.toLowerCase()?(s=t("img[usemap=#"+o+"]")[0],!!s&&n(s)):!1):(/input|select|textarea|button|object/.test(a)?!e.disabled:"a"===a?e.href||i:i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var r=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.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}}),t.fn.extend({focus:function(e){return function(i,n){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),n&&n.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var n,r,o=t(this[0]);o.length&&o[0]!==document;){if(n=o.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(r=parseInt(o.css("zIndex"),10),!isNaN(r)&&0!==r))return r;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++r)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var n=t.attr(e,"tabindex"),r=isNaN(n);return(r||n>=0)&&i(e,!r)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,n){function r(e,i,n,r){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),r&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===n?["Left","Right"]:["Top","Bottom"],s=n.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(i){return i===e?a["inner"+n].call(this):this.each(function(){t(this).css(s,r(this,i)+"px")})},t.fn["outer"+n]=function(e,i){return"number"!=typeof e?a["outer"+n].call(this,e):this.each(function(){t(this).css(s,r(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,n){var r,o=t.ui[e].prototype;for(r in n)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([i,n[r]])},call:function(t,e,i){var n,r=t.plugins[e];if(r&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(n=0;n<r.length;n++)t.options[r[n][0]]&&r[n][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",r=!1;return e[n]>0?!0:(e[n]=1,r=e[n]>0,e[n]=0,r)}})}(jQuery),function(t,e){var i=0,n=Array.prototype.slice,r=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(o){}r(e)},t.widget=function(e,i,n){var r,o,s,a,l={},h=e.split(".")[0];e=e.split(".")[1],r=h+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][r.toLowerCase()]=function(e){return!!t.data(e,r)},t[h]=t[h]||{},o=t[h][e],s=t[h][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new s(t,e)},t.extend(s,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,n){return t.isFunction(n)?void(l[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},r=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=r,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(l[e]=n)}),s.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix:e},l,{constructor:s,namespace:h,widgetName:e,widgetFullName:r}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,s,i._proto)}),delete o._childConstructors):i._childConstructors.push(s),t.widget.bridge(e,s)},t.widget.extend=function(i){for(var r,o,s=n.call(arguments,1),a=0,l=s.length;l>a;a++)for(r in s[a])o=s[a][r],s[a].hasOwnProperty(r)&&o!==e&&(i[r]=t.isPlainObject(o)?t.isPlainObject(i[r])?t.widget.extend({},i[r],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,r){var o=r.prototype.widgetFullName||i;t.fn[i]=function(s){var a="string"==typeof s,l=n.call(arguments,1),h=this;return s=!a&&l.length?t.widget.extend.apply(null,[s].concat(l)):s,this.each(a?function(){var n,r=t.data(this,o);return r?t.isFunction(r[s])&&"_"!==s.charAt(0)?(n=r[s].apply(r,l),n!==r&&n!==e?(h=n&&n.jquery?h.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+s+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+s+"'")}:function(){var e=t.data(this,o);e?e.option(s||{})._init():t.data(this,o,new r(s,this))}),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.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:t.noop,widget:function(){return this.element},option:function(i,n){var r,o,s,a=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(a={},r=i.split("."),i=r.shift(),r.length){for(o=a[i]=t.widget.extend({},this.options[i]),s=0;s<r.length-1;s++)o[r[s]]=o[r[s]]||{},o=o[r[s]];if(i=r.pop(),n===e)return o[i]===e?null:o[i];o[i]=n}else{if(n===e)return this.options[i]===e?null:this.options[i];a[i]=n}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(e,i,n){var r,o=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=r=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,r=this.widget()),t.each(n,function(n,s){function a(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof s?o[s]:s).apply(o,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?r.delegate(c,h,a):i.bind(h,a)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?n[t]:t).apply(n,arguments)}var n=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,n){var r,o,s=this.options[e];if(n=n||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(r in o)r in i||(i[r]=o[r]);return this.element.trigger(i,n),!(t.isFunction(s)&&s.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,r,o){"string"==typeof r&&(r={effect:r});var s,a=r?r===!0||"number"==typeof r?i:r.effect||i:e;r=r||{},"number"==typeof r&&(r={duration:r}),s=!t.isEmptyObject(r),r.complete=o,r.delay&&n.delay(r.delay),s&&t.effects&&t.effects.effect[a]?n[e](r):a!==e&&n[a]?n[a](r.duration,r.easing,o):n.queue(function(i){t(this)[e](),o&&o.call(n[0]),i()})}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var n=this,r=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return r&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance
  4. },_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t){t.widget("ui.draggable",t.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(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.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,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(this._trigger("drag",e,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"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.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 e,i,n,r=this.options;return r.containment?"window"===r.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===r.containment?void(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):r.containment.constructor===Array?void(this.containment=r.containment):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),i=t(r.containment),n=i[0],void(n&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i))):void(this.containment=null)},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*n}},_generatePosition:function(e){var i,n,r,o,s=this.options,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:a.scrollTop(),left:a.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(n=this.relative_container.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),s.grid&&(r=s.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,h=i?r-this.offset.click.top>=i[1]||r-this.offset.click.top>i[3]?r:r-this.offset.click.top>=i[1]?r-s.grid[1]:r+s.grid[1]:r,o=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-s.grid[0]:o+s.grid[0]:o)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-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(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var n=t(this).data("ui-draggable"),r=n.options,o=t.extend({},i,{item:n.element});n.sortables=[],t(r.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(n.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var n=t(this).data("ui-draggable"),r=t.extend({},i,{item:n.element});t.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(e),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",e,r))})},drag:function(e,i){var n=t(this).data("ui-draggable"),r=this;t.each(n.sortables,function(){var o=!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)&&(o=!0,t.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)&&t.contains(s.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(r).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 i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!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",e),n.dropped=this.instance.element,n.currentItem=n.element,this.instance.fromOutside=n),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),n._trigger("fromSortable",e),n.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var n=t(i.helper),r=t(this).data("ui-draggable").options;n.css("opacity")&&(r._opacity=n.css("opacity")),n.css("opacity",r.opacity)},stop:function(e,i){var n=t(this).data("ui-draggable").options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),n=i.options,r=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<n.scrollSensitivity?i.scrollParent[0].scrollTop=r=i.scrollParent[0].scrollTop+n.scrollSpeed:e.pageY-i.overflowOffset.top<n.scrollSensitivity&&(i.scrollParent[0].scrollTop=r=i.scrollParent[0].scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<n.scrollSensitivity?i.scrollParent[0].scrollLeft=r=i.scrollParent[0].scrollLeft+n.scrollSpeed:e.pageX-i.overflowOffset.left<n.scrollSensitivity&&(i.scrollParent[0].scrollLeft=r=i.scrollParent[0].scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(document).scrollTop()<n.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<n.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(document).scrollLeft()<n.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<n.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+n.scrollSpeed)))),r!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),n=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:n.top,left:n.left})})},drag:function(e,i){var n,r,o,s,a,l,h,c,u,d,p=t(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,y=i.offset.top,E=y+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)a=p.snapElements[u].left,l=a+p.snapElements[u].width,h=p.snapElements[u].top,c=h+p.snapElements[u].height,a-m>v||g>l+m||h-m>E||y>c+m||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(n=Math.abs(h-E)<=m,r=Math.abs(c-y)<=m,o=Math.abs(a-v)<=m,s=Math.abs(l-g)<=m,n&&(i.position.top=p._convertPositionTo("relative",{top:h-p.helperProportions.height,left:0}).top-p.margins.top),r&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:a-p.helperProportions.width}).left-p.margins.left),s&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=n||r||o||s,"outer"!==f.snapMode&&(n=Math.abs(h-y)<=m,r=Math.abs(c-E)<=m,o=Math.abs(a-g)<=m,s=Math.abs(l-v)<=m,n&&(i.position.top=p._convertPositionTo("relative",{top:h,left:0}).top-p.margins.top),r&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:a}).left-p.margins.left),s&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(n||r||o||s||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=n||r||o||s||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,n=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});n.length&&(e=parseInt(t(n[0]).css("zIndex"),10)||0,t(n).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+n.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var n=t(i.helper),r=t(this).data("ui-draggable").options;n.css("zIndex")&&(r._zIndex=n.css("zIndex")),n.css("zIndex",r.zIndex)},stop:function(e,i){var n=t(this).data("ui-draggable").options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.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 e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];e<i.length;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var n=i||t.ui.ddmanager.current,r=!1;return n&&(n.currentItem||n.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===n.options.scope&&e.accept.call(e.element[0],n.currentItem||n.element)&&t.ui.intersect(n,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(r=!0,!1):void 0}),r?!1:this.accept.call(this.element[0],n.currentItem||n.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(n)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,n){if(!i.offset)return!1;var r,o,s=(t.positionAbs||t.position.absolute).left,a=s+t.helperProportions.width,l=(t.positionAbs||t.position.absolute).top,h=l+t.helperProportions.height,c=i.offset.left,u=c+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(n){case"fit":return s>=c&&u>=a&&l>=d&&p>=h;case"intersect":return c<s+t.helperProportions.width/2&&a-t.helperProportions.width/2<u&&d<l+t.helperProportions.height/2&&h-t.helperProportions.height/2<p;case"pointer":return r=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(o,d,i.proportions.height)&&e(r,c,i.proportions.width);case"touch":return(l>=d&&p>=l||h>=d&&p>=h||d>l&&h>p)&&(s>=c&&u>=s||a>=c&&u>=a||c>s&&a>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var n,r,o=t.ui.ddmanager.droppables[e.options.scope]||[],s=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(n=0;n<o.length;n++)if(!(o[n].options.disabled||e&&!o[n].accept.call(o[n].element[0],e.currentItem||e.element))){for(r=0;r<a.length;r++)if(a[r]===o[n].element[0]){o[n].proportions.height=0;continue t}o[n].visible="none"!==o[n].element.css("display"),o[n].visible&&("mousedown"===s&&o[n]._activate.call(o[n],i),o[n].offset=o[n].element.offset(),o[n].proportions={width:o[n].element[0].offsetWidth,height:o[n].element[0].offsetHeight})}},drop:function(e,i){var n=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),n},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,r,o,s=t.ui.intersect(e,this,this.options.tolerance),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(r=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===r}),o.length&&(n=t.data(o[0],"ui-droppable"),n.greedyChild="isover"===a)),n&&"isover"===a&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),n&&"isout"===a&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,n,r,o,s=this,a=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;i<e.length;i++)n=t.trim(e[i]),o="ui-resizable-"+n,r=t("<div class='ui-resizable-handle "+o+"'></div>"),r.css({zIndex:a.zIndex}),"se"===n&&r.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[n]=".ui-resizable-"+n,this.element.append(r);this._renderAxis=function(e){var i,n,r,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(n=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),r=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(r,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){s.resizing||(this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),s.axis=r&&r[1]?r[1]:"se")}),a.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(t(this).removeClass("ui-resizable-autohide"),s._handles.show())}).mouseleave(function(){a.disabled||s.resizing||(t(this).addClass("ui-resizable-autohide"),s._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,n,r=!1;for(i in this.handles)n=t(this.handles[i])[0],(n===e.target||t.contains(n,e.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(i){var n,r,o,s=this.options,a=this.element.position(),l=this.element;return this.resizing=!0,/absolute/.test(l.css("position"))?l.css({position:"absolute",top:l.css("top"),left:l.css("left")}):l.is(".ui-draggable")&&l.css({position:"absolute",top:a.top,left:a.left}),this._renderProxy(),n=e(this.helper.css("left")),r=e(this.helper.css("top")),s.containment&&(n+=t(s.containment).scrollLeft()||0,r+=t(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:r},this.size=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalSize=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalPosition={left:n,top:r},this.sizeDiff={width:l.outerWidth()-l.width(),height:l.outerHeight()-l.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),l.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,n=this.helper,r={},o=this.originalMousePosition,s=this.axis,a=this.position.top,l=this.position.left,h=this.size.width,c=this.size.height,u=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[s];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==a&&(r.top=this.position.top+"px"),this.position.left!==l&&(r.left=this.position.left+"px"),this.size.width!==h&&(r.width=this.size.width+"px"),this.size.height!==c&&(r.height=this.size.height+"px"),n.css(r),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(r)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,n,r,o,s,a,l,h=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),r=n&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=n?0:c.sizeDiff.width,s={width:c.helper.width()-o,height:c.helper.height()-r},a=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,l=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,h.animate||this.element.css(t.extend(s,{top:l,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,n,r,o,s,a=this.options;s={minWidth:i(a.minWidth)?a.minWidth:0,maxWidth:i(a.maxWidth)?a.maxWidth:1/0,minHeight:i(a.minHeight)?a.minHeight:0,maxHeight:i(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=s.minHeight*this.aspectRatio,r=s.minWidth/this.aspectRatio,n=s.maxHeight*this.aspectRatio,o=s.maxWidth/this.aspectRatio,e>s.minWidth&&(s.minWidth=e),r>s.minHeight&&(s.minHeight=r),n<s.maxWidth&&(s.maxWidth=n),o<s.maxHeight&&(s.maxHeight=o)),this._vBoundaries=s},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)
  5. },_updateRatio:function(t){var e=this.position,n=this.size,r=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===r&&(t.left=e.left+(n.width-t.width),t.top=null),"nw"===r&&(t.top=e.top+(n.height-t.height),t.left=e.left+(n.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,n=this.axis,r=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,s=i(t.width)&&e.minWidth&&e.minWidth>t.width,a=i(t.height)&&e.minHeight&&e.minHeight>t.height,l=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,c=/sw|nw|w/.test(n),u=/nw|ne|n/.test(n);return s&&(t.width=e.minWidth),a&&(t.height=e.minHeight),r&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),s&&c&&(t.left=l-e.minWidth),r&&c&&(t.left=l-e.maxWidth),a&&u&&(t.top=h-e.minHeight),o&&u&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,n,r,o=this.helper||this.element;for(t=0;t<this._proportionallyResizeElements.length;t++){if(r=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[r.css("borderTopWidth"),r.css("borderRightWidth"),r.css("borderBottomWidth"),r.css("borderLeftWidth")],n=[r.css("paddingTop"),r.css("paddingRight"),r.css("paddingBottom"),r.css("paddingLeft")],e=0;e<i.length;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(n[e],10)||0);r.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,n=this.originalPosition;return{left:n.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize,r=this.originalPosition;return{top:r.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),n=i.options,r=i._proportionallyResizeElements,o=r.length&&/textarea/i.test(r[0].nodeName),s=o&&t.ui.hasScroll(r[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-s},h=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&h?{top:c,left:h}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};r&&r.length&&t(r[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,n,r,o,s,a,l,h=t(this).data("ui-resizable"),c=h.options,u=h.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(h.containerElement=t(p),/document/.test(d)||d===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),n=[],t(["Top","Right","Left","Bottom"]).each(function(t,r){n[t]=e(i.css("padding"+r))}),h.containerOffset=i.offset(),h.containerPosition=i.position(),h.containerSize={height:i.innerHeight()-n[3],width:i.innerWidth()-n[1]},r=h.containerOffset,o=h.containerSize.height,s=h.containerSize.width,a=t.ui.hasScroll(p,"left")?p.scrollWidth:s,l=t.ui.hasScroll(p)?p.scrollHeight:o,h.parentData={element:p,left:r.left,top:r.top,width:a,height:l}))},resize:function(e){var i,n,r,o,s=t(this).data("ui-resizable"),a=s.options,l=s.containerOffset,h=s.position,c=s._aspectRatio||e.shiftKey,u={top:0,left:0},d=s.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=l),h.left<(s._helper?l.left:0)&&(s.size.width=s.size.width+(s._helper?s.position.left-l.left:s.position.left-u.left),c&&(s.size.height=s.size.width/s.aspectRatio),s.position.left=a.helper?l.left:0),h.top<(s._helper?l.top:0)&&(s.size.height=s.size.height+(s._helper?s.position.top-l.top:s.position.top),c&&(s.size.width=s.size.height*s.aspectRatio),s.position.top=s._helper?l.top:0),s.offset.left=s.parentData.left+s.position.left,s.offset.top=s.parentData.top+s.position.top,i=Math.abs((s._helper?s.offset.left-u.left:s.offset.left-u.left)+s.sizeDiff.width),n=Math.abs((s._helper?s.offset.top-u.top:s.offset.top-l.top)+s.sizeDiff.height),r=s.containerElement.get(0)===s.element.parent().get(0),o=/relative|absolute/.test(s.containerElement.css("position")),r&&o&&(i-=s.parentData.left),i+s.size.width>=s.parentData.width&&(s.size.width=s.parentData.width-i,c&&(s.size.height=s.size.width/s.aspectRatio)),n+s.size.height>=s.parentData.height&&(s.size.height=s.parentData.height-n,c&&(s.size.width=s.size.height*s.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.containerOffset,r=e.containerPosition,o=e.containerElement,s=t(e.helper),a=s.offset(),l=s.outerWidth()-e.sizeDiff.width,h=s.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:a.left-r.left-n.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:a.left-r.left-n.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,n=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?n(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],n(i.alsoResize)):t.each(i.alsoResize,function(t){n(t)})},resize:function(e,i){var n=t(this).data("ui-resizable"),r=n.options,o=n.originalSize,s=n.originalPosition,a={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-s.top||0,left:n.position.left-s.left||0},l=function(e,n){t(e).each(function(){var e=t(this),r=t(this).data("ui-resizable-alsoresize"),o={},s=n&&n.length?n:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(s,function(t,e){var i=(r[e]||0)+(a[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof r.alsoResize||r.alsoResize.nodeType?l(r.alsoResize):t.each(r.alsoResize,function(t,e){l(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.size,r=e.originalSize,o=e.originalPosition,s=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,h=a[1]||1,c=Math.round((n.width-r.width)/l)*l,u=Math.round((n.height-r.height)/h)*h,d=r.width+c,p=r.height+u,f=i.maxWidth&&i.maxWidth<d,m=i.maxHeight&&i.maxHeight<p,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=a,g&&(d+=l),v&&(p+=h),f&&(d-=l),m&&(p-=h),/^(se|s|e)$/.test(s)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(s)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(s)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-c)}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,n=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(n.filter,this.element[0]),this._trigger("start",e),t(n.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=t.data(this,"selectable-item");n.startselected=!0,e.metaKey||e.ctrlKey||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element}))}),t(e.target).parents().addBack().each(function(){var n,r=t.data(this,"selectable-item");return r?(n=!e.metaKey&&!e.ctrlKey||!r.$element.hasClass("ui-selected"),r.$element.removeClass(n?"ui-unselecting":"ui-selected").addClass(n?"ui-selecting":"ui-unselecting"),r.unselecting=!n,r.selecting=n,r.selected=n,n?i._trigger("selecting",e,{selecting:r.element}):i._trigger("unselecting",e,{unselecting:r.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,n=this,r=this.options,o=this.opos[0],s=this.opos[1],a=e.pageX,l=e.pageY;return o>a&&(i=a,a=o,o=i),s>l&&(i=l,l=s,s=i),this.helper.css({left:o,top:s,width:a-o,height:l-s}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1;i&&i.element!==n.element[0]&&("touch"===r.tolerance?h=!(i.left>a||i.right<o||i.top>l||i.bottom<s):"fit"===r.tolerance&&(h=i.left>o&&i.right<a&&i.top>s&&i.bottom<l),h?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,n._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");n.$element.removeClass("ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",e,{unselected:n.element})}),t(".ui-selecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");n.$element.removeClass("ui-selecting").addClass("ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",e,{selected:n.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var n=null,r=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(n=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(n=t(e.target)),n&&(!this.options.handle||i||(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(r=!0)}),r))?(this.currentItem=n,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(e,i,n){var r,o,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",s.cursor),this.storedStylesheet=t("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,r,o,s=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(e.pageY-t(document).scrollTop()<s.scrollSensitivity?a=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(a=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed)),e.pageX-t(document).scrollLeft()<s.scrollSensitivity?a=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(a=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed))),a!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),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"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],r=n.item[0],o=this._intersectsWithPointer(n),o&&n.instance===this.currentContainer&&r!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==r&&!t.contains(this.placeholder[0],r)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],r):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var n=this,r=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(s.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,r=n+this.helperProportions.height,o=t.left,s=o+t.width,a=t.top,l=a+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||n+h>a&&l>n+h,d="y"===this.options.axis||e+c>o&&s>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<s&&a<n+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),r=i&&n,o=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return r?this.floating?s&&"right"===s||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),r=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&n||"left"===o&&!n:r&&("down"===r&&i||"up"===r&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,n,r,o,s=[],a=[],l=this._connectWith();if(l&&e)for(i=l.length-1;i>=0;i--)for(r=t(l[i]),n=r.length-1;n>=0;n--)o=t.data(r[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&a.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(a.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=a.length-1;i>=0;i--)a[i][0].each(function(){s.push(this)});return t(s)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,n,r,o,s,a,l,h,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(r=t(d[i]),n=r.length-1;n>=0;n--)o=t.data(r[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(s=u[i][1],a=u[i][0],n=0,h=a.length;h>n;n++)l=t(a[n]),l.data(this.widgetName+"-item",s),c.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,r,o;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=r.outerWidth(),n.height=r.outerHeight()),o=r.offset(),n.left=o.left,n.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),r=t("<"+n+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===n?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(r)}):"img"===n&&r.attr("src",e.currentItem.attr("src")),i||r.css("visibility","hidden"),r},update:function(t,r){(!i||n.forcePlaceholderSize)&&(r.height()||r.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_contactContainers:function(n){var r,o,s,a,l,h,c,u,d,p,f=null,m=null;for(r=this.containers.length-1;r>=0;r--)if(!t.contains(this.currentItem[0],this.containers[r].element[0]))if(this._intersectsWith(this.containers[r].containerCache)){if(f&&t.contains(this.containers[r].element[0],f.element[0]))continue;f=this.containers[r],m=r}else this.containers[r].containerCache.over&&(this.containers[r]._trigger("out",n,this._uiHash(this)),this.containers[r].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",n,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(s=1e4,a=null,p=f.floating||i(this.currentItem),l=p?"left":"top",h=p?"width":"height",c=this.positionAbs[l]+this.offset.click[l],o=this.items.length-1;o>=0;o--)t.contains(this.containers[m].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[l],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][h]-c)&&(d=!0,u+=this.items[o][h]),Math.abs(u-c)<s&&(s=Math.abs(u-c),a=this.items[o],this.direction=d?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;a?this._rearrange(n,a,null,!0):this._rearrange(n,null,this.containers[m].element,!0),this._trigger("change",n,this._uiHash()),this.containers[m]._trigger("change",n,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",n,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!n[0].style.width||i.forceHelperSize)&&n.width(this.currentItem.width()),(!n[0].style.height||i.forceHelperSize)&&n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,r=this.options;"parent"===r.containment&&(r.containment=this.helper[0].parentNode),("document"===r.containment||"window"===r.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===r.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===r.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(e=t(r.containment)[0],i=t(r.containment).offset(),n="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])
  6. },_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(r[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*n}},_generatePosition:function(e){var i,n,r=this.options,o=e.pageX,s=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),r.grid&&(i=this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1],s=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-r.grid[1]:i+r.grid[1]:i,n=this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0],o=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-r.grid[0]:n+r.grid[0]:n)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!n)})},_clear:function(t,e){this.reverting=!1;var i,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||n.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;i<n.length;i++)n[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;i<n.length;i++)n[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var n=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:n.max<t?n.max:t)}function n(e){var i=h(),n=i._rgba=[];return e=e.toLowerCase(),f(l,function(t,r){var o,s=r.re.exec(e),a=s&&r.parse(s),l=r.space||"rgba";return a?(o=i[l](a),i[c[l].cache]=o[c[l].cache],n=i._rgba=o._rgba,!1):void 0}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),i):o[e]}function r(t,e,i){return i=(i+1)%1,1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}var o,s="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",a=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,n,r){return new t.Color.fn.parse(e,i,n,r)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(r,s,a,l){if(r===e)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=t(r).css(s),s=e);var u=this,d=t.type(r),p=this._rgba=[];return s!==e&&(r=[r,s,a,l],d="array"),"string"===d?this.parse(n(r)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(r[e.idx],e)}),this):"object"===d?(r instanceof h?f(c,function(t,e){r[e.cache]&&(u[e.cache]=r[e.cache].slice())}):f(c,function(e,n){var o=n.cache;f(n.props,function(t,e){if(!u[o]&&n.to){if("alpha"===t||null==r[t])return;u[o]=n.to(u._rgba)}u[o][e.idx]=i(r[t],e,!0)}),u[o]&&t.inArray(null,u[o].slice(0,3))<0&&(u[o][3]=1,n.from&&(u._rgba=n.from(u[o])))}),this):void 0},is:function(t){var e=h(t),i=!0,n=this;return f(c,function(t,r){var o,s=e[r.cache];return s&&(o=n[r.cache]||r.to&&r.to(n._rgba)||[],f(r.props,function(t,e){return null!=s[e.idx]?i=s[e.idx]===o[e.idx]:void 0})),i}),i},_space:function(){var t=[],e=this;return f(c,function(i,n){e[n.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var n=h(t),r=n._space(),o=c[r],s=0===this.alpha()?h("transparent"):this,a=s[o.cache]||o.to(s._rgba),l=a.slice();return n=n[o.cache],f(o.props,function(t,r){var o=r.idx,s=a[o],h=n[o],c=u[r.type]||{};null!==h&&(null===s?l[o]=h:(c.mod&&(h-s>c.mod/2?s+=c.mod:s-h>c.mod/2&&(s-=c.mod)),l[o]=i((h-s)*e+s,r)))}),this[r](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),r=h(e)._rgba;return h(t.map(i,function(t,e){return(1-n)*r[e]+n*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),n=i.pop();return e&&i.push(~~(255*n)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,s=t[3],a=Math.max(n,r,o),l=Math.min(n,r,o),h=a-l,c=a+l,u=.5*c;return e=l===a?0:n===a?60*(r-o)/h+360:r===a?60*(o-n)/h+120:60*(n-r)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==s?1:s]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],n=t[2],o=t[3],s=.5>=n?n*(1+i):n+i-n*i,a=2*n-s;return[Math.round(255*r(a,s,e+1/3)),Math.round(255*r(a,s,e)),Math.round(255*r(a,s,e-1/3)),o]},f(c,function(n,r){var o=r.props,s=r.cache,l=r.to,c=r.from;h.fn[n]=function(n){if(l&&!this[s]&&(this[s]=l(this._rgba)),n===e)return this[s].slice();var r,a=t.type(n),u="array"===a||"object"===a?n:arguments,d=this[s].slice();return f(o,function(t,e){var n=u["object"===a?t:e.idx];null==n&&(n=d[e.idx]),d[e.idx]=i(n,e)}),c?(r=h(c(d)),r[s]=d,r):h(d)},f(o,function(e,i){h.fn[e]||(h.fn[e]=function(r){var o,s=t.type(r),l="alpha"===e?this._hsla?"hsla":"rgba":n,h=this[l](),c=h[i.idx];return"undefined"===s?c:("function"===s&&(r=r.call(this,c),s=t.type(r)),null==r&&i.empty?this:("string"===s&&(o=a.exec(r),o&&(r=c+parseFloat(o[2])*("+"===o[1]?1:-1))),h[i.idx]=r,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,r){var o,s,a="";if("transparent"!==r&&("string"!==t.type(r)||(o=n(r)))){if(r=h(o||r),!d.rgba&&1!==r._rgba[3]){for(s="backgroundColor"===i?e.parentNode:e;(""===a||"transparent"===a)&&s&&s.style;)try{a=t.css(s,"backgroundColor"),s=s.parentNode}catch(l){}r=r.blend(a&&"transparent"!==a?a:"_default")}r=r.toRgbaString()}try{e.style[i]=r}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(s),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,n){e["border"+n+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(n=r.length;n--;)i=r[n],"string"==typeof r[i]&&(o[t.camelCase(i)]=r[i]);else for(i in r)"string"==typeof r[i]&&(o[i]=r[i]);return o}function n(e,i){var n,r,s={};for(n in i)r=i[n],e[n]!==r&&(o[n]||(t.fx.step[n]||!isNaN(parseFloat(r)))&&(s[n]=r));return s}var r=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,o,s,a){var l=t.speed(o,s,a);return this.queue(function(){var o,s=t(this),a=s.attr("class")||"",h=l.children?s.find("*").addBack():s;h=h.map(function(){var e=t(this);return{el:e,start:i(this)}}),o=function(){t.each(r,function(t,i){e[i]&&s[i+"Class"](e[i])})},o(),h=h.map(function(){return this.end=i(this.el[0]),this.diff=n(this.start,this.end),this}),s.attr("class",a),h=h.map(function(){var e=this,i=t.Deferred(),n=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,n),i.promise()}),t.when.apply(t,h.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(s[0])})})},t.fn.extend({addClass:function(e){return function(i,n,r,o){return n?t.effects.animateClass.call(this,{add:i},n,r,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,n,r,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,r,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(n,r,o,s,a){return"boolean"==typeof r||r===e?o?t.effects.animateClass.call(this,r?{add:n}:{remove:n},o,s,a):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:n},r,o,s)}}(t.fn.toggleClass),switchClass:function(e,i,n,r,o){return t.effects.animateClass.call(this,{add:i,remove:e},n,r,o)}})}(),function(){function n(e,i,n,r){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(r=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(r=n,n=i,i={}),t.isFunction(n)&&(r=n,n=null),i&&t.extend(e,i),n=n||i.duration,e.duration=t.fx.off?0:"number"==typeof n?n:n in t.fx.speeds?t.fx.speeds[n]:t.fx.speeds._default,e.complete=r||i.complete,e}function r(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var n=0;n<e.length;n++)null!==e[n]&&t.data(i+e[n],t[0].style[e[n]])},restore:function(t,n){var r,o;for(o=0;o<n.length;o++)null!==n[o]&&(r=t.data(i+n[o]),r===e&&(r=""),t.css(n[o],r))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,n;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},n=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(s){o=document.body}return e.wrap(n),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(r),n.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,n,r){return r=r||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(r[i]=o[0]*n+o[1])}),r}}),t.fn.extend({effect:function(){function e(e){function n(){t.isFunction(o)&&o.call(r[0]),t.isFunction(e)&&e()}var r=t(this),o=i.complete,a=i.mode;(r.is(":hidden")?"hide"===a:"show"===a)?(r[a](),n()):s.call(r[0],i,n)}var i=n.apply(this,arguments),r=i.mode,o=i.queue,s=t.effects.effect[i.effect];return t.fx.off||!s?r?this[r](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(r(e))return t.apply(this,arguments);var i=n.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(r(e))return t.apply(this,arguments);var i=n.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(r(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=n.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])}),n}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(jQuery),function(t){var e=0,i={},n={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",n.height=n.paddingTop=n.paddingBottom=n.borderTopWidth=n.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void("disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e)))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,n=this.headers.length,r=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(r+1)%n];break;case i.LEFT:case i.UP:o=this.headers[(r-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[n-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,n=this.options,r=n.heightStyle,o=this.element.parent(),s=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(n.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),n=i.attr("id"),r=i.next(),o=r.attr("id");n||(n=s+"-header-"+e,i.attr("id",n)),o||(o=s+"-panel-"+e,r.attr("id",o)),i.attr("aria-controls",o),r.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===r?(i=o.height(),this.element.siblings(":visible").each(function(){var e=t(this),n=e.css("position");"absolute"!==n&&"fixed"!==n&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===r&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,n=this.active,r=t(e.currentTarget),o=r[0]===n[0],s=o&&i.collapsible,a=s?t():r.next(),l=n.next(),h={oldHeader:n,oldPanel:l,newHeader:s?t():r,newPanel:a};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,h)===!1||(i.active=s?!1:this.headers.index(r),this.active=o?t():r,this._toggle(h),n.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(r.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&r.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),r.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,e):(n.hide(),i.show(),this._toggleComplete(e)),n.attr({"aria-expanded":"false","aria-hidden":"true"}),n.prev().attr("aria-selected","false"),i.length&&n.length?n.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,r){var o,s,a,l=this,h=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){l._toggleComplete(r)};return"number"==typeof d&&(a=d),"string"==typeof d&&(s=d),s=s||d.easing||u.easing,a=a||d.duration||u.duration,e.length?t.length?(o=t.show().outerHeight(),e.animate(i,{duration:a,easing:s,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(n,{duration:a,easing:s,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?h+=i.now:"content"!==l.options.heightStyle&&(i.now=Math.round(o-e.outerHeight()-h),h=0)}})):e.animate(i,a,s,p):t.animate(n,a,s,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}(jQuery),function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,n,r=this.element[0].nodeName.toLowerCase(),o="textarea"===r,s="input"===r;this.isMultiLine=o?!0:s?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||s?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(r){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var o=t.ui.keyCode;switch(r.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",r);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",r);break;case o.UP:e=!0,this._keyEvent("previous",r);break;case o.DOWN:e=!0,this._keyEvent("next",r);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,r.preventDefault(),this.menu.select(r));break;case o.TAB:this.menu.active&&this.menu.select(r);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(r),r.preventDefault());break;default:i=!0,this._searchTimeout(r)}},keypress:function(n){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&n.preventDefault());if(!i){var r=t.ui.keyCode;switch(n.keyCode){case r.PAGE_UP:this._move("previousPage",n);break;case r.PAGE_DOWN:this._move("nextPage",n);break;case r.UP:this._keyEvent("previous",n);break;case r.DOWN:this._keyEvent("next",n)}}},input:function(t){return n?(n=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(n){n.target===e.element[0]||n.target===i||t.contains(i,n.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});var n=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:n})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value):this.liveRegion.text(n.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,r){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){r(t)},error:function(){r([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(n){i===e&&t.__response(n),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()
  7. },_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var n=this;t.each(i,function(t,i){n._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return n.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(jQuery),function(t){var e,i,n,r,o="ui-button ui-widget ui-state-default ui-corner-all",s="ui-state-hover ui-state-active ",a="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",l=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},h=function(e){var i=e.name,n=e.form,r=t([]);return i&&(i=i.replace(/'/g,"\\'"),r=n?t(n).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),r};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,l),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var s=this,a=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===a.label&&(a.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){a.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){a.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){a.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){s.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){s.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){r||s.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){a.disabled||(r=!1,i=t.pageX,n=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){a.disabled||(i!==t.pageX||n!==t.pageY)&&(r=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return a.disabled||r?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(a.disabled||r)return!1;t(this).addClass("ui-state-active"),s.buttonElement.attr("aria-pressed","true");var e=s.element[0];h(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return a.disabled?!1:(t(this).addClass("ui-state-active"),e=this,void s.document.one("mouseup",function(){e=null}))}).bind("mouseup"+this.eventNamespace,function(){return a.disabled?!1:void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return a.disabled?!1:void((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",a.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+s+" "+a).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?void(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1)):void this._resetButton()},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?h(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var e=this.buttonElement.removeClass(a),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),n=this.options.icons,r=n.primary&&n.secondary,o=[];n.primary||n.secondary?(this.options.text&&o.push("ui-button-text-icon"+(r?"s":n.primary?"-primary":"-secondary")),n.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(o.push(r?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function r(e,i){t.extend(e,i);for(var n in i)null==i[n]&&(e[n]=i[n]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var o,s="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return r(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,r,o;n=e.nodeName.toLowerCase(),r="div"===n||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),r),o.settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,o):r&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var r=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:r,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,s,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,r,o,s=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),s&&(i.append=t("<span class='"+this._appendClass+"'>"+s+"</span>"),e[a?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&e.focus(this._showDatepicker),("button"===n||"both"===n)&&(r=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:r,title:r}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:r,title:r}):r)),e[a?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,r,o=new Date(2009,11,20),s=this._get(t,"dateFormat");s.match(/[DM]/)&&(e=function(t){for(i=0,n=0,r=0;r<t.length;r++)t[r].length>i&&(i=t[r].length,n=r);return n},o.setMonth(e(this._get(t,s.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,s,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,o,a){var l,h,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,l="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+l+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],s,p)),r(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],s,p),this},_destroyDatepicker:function(e){var i,n=t(e),r=t.data(e,s);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,s),"input"===i?(r.append.remove(),r.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,n,r=t(e),o=t.data(e,s);r.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(n=r.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,n,r=t(e),o=t.data(e,s);r.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(n=r.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,s)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,n,o){var s,a,l,h,c=this._getInst(i);return 2===arguments.length&&"string"==typeof n?"defaults"===n?t.extend({},t.datepicker._defaults):c?"all"===n?t.extend({},c.settings):this._get(c,n):null:(s=n||{},"string"==typeof n&&(s={},s[n]=o),void(c&&(this._curInst===c&&this._hideDatepicker(),a=this._getDateDatepicker(i,!0),l=this._getMinMaxDate(c,"min"),h=this._getMinMaxDate(c,"max"),r(c.settings,s),null!==l&&s.dateFormat!==e&&s.minDate===e&&(c.settings.minDate=this._formatDate(c,l)),null!==h&&s.dateFormat!==e&&s.maxDate===e&&(c.settings.maxDate=this._formatDate(c,h)),"disabled"in s&&(s.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,a),this._updateAlternate(c),this._updateDatepicker(c))))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,n,r,o=t.datepicker._getInst(e.target),s=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),s=!1;break;case 13:return r=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),r[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,r[0]),i=t.datepicker._get(o,"onSelect"),i?(n=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[n,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,n,r=t.datepicker._getInst(e.target);return t.datepicker._get(r,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(r,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">n||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(e){var i,n=t.datepicker._getInst(e.target);if(n.input.val()!==n.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,t.datepicker._getFormatConfig(n)),i&&(t.datepicker._setDateFromField(n),t.datepicker._updateAlternate(n),t.datepicker._updateDatepicker(n))}catch(r){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,n,o,s,a,l,h;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(i,"beforeShow"),o=n?n.apply(e,[e,i]):{},o!==!1&&(r(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),s=!1,t(e).parents().each(function(){return s|="fixed"===t(this).css("position"),!s}),a={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),a=t.datepicker._checkOffset(i,a,s),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":s?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),i.inline||(l=t.datepicker._get(i,"showAnim"),h=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?i.dpDiv.show(l,t.datepicker._get(i,"showOptions"),h):i.dpDiv[l||"show"](l?h:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,n=this._getNumberOfMonths(e),r=n[1],s=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),r>1&&e.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",s*r+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,n){var r=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?r-s:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+a?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+r>l&&l>r?Math.abs(i.left+r-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+a):0),i},_findPos:function(e){for(var i,n=this._getInst(e),r=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[r?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,n,r,o,a=this._curInst;!a||e&&a!==t.data(e,s)||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),r=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),n,r):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,r),i||r(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),n=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==n)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var r=t(e),o=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(e){var i,n=t(e),r=this._getInst(n[0]);this._get(r,"gotoCurrent")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(i=new Date,r.selectedDay=i.getDate(),r.drawMonth=r.selectedMonth=i.getMonth(),r.drawYear=r.selectedYear=i.getFullYear()),this._notifyChange(r),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var r=t(e),o=this._getInst(r[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(r)},_selectDay:function(e,i,n,r){var o,s=t(e);t(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||(o=this._getInst(s[0]),o.selectedDay=o.currentDay=t("a",r).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var n,r=t(e),o=this._getInst(r[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),n=this._get(o,"onSelect"),n?n.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,n,r,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),r=this.formatDate(i,n,this._getFormatConfig(e)),t(o).each(function(){t(this).val(r)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,n){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var r,o,s,a,l=0,h=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,E=!1,b=function(t){var i=r+1<e.length&&e.charAt(r+1)===t;return i&&r++,i},_=function(t){var e=b(t),n="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,r=new RegExp("^\\d{1,"+n+"}"),o=i.substring(l).match(r);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},T=function(e,n,r){var o=-1,s=t.map(b(e)?r:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(s,function(t,e){var n=e[1];return i.substr(l,n.length).toLowerCase()===n.toLowerCase()?(o=e[0],l+=n.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},x=function(){if(i.charAt(l)!==e.charAt(r))throw"Unexpected literal at position "+l;l++};for(r=0;r<e.length;r++)if(E)"'"!==e.charAt(r)||b("'")?x():E=!1;else switch(e.charAt(r)){case"d":v=_("d");break;case"D":T("D",u,d);break;case"o":y=_("o");break;case"m":g=_("m");break;case"M":g=T("M",p,f);break;case"y":m=_("y");break;case"@":a=new Date(_("@")),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((_("!")-this._ticksTo1970)/1e4),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case"'":b("'")?x():E=!0;break;default:x()}if(l<i.length&&(s=i.substr(l),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=m?0:-100)),y>-1)for(g=1,v=y;;){if(o=this._getDaysInMonth(m,g-1),o>=v)break;g++,v-=o}if(a=this._daylightSavingAdjust(new Date(m,g-1,v)),a.getFullYear()!==m||a.getMonth()+1!==g||a.getDate()!==v)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var n,r=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,s=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=n+1<t.length&&t.charAt(n+1)===e;return i&&n++,i},h=function(t,e,i){var n=""+e;if(l(t))for(;n.length<i;)n="0"+n;return n},c=function(t,e,i,n){return l(t)?n[e]:i[e]},u="",d=!1;if(e)for(n=0;n<t.length;n++)if(d)"'"!==t.charAt(n)||l("'")?u+=t.charAt(n):d=!1;else switch(t.charAt(n)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),r,o);break;case"o":u+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),s,a);break;case"y":u+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(n)}return u},_possibleChars:function(t){var e,i="",n=!1,r=function(i){var n=e+1<t.length&&t.charAt(e+1)===i;return n&&e++,n};for(e=0;e<t.length;e++)if(n)"'"!==t.charAt(e)||r("'")?i+=t.charAt(e):n=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":r("'")?i+="'":n=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),n=t.lastVal=t.input?t.input.val():null,r=this._getDefaultDate(t),o=r,s=this._getFormatConfig(t);try{o=this.parseDate(i,n,s)||r}catch(a){n=e?"":n}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=n?o.getDate():0,t.currentMonth=n?o.getMonth():0,t.currentYear=n?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,n){var r=function(t){var e=new Date;
  8. return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(n){}for(var r=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=r.getFullYear(),s=r.getMonth(),a=r.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=l.exec(i);h;){switch(h[2]||"d"){case"d":case"D":a+=parseInt(h[1],10);break;case"w":case"W":a+=7*parseInt(h[1],10);break;case"m":case"M":s+=parseInt(h[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s));break;case"y":case"Y":o+=parseInt(h[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s))}h=l.exec(i)}return new Date(o,s,a)},s=null==i||""===i?n:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?n:r(i):new Date(i.getTime());return s=s&&"Invalid Date"===s.toString()?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,r=t.selectedMonth,o=t.selectedYear,s=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=s.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=s.getMonth(),t.drawYear=t.selectedYear=t.currentYear=s.getFullYear(),r===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,r,o,s,a,l,h,c,u,d,p,f,m,g,v,y,E,b,_,T,x,w,R,S,M,C,H,D,P,k,A,L,I,F,N,z,B,O=new Date,U=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),V=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),W=this._get(t,"hideIfNoPrevNext"),G=this._get(t,"navigationAsDateFormat"),X=this._getNumberOfMonths(t),Z=this._get(t,"showCurrentAtPos"),Y=this._get(t,"stepMonths"),q=1!==X[0]||1!==X[1],$=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),K=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Q=t.drawMonth-Z,te=t.drawYear;if(0>Q&&(Q+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-X[0]*X[1]+1,J.getDate())),e=K&&K>e?K:e;this._daylightSavingAdjust(new Date(te,Q,1))>e;)Q--,0>Q&&(Q=11,te--);for(t.drawMonth=Q,t.drawYear=te,i=this._get(t,"prevText"),i=G?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Q-Y,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,te,Q)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+i+"</span></a>":W?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+i+"</span></a>",r=this._get(t,"nextText"),r=G?this.formatDate(r,this._daylightSavingAdjust(new Date(te,Q+Y,1)),this._getFormatConfig(t)):r,o=this._canAdjustMonth(t,1,te,Q)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+r+"</span></a>":W?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+r+"</span></a>",s=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?$:U,s=G?this.formatDate(s,a,this._getFormatConfig(t)):s,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",h=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(V?l:"")+(this._isInRange(t,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+s+"</button>":"")+(V?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),y=this._get(t,"selectOtherMonths"),E=this._getDefaultDate(t),b="",T=0;T<X[0];T++){for(x="",this.maxRows=4,w=0;w<X[1];w++){if(R=this._daylightSavingAdjust(new Date(te,Q,t.selectedDay)),S=" ui-corner-all",M="",q){if(M+="<div class='ui-datepicker-group",X[1]>1)switch(w){case 0:M+=" ui-datepicker-group-first",S=" ui-corner-"+(V?"right":"left");break;case X[1]-1:M+=" ui-datepicker-group-last",S=" ui-corner-"+(V?"left":"right");break;default:M+=" ui-datepicker-group-middle",S=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===T?V?o:n:"")+(/all|right/.test(S)&&0===T?V?n:o:"")+this._generateMonthYearHeader(t,Q,te,K,J,T>0||w>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",C=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",_=0;7>_;_++)H=(_+c)%7,C+="<th"+((_+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[H]+"'>"+p[H]+"</span></th>";for(M+=C+"</tr></thead><tbody>",D=this._getDaysInMonth(te,Q),te===t.selectedYear&&Q===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,D)),P=(this._getFirstDayOfMonth(te,Q)-c+7)%7,k=Math.ceil((P+D)/7),A=q&&this.maxRows>k?this.maxRows:k,this.maxRows=A,L=this._daylightSavingAdjust(new Date(te,Q,1-P)),I=0;A>I;I++){for(M+="<tr>",F=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(L)+"</td>":"",_=0;7>_;_++)N=g?g.apply(t.input?t.input[0]:null,[L]):[!0,""],z=L.getMonth()!==Q,B=z&&!y||!N[0]||K&&K>L||J&&L>J,F+="<td class='"+((_+c+6)%7>=5?" ui-datepicker-week-end":"")+(z?" ui-datepicker-other-month":"")+(L.getTime()===R.getTime()&&Q===t.selectedMonth&&t._keyEvent||E.getTime()===L.getTime()&&E.getTime()===R.getTime()?" "+this._dayOverClass:"")+(B?" "+this._unselectableClass+" ui-state-disabled":"")+(z&&!v?"":" "+N[1]+(L.getTime()===$.getTime()?" "+this._currentClass:"")+(L.getTime()===U.getTime()?" ui-datepicker-today":""))+"'"+(z&&!v||!N[2]?"":" title='"+N[2].replace(/'/g,"&#39;")+"'")+(B?"":" data-handler='selectDay' data-event='click' data-month='"+L.getMonth()+"' data-year='"+L.getFullYear()+"'")+">"+(z&&!v?"&#xa0;":B?"<span class='ui-state-default'>"+L.getDate()+"</span>":"<a class='ui-state-default"+(L.getTime()===U.getTime()?" ui-state-highlight":"")+(L.getTime()===$.getTime()?" ui-state-active":"")+(z?" ui-priority-secondary":"")+"' href='#'>"+L.getDate()+"</a>")+"</td>",L.setDate(L.getDate()+1),L=this._daylightSavingAdjust(L);M+=F+"</tr>"}Q++,Q>11&&(Q=0,te++),M+="</tbody></table>"+(q?"</div>"+(X[0]>0&&w===X[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=M}b+=x}return b+=h,t._keyEvent=!1,b},_generateMonthYearHeader:function(t,e,i,n,r,o,s,a){var l,h,c,u,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),E="<div class='ui-datepicker-title'>",b="";if(o||!g)b+="<span class='ui-datepicker-month'>"+s[e]+"</span>";else{for(l=n&&n.getFullYear()===i,h=r&&r.getFullYear()===i,b+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=n.getMonth())&&(!h||c<=r.getMonth())&&(b+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+a[c]+"</option>");b+="</select>"}if(y||(E+=b+(!o&&g&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)E+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),m=Math.max(f,p(u[1]||"")),f=n?Math.max(f,n.getFullYear()):f,m=r?Math.min(m,r.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",E+=t.yearshtml,t.yearshtml=null}return E+=this._get(t,"yearSuffix"),y&&(E+=(!o&&g&&v?"":"&#xa0;")+b),E+="</div>"},_adjustInstDate:function(t,e,i){var n=t.drawYear+("Y"===i?e:0),r=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(n,r))+("D"===i?e:0),s=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,r,o)));t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),r=i&&i>e?i:e;return n&&r>n?n:r},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var r=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,n+(0>e?e:r[0]*r[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,n,r=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),s=null,a=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),s=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(s+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!r||e.getTime()>=r.getTime())&&(!o||e.getTime()<=o.getTime())&&(!s||e.getFullYear()>=s)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var r=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),r,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"}(jQuery),function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),void this._trigger("open"))},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),r=i.filter(":last");e.target!==r[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(r.focus(1),e.preventDefault()):(n.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(t.each(i,function(i,n){var r,o;n=t.isFunction(n)?{click:n,text:i}:n,n=t.extend({type:"button"},n),r=n.click,n.click=function(){r.apply(e.element[0],arguments)},o={icons:n.icons,text:n.showText},delete n.icons,delete n.showText,t("<button></button>",n).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,r){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,e(r))},drag:function(t,n){i._trigger("drag",t,e(n))},stop:function(r,o){n.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",r,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,n=this.options,r=n.resizable,o=this.uiDialog.css("position"),s="string"==typeof r?r:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:s,start:function(n,r){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,e(r))},resize:function(t,n){i._trigger("resize",t,e(n))},stop:function(r,o){n.height=t(this).height(),n.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",r,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(n){var r=this,o=!1,s={};t.each(n,function(t,n){r._setOption(t,n),t in e&&(o=!0),t in i&&(s[t]=n)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(t,e){var i,n,r=this.uiDialog;"dialogClass"===t&&r.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=r.is(":data(ui-draggable)"),i&&!e&&r.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(n=r.is(":data(ui-resizable)"),n&&!e&&r.resizable("destroy"),n&&"string"==typeof e&&r.resizable("option","handles",e),n||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(n){e._allowInteraction(n)||(n.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,n=[],r=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(n=i.split?i.split(" "):[i[0],i[1]],1===n.length&&(n[1]=n[0]),t.each(["left","top"],function(t,e){+n[t]===n[t]&&(r[t]=n[t],n[t]=e)}),i={my:n[0]+(r[0]<0?r[0]:"+"+r[0])+" "+n[1]+(r[1]<0?r[1]:"+"+r[1]),at:n.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(jQuery),function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(n,r){var o,s,a,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,n.mode||"hide"),u=n.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",m=i.test(u),g={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),o=t.effects.createWrapper(l).css({overflow:"hidden"}),s=o[p](),a=parseFloat(o.css(f))||0,g[p]=v?s:0,m||(l.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:s+a),v&&(o.css(p,0),m||o.css(f,a+s)),o.animate(g,{duration:n.duration,easing:n.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removeWrapper(l),r()}})}}(jQuery),function(t){t.effects.effect.bounce=function(e,i){var n,r,o,s=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(s,e.mode||"effect"),h="hide"===l,c="show"===l,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||h?1:0),m=e.duration/f,g=e.easing,v="up"===u||"down"===u?"top":"left",y="up"===u||"left"===u,E=s.queue(),b=E.length;for((c||h)&&a.push("opacity"),t.effects.save(s,a),s.show(),t.effects.createWrapper(s),d||(d=s["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,s.css("opacity",0).css(v,y?2*-d:2*d).animate(o,m,g)),h&&(d/=Math.pow(2,p-1)),o={},o[v]=0,n=0;p>n;n++)r={},r[v]=(y?"-=":"+=")+d,s.animate(r,m,g).animate(o,m,g),d=h?2*d:d/2;h&&(r={opacity:0},r[v]=(y?"-=":"+=")+d,s.animate(r,m,g)),s.queue(function(){h&&s.hide(),t.effects.restore(s,a),t.effects.removeWrapper(s),i()}),b>1&&E.splice.apply(E,[1,0].concat(E.splice(b,f+1))),s.dequeue()}}(jQuery),function(t){t.effects.effect.clip=function(e,i){var n,r,o,s=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(s,e.mode||"hide"),h="show"===l,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(s,a),s.show(),n=t.effects.createWrapper(s).css({overflow:"hidden"}),r="IMG"===s[0].tagName?n:s,o=r[d](),h&&(r.css(d,0),r.css(p,o/2)),f[d]=h?o:0,f[p]=h?0:o/2,r.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||s.hide(),t.effects.restore(s,a),t.effects.removeWrapper(s),i()}})}}(jQuery),function(t){t.effects.effect.drop=function(e,i){var n,r=t(this),o=["position","top","bottom","left","right","opacity","height","width"],s=t.effects.setMode(r,e.mode||"hide"),a="show"===s,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",u={opacity:a?1:0};t.effects.save(r,o),r.show(),t.effects.createWrapper(r),n=e.distance||r["top"===h?"outerHeight":"outerWidth"](!0)/2,a&&r.css("opacity",0).css(h,"pos"===c?-n:n),u[h]=(a?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+n,r.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===s&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),i()}})}}(jQuery),function(t){t.effects.effect.explode=function(e,i){function n(){E.push(this),E.length===u*d&&r()}function r(){p.css({visibility:"visible"}),t(E).remove(),m||p.hide(),i()}var o,s,a,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),y=Math.ceil(p.outerHeight()/u),E=[];for(o=0;u>o;o++)for(l=g.top+o*y,c=o-(u-1)/2,s=0;d>s;s++)a=g.left+s*v,h=s-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*v,top:-o*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:a+(m?h*v:0),top:l+(m?c*y:0),opacity:m?0:1}).animate({left:a+(m?0:h*v),top:l+(m?0:c*y),opacity:m?1:0},e.duration||500,e.easing,n)}}(jQuery),function(t){t.effects.effect.fade=function(e,i){var n=t(this),r=t.effects.setMode(n,e.mode||"toggle");n.animate({opacity:r},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(jQuery),function(t){t.effects.effect.fold=function(e,i){var n,r,o=t(this),s=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(o,e.mode||"hide"),l="show"===a,h="hide"===a,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],m=e.duration/2,g={},v={};t.effects.save(o,s),o.show(),n=t.effects.createWrapper(o).css({overflow:"hidden"}),r=p?[n.width(),n.height()]:[n.height(),n.width()],u&&(c=parseInt(u[1],10)/100*r[h?0:1]),l&&n.css(d?{height:0,width:c}:{height:c,width:0}),g[f[0]]=l?r[0]:c,v[f[1]]=l?r[1]:0,n.animate(g,m,e.easing).animate(v,m,e.easing,function(){h&&o.hide(),t.effects.restore(o,s),t.effects.removeWrapper(o),i()})}}(jQuery),function(t){t.effects.effect.highlight=function(e,i){var n=t(this),r=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(n,e.mode||"show"),s={backgroundColor:n.css("backgroundColor")};"hide"===o&&(s.opacity=0),t.effects.save(n,r),n.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,r),i()}})}}(jQuery),function(t){t.effects.effect.pulsate=function(e,i){var n,r=t(this),o=t.effects.setMode(r,e.mode||"show"),s="show"===o,a="hide"===o,l=s||"hide"===o,h=2*(e.times||5)+(l?1:0),c=e.duration/h,u=0,d=r.queue(),p=d.length;for((s||!r.is(":visible"))&&(r.css("opacity",0).show(),u=1),n=1;h>n;n++)r.animate({opacity:u},c,e.easing),u=1-u;r.animate({opacity:u},c,e.easing),r.queue(function(){a&&r.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),r.dequeue()}}(jQuery),function(t){t.effects.effect.puff=function(e,i){var n=t(this),r=t.effects.setMode(n,e.mode||"hide"),o="hide"===r,s=parseInt(e.percent,10)||150,a=s/100,l={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:r,complete:i,percent:o?s:100,from:o?l:{height:l.height*a,width:l.width*a,outerHeight:l.outerHeight*a,outerWidth:l.outerWidth*a}}),n.effect(e)},t.effects.effect.scale=function(e,i){var n=t(this),r=t.extend(!0,{},e),o=t.effects.setMode(n,e.mode||"effect"),s=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),a=e.direction||"both",l=e.origin,h={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()},c={y:"horizontal"!==a?s/100:1,x:"vertical"!==a?s/100:1};r.effect="size",r.queue=!1,r.complete=i,"effect"!==o&&(r.origin=l||["middle","center"],r.restore=!0),r.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:h),r.to={height:h.height*c.y,width:h.width*c.x,outerHeight:h.outerHeight*c.y,outerWidth:h.outerWidth*c.x},r.fade&&("show"===o&&(r.from.opacity=0,r.to.opacity=1),"hide"===o&&(r.from.opacity=1,r.to.opacity=0)),n.effect(r)},t.effects.effect.size=function(e,i){var n,r,o,s=t(this),a=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(s,e.mode||"effect"),f=e.restore||"effect"!==p,m=e.scale||"both",g=e.origin||["middle","center"],v=s.css("position"),y=f?a:l,E={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&s.show(),n={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},"toggle"===e.mode&&"show"===p?(s.from=e.to||E,s.to=e.from||n):(s.from=e.from||("show"===p?E:n),s.to=e.to||("hide"===p?E:n)),o={from:{y:s.from.height/n.height,x:s.from.width/n.width},to:{y:s.to.height/n.height,x:s.to.width/n.width}},("box"===m||"both"===m)&&(o.from.y!==o.to.y&&(y=y.concat(u),s.from=t.effects.setTransition(s,u,o.from.y,s.from),s.to=t.effects.setTransition(s,u,o.to.y,s.to)),o.from.x!==o.to.x&&(y=y.concat(d),s.from=t.effects.setTransition(s,d,o.from.x,s.from),s.to=t.effects.setTransition(s,d,o.to.x,s.to))),("content"===m||"both"===m)&&o.from.y!==o.to.y&&(y=y.concat(c).concat(h),s.from=t.effects.setTransition(s,c,o.from.y,s.from),s.to=t.effects.setTransition(s,c,o.to.y,s.to)),t.effects.save(s,y),s.show(),t.effects.createWrapper(s),s.css("overflow","hidden").css(s.from),g&&(r=t.effects.getBaseline(g,n),s.from.top=(n.outerHeight-s.outerHeight())*r.y,s.from.left=(n.outerWidth-s.outerWidth())*r.x,s.to.top=(n.outerHeight-s.to.outerHeight)*r.y,s.to.left=(n.outerWidth-s.to.outerWidth)*r.x),s.css(s.from),("content"===m||"both"===m)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),h=a.concat(u).concat(d),s.find("*[width]").each(function(){var i=t(this),n={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};
  9. f&&t.effects.save(i,h),i.from={height:n.height*o.from.y,width:n.width*o.from.x,outerHeight:n.outerHeight*o.from.y,outerWidth:n.outerWidth*o.from.x},i.to={height:n.height*o.to.y,width:n.width*o.to.x,outerHeight:n.height*o.to.y,outerWidth:n.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,u,o.from.y,i.from),i.to=t.effects.setTransition(i,u,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),s.animate(s.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===s.to.opacity&&s.css("opacity",s.from.opacity),"hide"===p&&s.hide(),t.effects.restore(s,y),f||("static"===v?s.css({position:"relative",top:s.to.top,left:s.to.left}):t.each(["top","left"],function(t,e){s.css(e,function(e,i){var n=parseInt(i,10),r=t?s.to.left:s.to.top;return"auto"===i?r+"px":n+r+"px"})})),t.effects.removeWrapper(s),i()}})}}(jQuery),function(t){t.effects.effect.shake=function(e,i){var n,r=t(this),o=["position","top","bottom","left","right","height","width"],s=t.effects.setMode(r,e.mode||"effect"),a=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,u=Math.round(e.duration/c),d="up"===a||"down"===a?"top":"left",p="up"===a||"left"===a,f={},m={},g={},v=r.queue(),y=v.length;for(t.effects.save(r,o),r.show(),t.effects.createWrapper(r),f[d]=(p?"-=":"+=")+l,m[d]=(p?"+=":"-=")+2*l,g[d]=(p?"-=":"+=")+2*l,r.animate(f,u,e.easing),n=1;h>n;n++)r.animate(m,u,e.easing).animate(g,u,e.easing);r.animate(m,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===s&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,c+1))),r.dequeue()}}(jQuery),function(t){t.effects.effect.slide=function(e,i){var n,r=t(this),o=["position","top","bottom","left","right","width","height"],s=t.effects.setMode(r,e.mode||"show"),a="show"===s,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u={};t.effects.save(r,o),r.show(),n=e.distance||r["top"===h?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(r).css({overflow:"hidden"}),a&&r.css(h,c?isNaN(n)?"-"+n:-n:n),u[h]=(a?c?"+=":"-=":c?"-=":"+=")+n,r.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===s&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),i()}})}}(jQuery),function(t){t.effects.effect.transfer=function(e,i){var n=t(this),r=t(e.to),o="fixed"===r.css("position"),s=t("body"),a=o?s.scrollTop():0,l=o?s.scrollLeft():0,h=r.offset(),c={top:h.top-a,left:h.left-l,height:r.innerHeight(),width:r.innerWidth()},u=n.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-a,left:u.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(jQuery),function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,r,o,s,a,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,r=this.previousFilter||"",o=String.fromCharCode(e.keyCode),s=!1,clearTimeout(this.filterTimer),o===r?s=!0:o=r+o,a=new RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(t(this).children("a").text())}),n=s&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(o=String.fromCharCode(e.keyCode),a=new RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(t(this).children("a").text())})),n.length?(this.focus(e,n),n.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,n=this.element.find(this.options.menus);n.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),n=e.prev("a"),r=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(r),e.attr("aria-labelledby",n.attr("id"))}),e=n.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,r,o,s,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,r=e.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=e.height(),0>r?this.activeMenu.scrollTop(o+r):r+a>s&&this.activeMenu.scrollTop(o+r-s+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this.activeMenu=n},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,n)},nextPage:function(e){var i,n,r;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,r=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n-r<0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,n,r;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,r=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n+r>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function n(e,i){return parseInt(t.css(e,i),10)||0}function r(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,s=Math.max,a=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,n,r=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=r.children()[0];return t("body").append(r),i=s.offsetWidth,r.css("overflow","scroll"),n=s.offsetWidth,i===n&&(n=r[0].clientWidth),r.remove(),o=i-n},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),n=e.isWindow?"":e.element.css("overflow-y"),r="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:r?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]);return{element:i,isWindow:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,m,g,v,y,E=t(e.of),b=t.position.getWithinInfo(e.within),_=t.position.getScrollInfo(b),T=(e.collision||"flip").split(" "),x={};return y=r(E),E[0].preventDefault&&(e.at="left top"),p=y.width,m=y.height,g=y.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,n=(e[this]||"").split(" ");1===n.length&&(n=h.test(n[0])?n.concat(["center"]):c.test(n[0])?["center"].concat(n):["center","center"]),n[0]=h.test(n[0])?n[0]:"center",n[1]=c.test(n[1])?n[1]:"center",t=u.exec(n[0]),i=u.exec(n[1]),x[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(n[0])[0],d.exec(n[1])[0]]}),1===T.length&&(T[1]=T[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),o=i(x.at,p,m),v.left+=o[0],v.top+=o[1],this.each(function(){var r,h,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=n(this,"marginLeft"),y=n(this,"marginTop"),w=u+f+n(this,"marginRight")+_.width,R=d+y+n(this,"marginBottom")+_.height,S=t.extend({},v),M=i(x.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?S.left-=u:"center"===e.my[0]&&(S.left-=u/2),"bottom"===e.my[1]?S.top-=d:"center"===e.my[1]&&(S.top-=d/2),S.left+=M[0],S.top+=M[1],t.support.offsetFractions||(S.left=l(S.left),S.top=l(S.top)),r={marginLeft:f,marginTop:y},t.each(["left","top"],function(i,n){t.ui.position[T[i]]&&t.ui.position[T[i]][n](S,{targetWidth:p,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:r,collisionWidth:w,collisionHeight:R,offset:[o[0]+M[0],o[1]+M[1]],my:e.my,at:e.at,within:b,elem:c})}),e.using&&(h=function(t){var i=g.left-S.left,n=i+p-u,r=g.top-S.top,o=r+m-d,l={target:{element:E,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:S.left,top:S.top,width:u,height:d},horizontal:0>n?"left":i>0?"right":"center",vertical:0>o?"top":r>0?"bottom":"middle"};u>p&&a(i+n)<p&&(l.horizontal="center"),d>m&&a(r+o)<m&&(l.vertical="middle"),l.important=s(a(i),a(n))>s(a(r),a(o))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(S,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,r=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,a=t.left-e.collisionPosition.marginLeft,l=r-a,h=a+e.collisionWidth-o-r;e.collisionWidth>o?l>0&&0>=h?(i=t.left+l+e.collisionWidth-o-r,t.left+=l-i):t.left=h>0&&0>=l?r:l>h?r+o-e.collisionWidth:r:l>0?t.left+=l:h>0?t.left-=h:t.left=s(t.left-a,t.left)},top:function(t,e){var i,n=e.within,r=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,l=r-a,h=a+e.collisionHeight-o-r;e.collisionHeight>o?l>0&&0>=h?(i=t.top+l+e.collisionHeight-o-r,t.top+=l-i):t.top=h>0&&0>=l?r:l>h?r+o-e.collisionHeight:r:l>0?t.top+=l:h>0?t.top-=h:t.top=s(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,r=e.within,o=r.offset.left+r.scrollLeft,s=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-s-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-s-o,(0>i||i<a(c))&&(t.left+=d+p+f)):u>0&&(n=t.left-e.collisionPosition.marginLeft+d+p+f-l,(n>0||a(n)<u)&&(t.left+=d+p+f))},top:function(t,e){var i,n,r=e.within,o=r.offset.top+r.scrollTop,s=r.height,l=r.isWindow?r.scrollTop:r.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-s-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(n=t.top+p+f+m+e.collisionHeight-s-o,t.top+p+f+m>c&&(0>n||n<a(c))&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-l,t.top+p+f+m>u&&(i>0||a(i)<u)&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,n,r,o,s=document.getElementsByTagName("body")[0],a=document.createElement("div");e=document.createElement(s?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},s&&t.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in n)e.style[o]=n[o];e.appendChild(a),i=s||document.documentElement,i.insertBefore(e,i.firstChild),a.style.cssText="position: absolute; left: 10.7432222px;",r=t(a).offset().left,t.support.offsetFractions=r>10&&11>r,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t,e){t.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(jQuery),function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,n=this.options,r=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",s=[];for(i=n.values&&n.values.length||1,r.length>i&&(r.slice(i).remove(),r=r.slice(0,i)),e=r.length;i>e;e++)s.push(o);this.handles=r.add(t(s.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,n,r,o,s,a,l,h,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-c.values(e));(r>i||r===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(r=i,o=t(this),s=e)}),a=this._start(e,s),a===!1?!1:(this._mouseSliding=!0,this._handleIndex=s,o.addClass("ui-state-active").focus(),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,s,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,r,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),r=this._valueMax()-this._valueMin(),o=this._valueMin()+n*r,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var n,r,o;this.options.values&&this.options.values.length?(n=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>n||1===e&&n>i)&&(i=n),i!==this.values(e)&&(r=this.values(),r[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:r}),n=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var n,r,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(n=this.options.values,r=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(r[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var n,r=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(r=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=0;r>n;n+=1)this._change(null,n);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,n,r,o,s=this.options.range,a=this.options,l=this,h=this._animateOff?!1:a.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(n=this.value(),r=this._valueMin(),o=this._valueMax(),i=o!==r?(n-r)/(o-r)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,a.animate),"min"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},a.animate),"max"===s&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},a.animate),"max"===s&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(i){var n,r,o,s,a=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),n=this._start(i,a),n===!1))return}switch(s=this.options.step,r=o=this.options.values&&this.options.values.length?this.values(a):this.value(),i.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(r+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(r-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(r===this._valueMax())return;o=this._trimAlignValue(r+s);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(r===this._valueMin())return;o=this._trimAlignValue(r-s)}this._slide(i,a,o)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(jQuery),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,n){var r=i.attr(n);void 0!==r&&r.length&&(e[n]=r)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;
  10. t||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return e=null!==n.min?n.min:0,i=t-e,i=Math.round(i/n.step)*n.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t<n.min?n.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(i))}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void e(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(t,e){function i(){return++r}function n(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var r=0,o=/#.*$/;t.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===e&&(n&&this.tabs.each(function(i,r){return t(r).attr("aria-controls")===n?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(i),r=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:r=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n===this.options.active?!1:n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,r),e.ctrlKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function n(){return e>r&&(e=0),0>e&&(e=r),e}for(var r=this.tabs.length-1;-1!==t.inArray(n(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,e){return"active"===t?void this._activate(e):"disabled"===t?void this._setupDisabled(e):(this._super(t,e),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,r){var o,s,a,l=t(r).uniqueId().attr("id"),h=t(r).closest("li"),c=h.attr("aria-controls");n(r)?(o=r.hash,s=e.element.find(e._sanitizeSelector(o))):(a=e._tabId(h),o="#"+a,s=e.element.find(o),s.length||(s=e._createPanel(a),s.insertAfter(e.panels[i-1]||e.tablist)),s.attr("aria-live","polite")),s.length&&(e.panels=e.panels.add(s)),c&&h.data("ui-tabs-aria-controls",c),h.attr({"aria-controls":o.substring(1),"aria-labelledby":l}),s.attr("aria-labelledby",l)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,n=0;i=this.tabs[n];n++)e===!0||-1!==t.inArray(n,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,n=this.element.parent();"fill"===e?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),n=e.css("position");"absolute"!==n&&"fixed"!==n&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,n=this.active,r=t(e.currentTarget),o=r.closest("li"),s=o[0]===n[0],a=s&&i.collapsible,l=a?t():this._getPanelForTab(o),h=n.length?this._getPanelForTab(n):t(),c={oldTab:n,oldPanel:h,newTab:a?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||s&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=a?!1:this.tabs.index(o),this.active=s?t():o,this.xhr&&this.xhr.abort(),h.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function n(){o.running=!1,o._trigger("activate",e,i)}function r(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),s.length&&o.options.show?o._show(s,o.options.show,n):(s.show(),n())}var o=this,s=i.newPanel,a=i.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),r()),a.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),s.length&&a.length?i.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var n=this.options.disabled;n!==!1&&(i===e?n=!1:(i=this._getIndex(i),n=t.isArray(n)?t.map(n,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(n))},disable:function(i){var n=this.options.disabled;if(n!==!0){if(i===e)n=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,n))return;n=t.isArray(n)?t.merge([i],n).sort():[i]}this._setupDisabled(n)}},load:function(e,i){e=this._getIndex(e);var r=this,o=this.tabs.eq(e),s=o.find(".ui-tabs-anchor"),a=this._getPanelForTab(o),l={tab:o,panel:a};n(s[0])||(this.xhr=t.ajax(this._ajaxSettings(s,i,l)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){a.html(t),r._trigger("load",i,l)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&r.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),a.removeAttr("aria-busy"),t===r.xhr&&delete r.xhr},1)})))},_ajaxSettings:function(e,i,n){var r=this;return{url:e.attr("href"),beforeSend:function(e,o){return r._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},n))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(t){function e(e,i){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(n.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),r=t.inArray(i,n);-1!==r&&n.splice(r,1),e.removeData("ui-tooltip-id"),n=t.trim(n.join(" ")),n?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")}var n=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var n=this;return"disabled"===e?(this[i?"_disable":"_enable"](),void(this.options[e]=i)):(this._super(e,i),void("content"===e&&t.each(this.tooltips,function(t,e){n._updateContent(e)})))},_disable:function(){var e=this;t.each(this.tooltips,function(i,n){var r=t.Event("blur");r.target=r.currentTarget=n[0],e.close(r,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,n=t(e?e.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&n.parents().each(function(){var e,n=t(this);n.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._updateContent(n,e))},_updateContent:function(t,e){var i,n=this.options.content,r=this,o=e?e.type:null;return"string"==typeof n?this._open(e,t,n):(i=n.call(t[0],function(i){t.data("ui-tooltip-open")&&r._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),void(i&&this._open(e,t,i)))},_open:function(i,n,r){function o(t){h.of=t,s.is(":hidden")||s.position(h)}var s,a,l,h=t.extend({},this.options.position);if(r){if(s=this._find(n),s.length)return void s.find(".ui-tooltip-content").html(r);n.is("[title]")&&(i&&"mouseover"===i.type?n.attr("title",""):n.removeAttr("title")),s=this._tooltip(n),e(n,s.attr("id")),s.find(".ui-tooltip-content").html(r),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):s.position(t.extend({of:n},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.show&&this.options.show.delay&&(l=this.delayedShow=setInterval(function(){s.is(":visible")&&(o(h.of),clearInterval(l))},t.fx.interval)),this._trigger("open",i,{tooltip:s}),a={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=n[0],this.close(i,!0)}},remove:function(){this._removeTooltip(s)}},i&&"mouseover"!==i.type||(a.mouseleave="close"),i&&"focusin"!==i.type||(a.focusout="close"),this._on(!0,n,a)}},close:function(e){var n=this,r=t(e?e.currentTarget:this.element),o=this._find(r);this.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&r.attr("title",r.data("ui-tooltip-title")),i(r),o.stop(!0),this._hide(o,this.options.hide,function(){n._removeTooltip(t(this))}),r.removeData("ui-tooltip-open"),this._off(r,"mouseleave focusout keyup"),r[0]!==this.element[0]&&this._off(r,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete n.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+n++,r=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(r),r.appendTo(this.document[0].body),this.tooltips[i]=e,r},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,n){var r=t.Event("blur");r.target=r.currentTarget=n[0],e.close(r,!0),t("#"+i).remove(),n.data("ui-tooltip-title")&&(n.attr("title",n.data("ui-tooltip-title")),n.removeData("ui-tooltip-title"))})}})}(jQuery),function(t){var e=0;t.widget("ech.multiselect",{options:{header:!0,height:175,minWidth:225,classes:"",checkAllText:"Check all",uncheckAllText:"Uncheck all",noneSelectedText:"Select options",selectedText:"# selected",selectedList:0,show:null,hide:null,autoOpen:!1,multiple:!0,position:{}},_create:function(){var e=this.element.hide(),i=this.options;this.speed=t.fx.speeds._default,this._isOpen=!1,e=(this.button=t('<button type="button"><span class="ui-icon ui-icon-triangle-2-n-s"></span></button>')).addClass("ui-multiselect ui-widget ui-state-default ui-corner-all").addClass(i.classes).attr({title:e.attr("title"),"aria-haspopup":!0,tabIndex:e.attr("tabIndex")}).insertAfter(e),(this.buttonlabel=t("<span />")).html(i.noneSelectedText).appendTo(e);var e=(this.menu=t("<div />")).addClass("ui-multiselect-menu ui-widget ui-widget-content ui-corner-all").addClass(i.classes).appendTo(document.body),n=(this.header=t("<div />")).addClass("ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix").appendTo(e);(this.headerLinkContainer=t("<ul />")).addClass("ui-helper-reset").html(function(){return!0===i.header?'<li><a class="ui-multiselect-all" href="#"><span class="ui-icon ui-icon-check"></span><span>'+i.checkAllText+'</span></a></li><li><a class="ui-multiselect-none" href="#"><span class="ui-icon ui-icon-closethick"></span><span>'+i.uncheckAllText+"</span></a></li>":"string"==typeof i.header?"<li>"+i.header+"</li>":""}).append('<li class="ui-multiselect-close"><a href="#" class="ui-multiselect-close"><span class="ui-icon ui-icon-circle-close"></span></a></li>').appendTo(n),(this.checkboxContainer=t("<ul />")).addClass("ui-multiselect-checkboxes ui-helper-reset").appendTo(e),this._bindEvents(),this.refresh(!0),i.multiple||e.addClass("ui-multiselect-single")},_init:function(){!1===this.options.header&&this.header.hide(),this.options.multiple||this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").hide(),this.options.autoOpen&&this.open(),this.element.is(":disabled")&&this.disable()},refresh:function(i){var n=this.element,r=this.options,o=this.menu,s=this.checkboxContainer,a=[],l="",h=n.attr("id")||e++;n.find("option").each(function(e){t(this);var i,n=this.parentNode,o=this.innerHTML,s=this.title,c=this.value,e="ui-multiselect-"+(this.id||h+"-option-"+e),u=this.disabled,d=this.selected,p=["ui-corner-all"],f=(u?"ui-multiselect-disabled ":" ")+this.className;"OPTGROUP"===n.tagName&&(i=n.getAttribute("label"),-1===t.inArray(i,a)&&(l+='<li class="ui-multiselect-optgroup-label '+n.className+'"><a href="#">'+i+"</a></li>",a.push(i))),u&&p.push("ui-state-disabled"),d&&!r.multiple&&p.push("ui-state-active"),l+='<li class="'+f+'">',l+='<label for="'+e+'" title="'+s+'" class="'+p.join(" ")+'">',l+='<input id="'+e+'" name="multiselect_'+h+'" type="'+(r.multiple?"checkbox":"radio")+'" value="'+c+'" title="'+o+'"',d&&(l+=' checked="checked"',l+=' aria-selected="true"'),u&&(l+=' disabled="disabled"',l+=' aria-disabled="true"'),l+=" /><span>"+o+"</span></label></li>"}),s.html(l),this.labels=o.find("label"),this.inputs=this.labels.children("input"),this._setButtonWidth(),this._setMenuWidth(),this.button[0].defaultValue=this.update(),i||this._trigger("refresh")},update:function(){var e=this.options,i=this.inputs,n=i.filter(":checked"),r=n.length,e=0===r?e.noneSelectedText:t.isFunction(e.selectedText)?e.selectedText.call(this,r,i.length,n.get()):/\d/.test(e.selectedList)&&0<e.selectedList&&r<=e.selectedList?n.map(function(){return t(this).next().html()}).get().join(", "):e.selectedText.replace("#",r).replace("#",i.length);return this.buttonlabel.html(e),e},_bindEvents:function(){function e(){return i[i._isOpen?"close":"open"](),!1}var i=this,n=this.button;n.find("span").bind("click.multiselect",e),n.bind({click:e,keypress:function(t){switch(t.which){case 27:case 38:case 37:i.close();break;case 39:case 40:i.open()}},mouseenter:function(){n.hasClass("ui-state-disabled")||t(this).addClass("ui-state-hover")},mouseleave:function(){t(this).removeClass("ui-state-hover")},focus:function(){n.hasClass("ui-state-disabled")||t(this).addClass("ui-state-focus")},blur:function(){t(this).removeClass("ui-state-focus")}}),this.header.delegate("a","click.multiselect",function(e){t(this).hasClass("ui-multiselect-close")?i.close():i[t(this).hasClass("ui-multiselect-all")?"checkAll":"uncheckAll"](),e.preventDefault()}),this.menu.delegate("li.ui-multiselect-optgroup-label a","click.multiselect",function(e){e.preventDefault();var n=t(this),r=n.parent().nextUntil("li.ui-multiselect-optgroup-label").find("input:visible:not(:disabled)"),o=r.get(),n=n.parent().text();!1!==i._trigger("beforeoptgrouptoggle",e,{inputs:o,label:n})&&(i._toggleChecked(r.filter(":checked").length!==r.length,r),i._trigger("optgrouptoggle",e,{inputs:o,label:n,checked:o[0].checked}))}).delegate("label","mouseenter.multiselect",function(){t(this).hasClass("ui-state-disabled")||(i.labels.removeClass("ui-state-hover"),t(this).addClass("ui-state-hover").find("input").focus())}).delegate("label","keydown.multiselect",function(e){switch(e.preventDefault(),e.which){case 9:case 27:i.close();break;case 38:case 40:case 37:case 39:i._traverse(e.which,this);break;case 13:t(this).find("input")[0].click()}}).delegate('input[type="checkbox"], input[type="radio"]',"click.multiselect",function(e){var n=t(this),r=this.value,o=this.checked,s=i.element.find("option");this.disabled||!1===i._trigger("click",e,{value:r,text:this.title,checked:o})?e.preventDefault():(n.focus(),n.attr("aria-selected",o),s.each(function(){this.value===r?this.selected=o:i.options.multiple||(this.selected=!1)}),i.options.multiple||(i.labels.removeClass("ui-state-active"),n.closest("label").toggleClass("ui-state-active",o),i.close()),i.element.trigger("change"),setTimeout(t.proxy(i.update,i),10))}),t(document).bind("mousedown.multiselect",function(e){i._isOpen&&!t.contains(i.menu[0],e.target)&&!t.contains(i.button[0],e.target)&&e.target!==i.button[0]&&i.close()}),t(this.element[0].form).bind("reset.multiselect",function(){setTimeout(t.proxy(i.refresh,i),10)})},_setButtonWidth:function(){var t=this.element.outerWidth(),e=this.options;/\d/.test(e.minWidth)&&t<e.minWidth&&(t=e.minWidth),this.button.width(t)},_setMenuWidth:function(){var t=this.menu,e=this.button.outerWidth()-parseInt(t.css("padding-left"),10)-parseInt(t.css("padding-right"),10)-parseInt(t.css("border-right-width"),10)-parseInt(t.css("border-left-width"),10);t.width(e||this.button.outerWidth())},_traverse:function(e,i){var n=t(i),r=38===e||37===e,n=n.parent()[r?"prevAll":"nextAll"]("li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup-label)")[r?"last":"first"]();n.length?n.find("label").trigger("mouseover"):(n=this.menu.find("ul").last(),this.menu.find("label")[r?"last":"first"]().trigger("mouseover"),n.scrollTop(r?n.height():0))},_toggleState:function(t,e){return function(){this.disabled||(this[t]=e),e?this.setAttribute("aria-selected",!0):this.removeAttribute("aria-selected")}},_toggleChecked:function(e,i){var n=i&&i.length?i:this.inputs,r=this;n.each(this._toggleState("checked",e)),n.eq(0).focus(),this.update();var o=n.map(function(){return this.value}).get();this.element.find("option").each(function(){!this.disabled&&-1<t.inArray(this.value,o)&&r._toggleState("selected",e).call(this)}),n.length&&this.element.trigger("change")},_toggleDisabled:function(e){this.button.attr({disabled:e,"aria-disabled":e})[e?"addClass":"removeClass"]("ui-state-disabled");var i=this.menu.find("input"),i=e?i.filter(":enabled").data("ech-multiselect-disabled",!0):i.filter(function(){return!0===t.data(this,"ech-multiselect-disabled")}).removeData("ech-multiselect-disabled");i.attr({disabled:e,"arial-disabled":e}).parent()[e?"addClass":"removeClass"]("ui-state-disabled"),this.element.attr({disabled:e,"aria-disabled":e})},open:function(){var e=this.button,i=this.menu,n=this.speed,r=this.options,o=[];if(!1!==this._trigger("beforeopen")&&!e.hasClass("ui-state-disabled")&&!this._isOpen){var s=i.find("ul").last(),a=r.show,l=e.offset();t.isArray(r.show)&&(a=r.show[0],n=r.show[1]||this.speed),a&&(o=[a,n]),s.scrollTop(0).height(r.height),t.ui.position&&!t.isEmptyObject(r.position)?(r.position.of=r.position.of||e,i.show().position(r.position).hide()):i.css({top:l.top+e.outerHeight(),left:l.left}),t.fn.show.apply(i,o),this.labels.eq(0).trigger("mouseover").trigger("mouseenter").find("input").trigger("focus"),e.addClass("ui-state-active"),this._isOpen=!0,this._trigger("open")}},close:function(){if(!1!==this._trigger("beforeclose")){var e=this.options,i=e.hide,n=this.speed,r=[];t.isArray(e.hide)&&(i=e.hide[0],n=e.hide[1]||this.speed),i&&(r=[i,n]),t.fn.hide.apply(this.menu,r),this.button.removeClass("ui-state-active").trigger("blur").trigger("mouseleave"),this._isOpen=!1,this._trigger("close")}},enable:function(){this._toggleDisabled(!1)},disable:function(){this._toggleDisabled(!0)},checkAll:function(){this._toggleChecked(!0),this._trigger("checkAll")},uncheckAll:function(){this._toggleChecked(!1),this._trigger("uncheckAll")},getChecked:function(){return this.menu.find("input").filter(":checked")},destroy:function(){return t.Widget.prototype.destroy.call(this),this.button.remove(),this.menu.remove(),this.element.show(),this},isOpen:function(){return this._isOpen},widget:function(){return this.menu},getButton:function(){return this.button},_setOption:function(e,i){var n=this.menu;switch(e){case"header":n.find("div.ui-multiselect-header")[i?"show":"hide"]();break;case"checkAllText":n.find("a.ui-multiselect-all span").eq(-1).text(i);break;case"uncheckAllText":n.find("a.ui-multiselect-none span").eq(-1).text(i);break;case"height":n.find("ul").last().height(parseInt(i,10));break;case"minWidth":this.options[e]=parseInt(i,10),this._setButtonWidth(),this._setMenuWidth();break;case"selectedText":case"selectedList":case"noneSelectedText":this.options[e]=i,this.update();break;case"classes":n.add(this.button).removeClass(this.options.classes).addClass(i);break;case"multiple":n.toggleClass("ui-multiselect-single",!i),this.options.multiple=i,this.element[0].multiple=i,this.refresh()}t.Widget.prototype._setOption.apply(this,arguments)}})}(jQuery),$.datepicker._defaults.onAfterUpdate=null;var datepicker__updateDatepicker=$.datepicker._updateDatepicker;$.datepicker._updateDatepicker=function(t){datepicker__updateDatepicker.call(this,t);var e=this._get(t,"onAfterUpdate");e&&e.apply(t.input?t.input[0]:null,[t.input?t.input.val():"",t])},function(t){t.widget("ui.jrange",{options:{dateFormat:"D, d M yy"},_create:function(){var e=this,i=e.options,n=e.element;e.cur=new Date,e.prv=e.cur,e.newSelection=!0,e.input=n.children("input"),e.div=n.children("div"),e.input.val(t.datepicker.formatDate(i.dateFormat,e.cur,{})),e.div.css({position:"absolute"}),e.div.datepicker({changeMonth:!0,changeYear:!0,showButtonPanel:!0,onSelect:function(t,i){e.newSelection=e.newSelection||e.prv.valueOf()!=e.cur.valueOf();
  11. var n=new Date(i.selectedYear,i.selectedMonth,i.selectedDay);e.newSelection?(e.prv=e.cur=n,e.newSelection=!1):(e.prv=e.cur,e.cur=n),e._updateVal()},beforeShowDay:function(t){return[!0,t>=Math.min(e.prv,e.cur)&&t<=Math.max(e.prv,e.cur)?"date-range-selected":""]},onAfterUpdate:function(){var i=e.div.find(".ui-datepicker-buttonpane");i.empty(),t('<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">Done</button>').appendTo(i).on("click",function(){e.div.hide()}),t('<button type="button" class="ui-state-default ui-corner-all">Select Month</button>').appendTo(i).on("click",function(){e.newSelection=!0,e.div.find(".ui-datepicker-calendar").find("a:last").click(),e.div.find(".ui-datepicker-calendar").find("a:first").click()})}}).hide(),e.input.on("focus",function(){e.div.is(":visible")?e.hide():e.show()})},destroy:function(){var t=this;t.div.datepicker("destroy"),t.input.off("focus")},_setOption:function(t,e){var i=this,n=i.options;switch(t){case"dateFormat":n.dateFormat=e,i._updateVal()}},_updateVal:function(){var e=this,i=e.options;if(e.prv.valueOf()==e.cur.valueOf())e.input.val(t.datepicker.formatDate(i.dateFormat,e.cur,{}));else{var n=t.datepicker.formatDate(i.dateFormat,new Date(Math.min(e.prv,e.cur)),{}),r=t.datepicker.formatDate(i.dateFormat,new Date(Math.max(e.prv,e.cur)),{});e.input.val(n+" - "+r)}},getDate:function(){var t=this;return t.getStartDate()},getStartDate:function(){var t=this,e=new Date(Math.min(t.cur,t.prv));return new Date(e.getFullYear(),e.getMonth(),e.getDate())},getEndDate:function(){var t=this,e=new Date(Math.max(t.cur,t.prv));return new Date(e.getFullYear(),e.getMonth(),e.getDate()+1)},show:function(){var t=this;t.newSelection=!0,t.div.show().position({my:"left top",at:"left bottom",of:t.input})},hide:function(){var t=this;t.div.hide()}})}(jQuery),!function(t){"use strict";t(function(){t.support.transition=function(){var t=function(){var t,e=document.createElement("bootstrap"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(t in i)if(void 0!==e.style[t])return i[t]}();return t&&{end:t}}()})}(window.jQuery),!function(t){"use strict";var e='[data-dismiss="alert"]',i=function(i){t(i).on("click",e,this.close)};i.prototype.close=function(e){function i(){n.trigger("closed").remove()}var n,r=t(this),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),n=t(o),e&&e.preventDefault(),n.length||(n=r.hasClass("alert")?r:r.parent()),n.trigger(e=t.Event("close")),e.isDefaultPrevented()||(n.removeClass("in"),t.support.transition&&n.hasClass("fade")?n.on(t.support.transition.end,i):i())};var n=t.fn.alert;t.fn.alert=function(e){return this.each(function(){var n=t(this),r=n.data("alert");r||n.data("alert",r=new i(this)),"string"==typeof e&&r[e].call(n)})},t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.alert.data-api",e,i.prototype.close)}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.button.defaults,i)};e.prototype.setState=function(t){var e="disabled",i=this.$element,n=i.data(),r=i.is("input")?"val":"html";t+="Text",n.resetText||i.data("resetText",i[r]()),i[r](n[t]||this.options[t]),setTimeout(function(){"loadingText"==t?i.addClass(e).attr(e,e):i.removeClass(e).removeAttr(e)},0)},e.prototype.toggle=function(){var t=this.$element.closest('[data-toggle="buttons-radio"]');t&&t.find(".active").removeClass("active"),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=function(i){return this.each(function(){var n=t(this),r=n.data("button"),o="object"==typeof i&&i;r||n.data("button",r=new e(this,o)),"toggle"==i?r.toggle():i&&r.setState(i)})},t.fn.button.defaults={loadingText:"loading..."},t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.button.data-api","[data-toggle^=button]",function(e){var i=t(e.target);i.hasClass("btn")||(i=i.closest(".btn")),i.button("toggle")})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,"hover"==this.options.pause&&this.$element.on("mouseenter",t.proxy(this.pause,this)).on("mouseleave",t.proxy(this.cycle,this))};e.prototype={cycle:function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(e){var i=this.getActiveIndex(),n=this;if(!(e>this.$items.length-1||0>e))return this.sliding?this.$element.one("slid",function(){n.to(e)}):i==e?this.pause().cycle():this.slide(e>i?"next":"prev",t(this.$items[e]))},pause:function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition.end&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),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(e,i){var n,r=this.$element.find(".item.active"),o=i||r[e](),s=this.interval,a="next"==e?"left":"right",l="next"==e?"first":"last",h=this;if(this.sliding=!0,s&&this.pause(),o=o.length?o:this.$element.find(".item")[l](),n=t.Event("slide",{relatedTarget:o[0],direction:a}),!o.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var e=t(h.$indicators.children()[h.getActiveIndex()]);e&&e.addClass("active")})),t.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(n),n.isDefaultPrevented())return;o.addClass(e),o[0].offsetWidth,r.addClass(a),o.addClass(a),this.$element.one(t.support.transition.end,function(){o.removeClass([e,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),h.sliding=!1,setTimeout(function(){h.$element.trigger("slid")},0)})}else{if(this.$element.trigger(n),n.isDefaultPrevented())return;r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}}};var i=t.fn.carousel;t.fn.carousel=function(i){return this.each(function(){var n=t(this),r=n.data("carousel"),o=t.extend({},t.fn.carousel.defaults,"object"==typeof i&&i),s="string"==typeof i?i:o.slide;r||n.data("carousel",r=new e(this,o)),"number"==typeof i?r.to(i):s?r[s]():o.interval&&r.pause().cycle()})},t.fn.carousel.defaults={interval:5e3,pause:"hover"},t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this},t(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(e){var i,n,r=t(this),o=t(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")),s=t.extend({},o.data(),r.data());o.carousel(s),(n=r.attr("data-slide-to"))&&o.data("carousel").pause().to(n).cycle(),e.preventDefault()})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.collapse.defaults,i),this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};e.prototype={constructor:e,dimension:function(){var t=this.$element.hasClass("width");return t?"width":"height"},show:function(){var e,i,n,r;if(!this.transitioning&&!this.$element.hasClass("in")){if(e=this.dimension(),i=t.camelCase(["scroll",e].join("-")),n=this.$parent&&this.$parent.find("> .accordion-group > .in"),n&&n.length){if(r=n.data("collapse"),r&&r.transitioning)return;n.collapse("hide"),r||n.data("collapse",null)}this.$element[e](0),this.transition("addClass",t.Event("show"),"shown"),t.support.transition&&this.$element[e](this.$element[0][i])}},hide:function(){var e;!this.transitioning&&this.$element.hasClass("in")&&(e=this.dimension(),this.reset(this.$element[e]()),this.transition("removeClass",t.Event("hide"),"hidden"),this.$element[e](0))},reset:function(t){var e=this.dimension();return this.$element.removeClass("collapse")[e](t||"auto")[0].offsetWidth,this.$element[null!==t?"addClass":"removeClass"]("collapse"),this},transition:function(e,i,n){var r=this,o=function(){"show"==i.type&&r.reset(),r.transitioning=0,r.$element.trigger(n)};this.$element.trigger(i),i.isDefaultPrevented()||(this.transitioning=1,this.$element[e]("in"),t.support.transition&&this.$element.hasClass("collapse")?this.$element.one(t.support.transition.end,o):o())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var i=t.fn.collapse;t.fn.collapse=function(i){return this.each(function(){var n=t(this),r=n.data("collapse"),o=t.extend({},t.fn.collapse.defaults,n.data(),"object"==typeof i&&i);r||n.data("collapse",r=new e(this,o)),"string"==typeof i&&r[i]()})},t.fn.collapse.defaults={toggle:!0},t.fn.collapse.Constructor=e,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click.collapse.data-api","[data-toggle=collapse]",function(e){var i,n=t(this),r=n.attr("data-target")||e.preventDefault()||(i=n.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),o=t(r).data("collapse")?"toggle":n.data();n[t(r).hasClass("in")?"addClass":"removeClass"]("collapsed"),t(r).collapse(o)})}(window.jQuery),!function(t){"use strict";function e(){t(".dropdown-backdrop").remove(),t(n).each(function(){i(t(this)).removeClass("open")})}function i(e){var i,n=e.attr("data-target");return n||(n=e.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),i=n&&t(n),i&&i.length||(i=e.parent()),i}var n="[data-toggle=dropdown]",r=function(e){var i=t(e).on("click.dropdown.data-api",this.toggle);t("html").on("click.dropdown.data-api",function(){i.parent().removeClass("open")})};r.prototype={constructor:r,toggle:function(){var n,r,o=t(this);if(!o.is(".disabled, :disabled"))return n=i(o),r=n.hasClass("open"),e(),r||("ontouchstart"in document.documentElement&&t('<div class="dropdown-backdrop"/>').insertBefore(t(this)).on("click",e),n.toggleClass("open")),o.focus(),!1},keydown:function(e){var r,o,s,a,l;if(/(38|40|27)/.test(e.keyCode)&&(r=t(this),e.preventDefault(),e.stopPropagation(),!r.is(".disabled, :disabled"))){if(s=i(r),a=s.hasClass("open"),!a||a&&27==e.keyCode)return 27==e.which&&s.find(n).focus(),r.click();o=t("[role=menu] li:not(.divider):visible a",s),o.length&&(l=o.index(o.filter(":focus")),38==e.keyCode&&l>0&&l--,40==e.keyCode&&l<o.length-1&&l++,~l||(l=0),o.eq(l).focus())}}};var o=t.fn.dropdown;t.fn.dropdown=function(e){return this.each(function(){var i=t(this),n=i.data("dropdown");n||i.data("dropdown",n=new r(this)),"string"==typeof e&&n[e].call(i)})},t.fn.dropdown.Constructor=r,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=o,this},t(document).on("click.dropdown.data-api",e).on("click.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.dropdown.data-api",n,r.prototype.toggle).on("keydown.dropdown.data-api",n+", [role=menu]",r.prototype.keydown)}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.options=i,this.$element=t(e).delegate('[data-dismiss="modal"]',"click.dismiss.modal",t.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};e.prototype={constructor:e,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var e=this,i=t.Event("show");this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var i=t.support.transition&&e.$element.hasClass("fade");e.$element.parent().length||e.$element.appendTo(document.body),e.$element.show(),i&&e.$element[0].offsetWidth,e.$element.addClass("in").attr("aria-hidden",!1),e.enforceFocus(),i?e.$element.one(t.support.transition.end,function(){e.$element.focus().trigger("shown")}):e.$element.focus().trigger("shown")}))},hide:function(e){e&&e.preventDefault();e=t.Event("hide"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),t(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),t.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var e=this;t(document).on("focusin.modal",function(t){e.$element[0]!==t.target&&!e.$element.has(t.target).length&&e.$element.focus()})},escape:function(){var t=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(e){27==e.which&&t.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var e=this,i=setTimeout(function(){e.$element.off(t.support.transition.end),e.hideModal()},500);this.$element.one(t.support.transition.end,function(){clearTimeout(i),e.hideModal()})},hideModal:function(){var t=this;this.$element.hide(),this.backdrop(function(){t.removeBackdrop(),t.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(e){var i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var n=t.support.transition&&i;if(this.$backdrop=t('<div class="modal-backdrop '+i+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?t.proxy(this.$element[0].focus,this.$element[0]):t.proxy(this.hide,this)),n&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;n?this.$backdrop.one(t.support.transition.end,e):e()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(t.support.transition.end,e):e()):e&&e()}};var i=t.fn.modal;t.fn.modal=function(i){return this.each(function(){var n=t(this),r=n.data("modal"),o=t.extend({},t.fn.modal.defaults,n.data(),"object"==typeof i&&i);r||n.data("modal",r=new e(this,o)),"string"==typeof i?r[i]():o.show&&r.show()})},t.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.modal.data-api",'[data-toggle="modal"]',function(e){var i=t(this),n=i.attr("href"),r=t(i.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,"")),o=r.data("modal")?"toggle":t.extend({remote:!/#/.test(n)&&n},r.data(),i.data());e.preventDefault(),r.modal(o).one("hide",function(){i.focus()})})}(window.jQuery),!function(t){"use strict";var e=function(t,e){this.init("tooltip",t,e)};e.prototype={constructor:e,init:function(e,i,n){var r,o,s,a,l;for(this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.enabled=!0,s=this.options.trigger.split(" "),l=s.length;l--;)a=s[l],"click"==a?this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this)):"manual"!=a&&(r="hover"==a?"mouseenter":"focus",o="hover"==a?"mouseleave":"blur",this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(o+"."+this.type,this.options.selector,t.proxy(this.leave,this)));this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(e){return e=t.extend({},t.fn[this.type].defaults,this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},enter:function(e){var i,n=t.fn[this.type].defaults,r={};return this._options&&t.each(this._options,function(t,e){n[t]!=e&&(r[t]=e)},this),i=t(e.currentTarget)[this.type](r).data(this.type),i.options.delay&&i.options.delay.show?(clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show),void 0):i.show()},leave:function(e){var i=t(e.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),i.options.delay&&i.options.delay.hide?(i.hoverState="out",void(this.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide))):i.hide()},show:function(){var e,i,n,r,o,s,a=t.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(a),a.isDefaultPrevented())return;switch(e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),o="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,e.detach().css({top:0,left:0,display:"block"}),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element),i=this.getPosition(),n=e[0].offsetWidth,r=e[0].offsetHeight,o){case"bottom":s={top:i.top+i.height,left:i.left+i.width/2-n/2};break;case"top":s={top:i.top-r,left:i.left+i.width/2-n/2};break;case"left":s={top:i.top+i.height/2-r/2,left:i.left-n};break;case"right":s={top:i.top+i.height/2-r/2,left:i.left+i.width}}this.applyPlacement(s,o),this.$element.trigger("shown")}},applyPlacement:function(t,e){var i,n,r,o,s=this.tip(),a=s[0].offsetWidth,l=s[0].offsetHeight;s.offset(t).addClass(e).addClass("in"),i=s[0].offsetWidth,n=s[0].offsetHeight,"top"==e&&n!=l&&(t.top=t.top+l-n,o=!0),"bottom"==e||"top"==e?(r=0,t.left<0&&(r=-2*t.left,t.left=0,s.offset(t),i=s[0].offsetWidth,n=s[0].offsetHeight),this.replaceArrow(r-a+i,i,"left")):this.replaceArrow(n-l,n,"top"),o&&s.offset(t)},replaceArrow:function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},setContent:function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},hide:function(){function e(){var e=setTimeout(function(){i.off(t.support.transition.end).detach()},500);i.one(t.support.transition.end,function(){clearTimeout(e),i.detach()})}var i=this.tip(),n=t.Event("hide");return this.$element.trigger(n),n.isDefaultPrevented()?void 0:(i.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?e():i.detach(),this.$element.trigger("hidden"),this)},fixTitle:function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var e=this.$element[0];return t.extend({},"function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():{width:e.offsetWidth,height:e.offsetHeight},this.$element.offset())},getTitle:function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},tip:function(){return this.$tip=this.$tip||t(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},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(e){var i=e?t(e.currentTarget)[this.type](this._options).data(this.type):this;i.tip().hasClass("in")?i.hide():i.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var i=t.fn.tooltip;t.fn.tooltip=function(i){return this.each(function(){var n=t(this),r=n.data("tooltip"),o="object"==typeof i&&i;r||n.data("tooltip",r=new e(this,o)),"string"==typeof i&&r[i]()})},t.fn.tooltip.Constructor=e,t.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(window.jQuery),!function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype,{constructor:e,setContent:function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content")[this.options.html?"html":"text"](i),t.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var t,e=this.$element,i=this.options;return t=("function"==typeof i.content?i.content.call(e[0]):i.content)||e.attr("data-content")},tip:function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var n=t(this),r=n.data("popover"),o="object"==typeof i&&i;r||n.data("popover",r=new e(this,o)),"string"==typeof i&&r[i]()})},t.fn.popover.Constructor=e,t.fn.popover.defaults=t.extend({},t.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),!function(t){"use strict";function e(e,i){var n,r=t.proxy(this.process,this),o=t(t(e).is("body")?window:e);this.options=t.extend({},t.fn.scrollspy.defaults,i),this.$scrollElement=o.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(n=t(e).attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=t("body"),this.refresh(),this.process()}e.prototype={constructor:e,refresh:function(){var e,i=this;this.offsets=t([]),this.targets=t([]),e=this.$body.find(this.selector).map(function(){var e=t(this),n=e.data("target")||e.attr("href"),r=/^#\w/.test(n)&&t(n);return r&&r.length&&[[r.position().top+(!t.isWindow(i.$scrollElement.get(0))&&i.$scrollElement.scrollTop()),n]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){i.offsets.push(this[0]),i.targets.push(this[1])})},process:function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=i-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(e>=n)return s!=(t=o.last()[0])&&this.activate(t);for(t=r.length;t--;)s!=o[t]&&e>=r[t]&&(!r[t+1]||e<=r[t+1])&&this.activate(o[t])},activate:function(e){var i,n;this.activeTarget=e,t(this.selector).parent(".active").removeClass("active"),n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parent("li").addClass("active"),i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate")}};var i=t.fn.scrollspy;t.fn.scrollspy=function(i){return this.each(function(){var n=t(this),r=n.data("scrollspy"),o="object"==typeof i&&i;r||n.data("scrollspy",r=new e(this,o)),"string"==typeof i&&r[i]()})},t.fn.scrollspy.Constructor=e,t.fn.scrollspy.defaults={offset:10},t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);e.scrollspy(e.data())})})}(window.jQuery),!function(t){"use strict";var e=function(e){this.element=t(e)};e.prototype={constructor:e,show:function(){var e,i,n,r=this.element,o=r.closest("ul:not(.dropdown-menu)"),s=r.attr("data-target");s||(s=r.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,"")),r.parent("li").hasClass("active")||(e=o.find(".active:last a")[0],n=t.Event("show",{relatedTarget:e}),r.trigger(n),n.isDefaultPrevented()||(i=t(s),this.activate(r.parent("li"),o),this.activate(i,i.parent(),function(){r.trigger({type:"shown",relatedTarget:e})})))},activate:function(e,i,n){function r(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),n&&n()}var o=i.find("> .active"),s=n&&t.support.transition&&o.hasClass("fade");s?o.one(t.support.transition.end,r):r(),o.removeClass("in")}};var i=t.fn.tab;t.fn.tab=function(i){return this.each(function(){var n=t(this),r=n.data("tab");r||n.data("tab",r=new e(this)),"string"==typeof i&&r[i]()})},t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=i,this},t(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,i),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=t(this.options.menu),this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:e.top+e.height,left:e.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var e;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(e=t.isFunction(this.source)?this.source(this.query,t.proxy(this.process,this)):this.source,e?this.process(e):this)},process:function(e){var i=this;return e=t.grep(e,function(t){return i.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,i=[],n=[],r=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?n.push(e):r.push(e):i.push(e);return i.concat(n,r)},highlighter:function(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t.replace(new RegExp("("+e+")","ig"),function(t,e){return"<strong>"+e+"</strong>"})},render:function(e){var i=this;return e=t(e).map(function(e,n){return e=t(i.options.item).attr("data-value",n),e.find("a").html(i.highlighter(n)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(){var e=this.$menu.find(".active").removeClass("active"),i=e.next();i.length||(i=t(this.$menu.find("li")[0])),i.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),e=t.prev();e.length||(e=this.$menu.find("li").last()),e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.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()}t.stopPropagation(),t.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var i=t.fn.typeahead;t.fn.typeahead=function(i){return this.each(function(){var n=t(this),r=n.data("typeahead"),o="object"==typeof i&&i;r||n.data("typeahead",r=new e(this,o)),"string"==typeof i&&r[i]()})},t.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},t.fn.typeahead.Constructor=e,t.fn.typeahead.noConflict=function(){return t.fn.typeahead=i,this},t(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var e=t(this);e.data("typeahead")||e.typeahead(e.data())})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.options=t.extend({},t.fn.affix.defaults,i),this.$window=t(window).on("scroll.affix.data-api",t.proxy(this.checkPosition,this)).on("click.affix.data-api",t.proxy(function(){setTimeout(t.proxy(this.checkPosition,this),1)},this)),this.$element=t(e),this.checkPosition()};e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e,i=t(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),o=this.options.offset,s=o.bottom,a=o.top,l="affix affix-top affix-bottom";"object"!=typeof o&&(s=a=o),"function"==typeof a&&(a=o.top()),"function"==typeof s&&(s=o.bottom()),e=null!=this.unpin&&n+this.unpin<=r.top?!1:null!=s&&r.top+this.$element.height()>=i-s?"bottom":null!=a&&a>=n?"top":!1,this.affixed!==e&&(this.affixed=e,this.unpin="bottom"==e?r.top-n:null,this.$element.removeClass(l).addClass("affix"+(e?"-"+e:"")))}};var i=t.fn.affix;t.fn.affix=function(i){return this.each(function(){var n=t(this),r=n.data("affix"),o="object"==typeof i&&i;r||n.data("affix",r=new e(this,o)),"string"==typeof i&&r[i]()})},t.fn.affix.Constructor=e,t.fn.affix.defaults={offset:0},t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var e=t(this),i=e.data();i.offset=i.offset||{},i.offsetBottom&&(i.offset.bottom=i.offsetBottom),i.offsetTop&&(i.offset.top=i.offsetTop),e.affix(i)})})}(window.jQuery),function(){function t(t,e){var i;t||(t={});for(i in e)t[i]=e[i];return t}function e(){var t,e,i=arguments,n={},r=function(t,e){var i,n;"object"!=typeof t&&(t={});for(n in e)e.hasOwnProperty(n)&&(i=e[n],t[n]=i&&"object"==typeof i&&"[object Array]"!==Object.prototype.toString.call(i)&&"renderTo"!==n&&"number"!=typeof i.nodeType?r(t[n]||{},i):e[n]);return t};for(i[0]===!0&&(n=i[1],i=Array.prototype.slice.call(i,2)),e=i.length,t=0;e>t;t++)n=r(n,i[t]);return n}function i(t,e){return parseInt(t,e||10)}function n(t){return"string"==typeof t}function r(t){return t&&"object"==typeof t}function o(t){return"[object Array]"===Object.prototype.toString.call(t)}function s(t){return"number"==typeof t}function a(t){return he.log(t)/he.LN10}function l(t){return he.pow(10,t)}function h(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}}function c(t){return t!==F&&null!==t}function u(t,e,i){var o,s;if(n(e))c(i)?t.setAttribute(e,i):t&&t.getAttribute&&(s=t.getAttribute(e));else if(c(e)&&r(e))for(o in e)t.setAttribute(o,e[o]);return s}function d(t){return o(t)?t:[t]}function p(){var t,e,i=arguments,n=i.length;for(t=0;n>t;t++)if(e=i[t],e!==F&&null!==e)return e}function f(e,i){Te&&!Ce&&i&&i.opacity!==F&&(i.filter="alpha(opacity="+100*i.opacity+")"),t(e.style,i)}function m(e,i,n,r,o){return e=ae.createElement(e),i&&t(e,i),o&&f(e,{padding:0,border:Ne,margin:0}),n&&f(e,n),r&&r.appendChild(e),e}function g(e,i){var n=function(){return F};return n.prototype=new e,t(n.prototype,i),n}function v(t,e,n,r){var o=se.numberFormat,s=O.lang,a=+t||0,l=-1===e?(a.toString().split(".")[1]||"").length:isNaN(e=me(e))?2:e,h=void 0===n?s.decimalPoint:n,s=void 0===r?s.thousandsSep:r,c=0>a?"-":"",u=String(i(a=me(a).toFixed(l))),d=u.length>3?u.length%3:0;return o!==v?o(t,e,n,r):c+(d?u.substr(0,d)+s:"")+u.substr(d).replace(/(\d{3})(?=\d)/g,"$1"+s)+(l?h+me(a-u).toFixed(l).slice(2):"")
  12. }function y(t,e){return Array((e||2)+1-String(t).length).join(0)+t}function E(t,e,i){var n=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments);return t.unshift(n),i.apply(this,t)}}function b(t,e){for(var i,n,r,o,s,a="{",l=!1,h=[];-1!==(a=t.indexOf(a));){if(i=t.slice(0,a),l){for(n=i.split(":"),r=n.shift().split("."),s=r.length,i=e,o=0;s>o;o++)i=i[r[o]];n.length&&(n=n.join(":"),r=/\.([0-9])/,o=O.lang,s=void 0,/f$/.test(n)?(s=(s=n.match(r))?s[1]:-1,null!==i&&(i=v(i,s,o.decimalPoint,n.indexOf(",")>-1?o.thousandsSep:""))):i=U(n,i))}h.push(i),t=t.slice(a+1),a=(l=!l)?"}":"{"}return h.push(t),h.join("")}function _(t){return he.pow(10,ue(he.log(t)/he.LN10))}function T(t,e,i,n){var r,i=p(i,1);for(r=t/i,e||(e=[1,2,2.5,5,10],n===!1&&(1===i?e=[1,2,5,10]:.1>=i&&(e=[1/i]))),n=0;n<e.length&&(t=e[n],!(r<=(e[n]+(e[n+1]||e[n]))/2));n++);return t*=i}function x(t,e){var i,n,r=t.length;for(n=0;r>n;n++)t[n].ss_i=n;for(t.sort(function(t,n){return i=e(t,n),0===i?t.ss_i-n.ss_i:i}),n=0;r>n;n++)delete t[n].ss_i}function w(t){for(var e=t.length,i=t[0];e--;)t[e]<i&&(i=t[e]);return i}function R(t){for(var e=t.length,i=t[0];e--;)t[e]>i&&(i=t[e]);return i}function S(t,e){for(var i in t)t[i]&&t[i]!==e&&t[i].destroy&&t[i].destroy(),delete t[i]}function M(t){B||(B=m(Fe)),t&&B.appendChild(t),B.innerHTML=""}function C(t){return parseFloat(t.toPrecision(14))}function H(t,e){V=p(t,e.animation)}function D(){var t=O.global.useUTC,e=t?"getUTC":"get",i=t?"setUTC":"set";X=O.global.Date||window.Date,Y=6e4*(t&&O.global.timezoneOffset||0),Z=t?X.UTC:function(t,e,i,n,r,o){return new X(t,e,p(i,1),p(n,0),p(r,0),p(o,0)).getTime()},q=e+"Minutes",$=e+"Hours",K=e+"Day",J=e+"Date",Q=e+"Month",te=e+"FullYear",ee=i+"Minutes",ie=i+"Hours",ne=i+"Date",re=i+"Month",oe=i+"FullYear"}function P(){}function k(t,e,i,n){this.axis=t,this.pos=e,this.type=i||"",this.isNew=!0,!i&&!n&&this.addLabel()}function A(){this.init.apply(this,arguments)}function L(){this.init.apply(this,arguments)}function I(t,e,i,n,r){var o=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e,this.x=n,this.total=null,this.points={},this.stack=r,this.alignOptions={align:e.align||(o?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(o?"middle":i?"bottom":"top"),y:p(e.y,o?4:i?14:-6),x:p(e.x,o?i?-6:6:0)},this.textAlign=e.textAlign||(o?i?"right":"left":"center")}var F,N,z,B,O,U,V,j,W,G,X,Z,Y,q,$,K,J,Q,te,ee,ie,ne,re,oe,se,ae=document,le=window,he=Math,ce=he.round,ue=he.floor,de=he.ceil,pe=he.max,fe=he.min,me=he.abs,ge=he.cos,ve=he.sin,ye=he.PI,Ee=2*ye/360,be=navigator.userAgent,_e=le.opera,Te=/msie/i.test(be)&&!_e,xe=8===ae.documentMode,we=/AppleWebKit/.test(be),Re=/Firefox/.test(be),Se=/(Mobile|Android|Windows Phone)/.test(be),Me="http://www.w3.org/2000/svg",Ce=!!ae.createElementNS&&!!ae.createElementNS(Me,"svg").createSVGRect,He=Re&&parseInt(be.split("Firefox/")[1],10)<4,De=!Ce&&!Te&&!!ae.createElement("canvas").getContext,Pe={},ke=0,Ae=function(){return F},Le=[],Ie=0,Fe="div",Ne="none",ze=/^[0-9]+$/,Be="stroke-width",Oe={};le.Highcharts?G(16,!0):se=le.Highcharts={},U=function(e,i,n){if(!c(i)||isNaN(i))return"Invalid date";var r,e=p(e,"%Y-%m-%d %H:%M:%S"),o=new X(i-Y),s=o[$](),a=o[K](),l=o[J](),h=o[Q](),u=o[te](),d=O.lang,f=d.weekdays,o=t({a:f[a].substr(0,3),A:f[a],d:y(l),e:l,b:d.shortMonths[h],B:d.months[h],m:y(h+1),y:u.toString().substr(2,2),Y:u,H:y(s),I:y(s%12||12),l:s%12||12,M:y(o[q]()),p:12>s?"AM":"PM",P:12>s?"am":"pm",S:y(o.getSeconds()),L:y(ce(i%1e3),3)},se.dateFormats);for(r in o)for(;-1!==e.indexOf("%"+r);)e=e.replace("%"+r,"function"==typeof o[r]?o[r](i):o[r]);return n?e.substr(0,1).toUpperCase()+e.substr(1):e},G=function(t,e){var i="Highcharts error #"+t+": www.highcharts.com/errors/"+t;if(e)throw i;le.console&&console.log(i)},W={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:26784e5,year:31556952e3},j={init:function(t,e,i){var n,r,o,e=e||"",s=t.shift,a=e.indexOf("C")>-1,l=a?7:3,e=e.split(" "),i=[].concat(i),h=function(t){for(n=t.length;n--;)"M"===t[n]&&t.splice(n+1,0,t[n+1],t[n+2],t[n+1],t[n+2])};if(a&&(h(e),h(i)),t.isArea&&(r=e.splice(e.length-6,6),o=i.splice(i.length-6,6)),s<=i.length/l&&e.length===i.length)for(;s--;)i=[].concat(i).splice(0,l).concat(i);if(t.shift=0,e.length)for(t=i.length;e.length<t;)s=[].concat(e).splice(e.length-l,l),a&&(s[l-6]=s[l-2],s[l-5]=s[l-1]),e=e.concat(s);return r&&(e=e.concat(r),i=i.concat(o)),[e,i]},step:function(t,e,i,n){var r=[],o=t.length;if(1===i)r=n;else if(o===e.length&&1>i)for(;o--;)n=parseFloat(t[o]),r[o]=isNaN(n)?t[o]:i*parseFloat(e[o]-n)+n;else r=e;return r}},function(e){le.HighchartsAdapter=le.HighchartsAdapter||e&&{init:function(t){var i=e.fx;e.extend(e.easing,{easeOutQuad:function(t,e,i,n,r){return-n*(e/=r)*(e-2)+i}}),e.each(["cur","_default","width","height","opacity"],function(t,n){var r,o=i.step;"cur"===n?o=i.prototype:"_default"===n&&e.Tween&&(o=e.Tween.propHooks[n],n="set"),(r=o[n])&&(o[n]=function(e){var i,e=t?e:this;return"align"!==e.prop?(i=e.elem,i.attr?i.attr(e.prop,"cur"===n?F:e.now):r.apply(this,arguments)):void 0})}),E(e.cssHooks.opacity,"get",function(t,e,i){return e.attr?e.opacity||0:t.call(this,e,i)}),this.addAnimSetter("d",function(e){var i,n=e.elem;e.started||(i=t.init(n,n.d,n.toD),e.start=i[0],e.end=i[1],e.started=!0),n.attr("d",t.step(e.start,e.end,e.pos,n.toD))}),this.each=Array.prototype.forEach?function(t,e){return Array.prototype.forEach.call(t,e)}:function(t,e){var i,n=t.length;for(i=0;n>i;i++)if(e.call(t[i],t[i],i,t)===!1)return i},e.fn.highcharts=function(){var t,e,i="Chart",r=arguments;return this[0]&&(n(r[0])&&(i=r[0],r=Array.prototype.slice.call(r,1)),t=r[0],t!==F&&(t.chart=t.chart||{},t.chart.renderTo=this[0],new se[i](t,r[1]),e=this),t===F&&(e=Le[u(this[0],"data-highcharts-chart")])),e}},addAnimSetter:function(t,i){e.Tween?e.Tween.propHooks[t]={set:i}:e.fx.step[t]=i},getScript:e.getScript,inArray:e.inArray,adapterRun:function(t,i){return e(t)[i]()},grep:e.grep,map:function(t,e){for(var i=[],n=0,r=t.length;r>n;n++)i[n]=e.call(t[n],t[n],n,t);return i},offset:function(t){return e(t).offset()},addEvent:function(t,i,n){e(t).bind(i,n)},removeEvent:function(t,i,n){var r=ae.removeEventListener?"removeEventListener":"detachEvent";ae[r]&&t&&!t[r]&&(t[r]=function(){}),e(t).unbind(i,n)},fireEvent:function(i,n,r,o){var s,a=e.Event(n),l="detached"+n;!Te&&r&&(delete r.layerX,delete r.layerY,delete r.returnValue),t(a,r),i[n]&&(i[l]=i[n],i[n]=null),e.each(["preventDefault","stopPropagation"],function(t,e){var i=a[e];a[e]=function(){try{i.call(a)}catch(t){"preventDefault"===e&&(s=!0)}}}),e(i).trigger(a),i[l]&&(i[n]=i[l],i[l]=null),o&&!a.isDefaultPrevented()&&!s&&o(a)},washMouseEvent:function(t){var e=t.originalEvent||t;return e.pageX===F&&(e.pageX=t.pageX,e.pageY=t.pageY),e},animate:function(t,i,n){var r=e(t);t.style||(t.style={}),i.d&&(t.toD=i.d,i.d=1),r.stop(),i.opacity!==F&&t.attr&&(i.opacity+="px"),t.hasAnim=1,r.animate(i,n)},stop:function(t){t.hasAnim&&e(t).stop()}}}(le.jQuery);var Ue=le.HighchartsAdapter,Ve=Ue||{};Ue&&Ue.init.call(Ue,j);var je=Ve.adapterRun,We=Ve.getScript,Ge=Ve.inArray,Xe=Ve.each,Ze=Ve.grep,Ye=Ve.offset,qe=Ve.map,$e=Ve.addEvent,Ke=Ve.removeEvent,Je=Ve.fireEvent,Qe=Ve.washMouseEvent,ti=Ve.animate,ei=Ve.stop,Ve={enabled:!0,x:0,y:15,style:{color:"#606060",cursor:"default",fontSize:"11px"}};O={colors:"#7cb5ec,#434348,#90ed7d,#f7a35c,#8085e9,#f15c80,#e4d354,#8085e8,#8d4653,#91e8e1".split(","),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),decimalPoint:".",numericSymbols:"k,M,G,T,P,E".split(","),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/4.0.4/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/4.0.4/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",margin:15,style:{color:"#333333",fontSize:"18px"}},subtitle:{text:"",align:"center",style:{color:"#555555"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},lineWidth:2,marker:{lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0,lineWidthPlus:1,radiusPlus:2},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:e(Ve,{align:"center",enabled:!1,formatter:function(){return null===this.y?"":v(this.y,-1)},verticalAlign:"bottom",y:0}),cropThreshold:300,pointRange:0,states:{hover:{lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1e3}},labels:{style:{position:"absolute",color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#909090",borderRadius:0,navigation:{activeColor:"#274b6d",inactiveColor:"#CCC"},shadow:!1,itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"white",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:Ce,backgroundColor:"rgba(249, 249, 249, .85)",borderWidth:1,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{series.color}">●</span> {series.name}: <b>{point.y}</b><br/>',shadow:!0,snap:Se?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"9px"}}};var ii=O.plotOptions,Ue=ii.line;D();var ni=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,ri=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,oi=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,si=function(t){var n,r,o=[];return function(t){t&&t.stops?r=qe(t.stops,function(t){return si(t[1])}):(n=ni.exec(t))?o=[i(n[1]),i(n[2]),i(n[3]),parseFloat(n[4],10)]:(n=ri.exec(t))?o=[i(n[1],16),i(n[2],16),i(n[3],16),1]:(n=oi.exec(t))&&(o=[i(n[1]),i(n[2]),i(n[3]),1])}(t),{get:function(i){var n;return r?(n=e(t),n.stops=[].concat(n.stops),Xe(r,function(t,e){n.stops[e]=[n.stops[e][0],t.get(i)]})):n=o&&!isNaN(o[0])?"rgb"===i?"rgb("+o[0]+","+o[1]+","+o[2]+")":"a"===i?o[3]:"rgba("+o.join(",")+")":t,n},brighten:function(t){if(r)Xe(r,function(e){e.brighten(t)});else if(s(t)&&0!==t){var e;for(e=0;3>e;e++)o[e]+=i(255*t),o[e]<0&&(o[e]=0),o[e]>255&&(o[e]=255)}return this},rgba:o,setOpacity:function(t){return o[3]=t,this}}};P.prototype={opacity:1,textProps:"fontSize,fontWeight,fontFamily,color,lineHeight,width,textDecoration,textShadow,HcTextStroke".split(","),init:function(t,e){this.element="span"===e?m(e):ae.createElementNS(Me,e),this.renderer=t},animate:function(t,i,n){return i=p(i,V,!0),ei(this),i?(i=e(i,{}),n&&(i.complete=n),ti(this,t,i)):(this.attr(t),n&&n()),this},colorGradient:function(t,i,n){var r,s,a,l,h,u,d,p,f,m,g=this.renderer,v=[];if(t.linearGradient?s="linearGradient":t.radialGradient&&(s="radialGradient"),s){a=t[s],l=g.gradients,u=t.stops,f=n.radialReference,o(a)&&(t[s]=a={x1:a[0],y1:a[1],x2:a[2],y2:a[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===s&&f&&!c(a.gradientUnits)&&(a=e(a,{cx:f[0]-f[2]/2+a.cx*f[2],cy:f[1]-f[2]/2+a.cy*f[2],r:a.r*f[2],gradientUnits:"userSpaceOnUse"}));for(m in a)"id"!==m&&v.push(m,a[m]);for(m in u)v.push(u[m]);v=v.join(","),l[v]?t=l[v].attr("id"):(a.id=t="highcharts-"+ke++,l[v]=h=g.createElement(s).attr(a).add(g.defs),h.stops=[],Xe(u,function(t){0===t[1].indexOf("rgba")?(r=si(t[1]),d=r.get("rgb"),p=r.get("a")):(d=t[1],p=1),t=g.createElement("stop").attr({offset:t[0],"stop-color":d,"stop-opacity":p}).add(h),h.stops.push(t)})),n.setAttribute(i,"url("+g.url+"#"+t+")")}},attr:function(t,e){var i,n,r,o,s=this.element,a=this;if("string"==typeof t&&e!==F&&(i=t,t={},t[i]=e),"string"==typeof t)a=(this[t+"Getter"]||this._defaultGetter).call(this,t,s);else{for(i in t)n=t[i],o=!1,this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(i)&&(r||(this.symbolAttr(t),r=!0),o=!0),!this.rotation||"x"!==i&&"y"!==i||(this.doTransform=!0),o||(this[i+"Setter"]||this._defaultSetter).call(this,n,i,s),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(i)&&this.updateShadows(i,n);this.doTransform&&(this.updateTransform(),this.doTransform=!1)}return a},updateShadows:function(t,e){for(var i=this.shadows,n=i.length;n--;)i[n].setAttribute(t,"height"===t?pe(e-(i[n].cutHeight||0),0):"d"===t?this.d:e)},addClass:function(t){var e=this.element,i=u(e,"class")||"";return-1===i.indexOf(t)&&u(e,"class",i+" "+t),this},symbolAttr:function(t){var e=this;Xe("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(i){e[i]=p(t[i],e[i])}),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})},clip:function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":Ne)},crisp:function(t){var e,i,n={},r=t.strokeWidth||this.strokeWidth||0;i=ce(r)%2/2,t.x=ue(t.x||this.x||0)+i,t.y=ue(t.y||this.y||0)+i,t.width=ue((t.width||this.width||0)-2*i),t.height=ue((t.height||this.height||0)-2*i),t.strokeWidth=r;for(e in t)this[e]!==t[e]&&(this[e]=n[e]=t[e]);return n},css:function(e){var n,r,o=this.styles,s={},a=this.element,l="";if(n=!o,e&&e.color&&(e.fill=e.color),o)for(r in e)e[r]!==o[r]&&(s[r]=e[r],n=!0);if(n){if(n=this.textWidth=e&&e.width&&"text"===a.nodeName.toLowerCase()&&i(e.width),o&&(e=t(o,s)),this.styles=e,n&&(De||!Ce&&this.renderer.forExport)&&delete e.width,Te&&!Ce)f(this.element,e);else{o=function(t,e){return"-"+e.toLowerCase()};for(r in e)l+=r.replace(/([A-Z])/g,o)+":"+e[r]+";";u(a,"style",l)}n&&this.added&&this.renderer.buildText(this)}return this},on:function(t,e){var i=this,n=i.element;return z&&"click"===t?(n.ontouchstart=function(t){i.touchEventFired=X.now(),t.preventDefault(),e.call(n,t)},n.onclick=function(t){(-1===be.indexOf("Android")||X.now()-(i.touchEventFired||0)>1100)&&e.call(n,t)}):n["on"+t]=e,this},setRadialReference:function(t){return this.element.radialReference=t,this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(){return this.inverted=!0,this.updateTransform(),this},updateTransform:function(){var t=this.translateX||0,e=this.translateY||0,i=this.scaleX,n=this.scaleY,r=this.inverted,o=this.rotation,s=this.element;r&&(t+=this.attr("width"),e+=this.attr("height")),t=["translate("+t+","+e+")"],r?t.push("rotate(90) scale(-1,1)"):o&&t.push("rotate("+o+" "+(s.getAttribute("x")||0)+" "+(s.getAttribute("y")||0)+")"),(c(i)||c(n))&&t.push("scale("+p(i,1)+" "+p(n,1)+")"),t.length&&s.setAttribute("transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var r,o,s,a,l={};return o=this.renderer,s=o.alignedObjects,t?(this.alignOptions=t,this.alignByTranslate=e,(!i||n(i))&&(this.alignTo=r=i||"renderer",h(s,this),s.push(this),i=null)):(t=this.alignOptions,e=this.alignByTranslate,r=this.alignTo),i=p(i,o[r],o),r=t.align,o=t.verticalAlign,s=(i.x||0)+(t.x||0),a=(i.y||0)+(t.y||0),("right"===r||"center"===r)&&(s+=(i.width-(t.width||0))/{right:1,center:2}[r]),l[e?"translateX":"x"]=ce(s),("bottom"===o||"middle"===o)&&(a+=(i.height-(t.height||0))/({bottom:1,middle:2}[o]||1)),l[e?"translateY":"y"]=ce(a),this[this.placed?"animate":"attr"](l),this.placed=!0,this.alignAttr=l,this},getBBox:function(){var e,i,n=this.bBox,r=this.renderer,o=this.rotation;e=this.element;var s=this.styles,a=o*Ee;i=this.textStr;var l;if((""===i||ze.test(i))&&(l="num."+i.toString().length+(s?"|"+s.fontSize+"|"+s.fontFamily:"")),l&&(n=r.cache[l]),!n){if(e.namespaceURI===Me||r.forExport){try{n=e.getBBox?t({},e.getBBox()):{width:e.offsetWidth,height:e.offsetHeight}}catch(h){}(!n||n.width<0)&&(n={width:0,height:0})}else n=this.htmlGetBBox();r.isSVG&&(e=n.width,i=n.height,Te&&s&&"11px"===s.fontSize&&"16.9"===i.toPrecision(3)&&(n.height=i=14),o&&(n.width=me(i*ve(a))+me(e*ge(a)),n.height=me(i*ge(a))+me(e*ve(a)))),this.bBox=n,l&&(r.cache[l]=n)}return n},show:function(t){return t&&this.element.namespaceURI===Me?this.element.removeAttribute("visibility"):this.attr({visibility:t?"inherit":"visible"}),this},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.attr({y:-9999})}})},add:function(t){var e,n,r=this.renderer,o=t||r,s=o.element||r.box,a=this.element,l=this.zIndex;if(t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&r.buildText(this),l&&(o.handleZ=!0,l=i(l)),o.handleZ)for(t=s.childNodes,e=0;e<t.length;e++)if(r=t[e],o=u(r,"zIndex"),r!==a&&(i(o)>l||!c(l)&&c(o))){s.insertBefore(a,r),n=!0;break}return n||s.appendChild(a),this.added=!0,this.onAdd&&this.onAdd(),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t,e,i=this,n=i.element||{},r=i.shadows,o=i.renderer.isSVG&&"SPAN"===n.nodeName&&i.parentGroup;if(n.onclick=n.onmouseout=n.onmouseover=n.onmousemove=n.point=null,ei(i),i.clipPath&&(i.clipPath=i.clipPath.destroy()),i.stops){for(e=0;e<i.stops.length;e++)i.stops[e]=i.stops[e].destroy();i.stops=null}for(i.safeRemoveChild(n),r&&Xe(r,function(t){i.safeRemoveChild(t)});o&&o.div&&0===o.div.childNodes.length;)n=o.parentGroup,i.safeRemoveChild(o.div),delete o.div,o=n;i.alignTo&&h(i.renderer.alignedObjects,i);for(t in i)delete i[t];return null},shadow:function(t,e,i){var n,r,o,s,a,l,h=[],c=this.element;if(t){for(s=p(t.width,3),a=(t.opacity||.15)/s,l=this.parentInverted?"(-1,-1)":"("+p(t.offsetX,1)+", "+p(t.offsetY,1)+")",n=1;s>=n;n++)r=c.cloneNode(0),o=2*s+1-2*n,u(r,{isShadow:"true",stroke:t.color||"black","stroke-opacity":a*n,"stroke-width":o,transform:"translate"+l,fill:Ne}),i&&(u(r,"height",pe(u(r,"height")-o,0)),r.cutHeight=o),e?e.element.appendChild(r):c.parentNode.insertBefore(r,c),h.push(r);this.shadows=h}return this},xGetter:function(t){return"circle"===this.element.nodeName&&(t={x:"cx",y:"cy"}[t]||t),this._defaultGetter(t)},_defaultGetter:function(t){return t=p(this[t],this.element?this.element.getAttribute(t):null,0),/^[\-0-9\.]+$/.test(t)&&(t=parseFloat(t)),t},dSetter:function(t,e,i){t&&t.join&&(t=t.join(" ")),/(NaN| {2}|^$)/.test(t)&&(t="M 0 0"),i.setAttribute(e,t),this[e]=t},dashstyleSetter:function(t){var e;if(t=t&&t.toLowerCase()){for(t=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","),e=t.length;e--;)t[e]=i(t[e])*this["stroke-width"];t=t.join(",").replace("NaN","none"),this.element.setAttribute("stroke-dasharray",t)}},alignSetter:function(t){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[t])},opacitySetter:function(t,e,i){this[e]=t,i.setAttribute(e,t)},titleSetter:function(t){var e=this.element.getElementsByTagName("title")[0];e||(e=ae.createElementNS(Me,"title"),this.element.appendChild(e)),e.textContent=p(t,"").replace(/<[^>]*>/g,"")},textSetter:function(t){t!==this.textStr&&(delete this.bBox,this.textStr=t,this.added&&this.renderer.buildText(this))},fillSetter:function(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.colorGradient(t,e,i)},zIndexSetter:function(t,e,i){i.setAttribute(e,t),this[e]=t},_defaultSetter:function(t,e,i){i.setAttribute(e,t)}},P.prototype.yGetter=P.prototype.xGetter,P.prototype.translateXSetter=P.prototype.translateYSetter=P.prototype.rotationSetter=P.prototype.verticalAlignSetter=P.prototype.scaleXSetter=P.prototype.scaleYSetter=function(t,e){this[e]=t,this.doTransform=!0},P.prototype["stroke-widthSetter"]=P.prototype.strokeSetter=function(t,e,i){this[e]=t,this.stroke&&this["stroke-width"]?(this.strokeWidth=this["stroke-width"],P.prototype.fillSetter.call(this,this.stroke,"stroke",i),i.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===e&&0===t&&this.hasStroke&&(i.removeAttribute("stroke"),this.hasStroke=!1)};var ai=function(){this.init.apply(this,arguments)};ai.prototype={Element:P,init:function(t,e,i,n,r){var o,s=location,n=this.createElement("svg").attr({version:"1.1"}).css(this.getStyle(n));o=n.element,t.appendChild(o),-1===t.innerHTML.indexOf("xmlns")&&u(o,"xmlns",Me),this.isSVG=!0,this.box=o,this.boxWrapper=n,this.alignedObjects=[],this.url=(Re||we)&&ae.getElementsByTagName("base").length?s.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(ae.createTextNode("Created with Highcharts 4.0.4")),this.defs=this.createElement("defs").add(),this.forExport=r,this.gradients={},this.cache={},this.setSize(e,i,!1);var a;Re&&t.getBoundingClientRect&&(this.subPixelFix=e=function(){f(t,{left:0,top:0}),a=t.getBoundingClientRect(),f(t,{left:de(a.left)-a.left+"px",top:de(a.top)-a.top+"px"})},e(),$e(le,"resize",e))},getStyle:function(e){return this.style=t({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},e)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),S(this.gradients||{}),this.gradients=null,t&&(this.defs=t.destroy()),this.subPixelFix&&Ke(le,"resize",this.subPixelFix),this.alignedObjects=null},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:function(){},buildText:function(t){for(var e,n,r=t.element,o=this,s=o.forExport,a=p(t.textStr,"").toString(),l=-1!==a.indexOf("<"),h=r.childNodes,c=u(r,"x"),d=t.styles,m=t.textWidth,g=d&&d.lineHeight,v=d&&d.HcTextStroke,y=h.length,E=function(t){return g?i(g):o.fontMetrics(/(px|em)$/.test(t&&t.style.fontSize)?t.style.fontSize:d&&d.fontSize||o.style.fontSize||12,t).h};y--;)r.removeChild(h[y]);l||v||-1!==a.indexOf(" ")?(e=/<.*style="([^"]+)".*>/,n=/<.*href="(http[^"]+)".*>/,m&&!t.added&&this.box.appendChild(r),a=l?a.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g):[a],""===a[a.length-1]&&a.pop(),Xe(a,function(i,a){var l,h=0,i=i.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");l=i.split("|||"),Xe(l,function(i){if(""!==i||1===l.length){var p,g={},v=ae.createElementNS(Me,"tspan");if(e.test(i)&&(p=i.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),u(v,"style",p)),n.test(i)&&!s&&(u(v,"onclick",'location.href="'+i.match(n)[1]+'"'),f(v,{cursor:"pointer"})),i=(i.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">")," "!==i){if(v.appendChild(ae.createTextNode(i)),h?g.dx=0:a&&null!==c&&(g.x=c),u(v,g),r.appendChild(v),!h&&a&&(!Ce&&s&&f(v,{display:"block"}),u(v,"dy",E(v))),m)for(var y,b,i=i.replace(/([^\^])-/g,"$1- ").split(" "),g=l.length>1||i.length>1&&"nowrap"!==d.whiteSpace,_=d.HcHeight,T=[],x=E(v),w=1;g&&(i.length||T.length);)delete t.bBox,y=t.getBBox(),b=y.width,!Ce&&o.forExport&&(b=o.measureSpanWidth(v.firstChild.data,t.styles)),y=b>m,y&&1!==i.length?(v.removeChild(v.firstChild),T.unshift(i.pop())):(i=T,T=[],i.length&&(w++,_&&w*x>_?(i=["..."],t.attr("title",t.textStr)):(v=ae.createElementNS(Me,"tspan"),u(v,{dy:x,x:c}),p&&u(v,"style",p),r.appendChild(v))),b>m&&(m=b)),i.length&&v.appendChild(ae.createTextNode(i.join(" ").replace(/- /g,"-")));h++}}})})):r.appendChild(ae.createTextNode(a))},button:function(i,n,r,o,s,a,l,h,c){var u,d,p,f,m,g,v=this.label(i,n,r,c,null,null,null,null,"button"),y=0,i={x1:0,y1:0,x2:0,y2:1},s=e({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:i,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},s);return p=s.style,delete s.style,a=e(s,{stroke:"#68A",fill:{linearGradient:i,stops:[[0,"#FFF"],[1,"#ACF"]]}},a),f=a.style,delete a.style,l=e(s,{stroke:"#68A",fill:{linearGradient:i,stops:[[0,"#9BD"],[1,"#CDF"]]}},l),m=l.style,delete l.style,h=e(s,{style:{color:"#CCC"}},h),g=h.style,delete h.style,$e(v.element,Te?"mouseover":"mouseenter",function(){3!==y&&v.attr(a).css(f)}),$e(v.element,Te?"mouseout":"mouseleave",function(){3!==y&&(u=[s,a,l][y],d=[p,f,m][y],v.attr(u).css(d))}),v.setState=function(t){(v.state=y=t)?2===t?v.attr(l).css(m):3===t&&v.attr(h).css(g):v.attr(s).css(p)},v.on("click",function(){3!==y&&o.call(v)}).attr(s).css(t({cursor:"default"},p))},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=ce(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=ce(t[2])+e%2/2),t},path:function(e){var i={fill:Ne};return o(e)?i.d=e:r(e)&&t(i,e),this.createElement("path").attr(i)},circle:function(t,e,i){return t=r(t)?t:{x:t,y:e,r:i},e=this.createElement("circle"),e.xSetter=function(t){this.element.setAttribute("cx",t)},e.ySetter=function(t){this.element.setAttribute("cy",t)},e.attr(t)},arc:function(t,e,i,n,o,s){return r(t)&&(e=t.y,i=t.r,n=t.innerR,o=t.start,s=t.end,t=t.x),t=this.symbol("arc",t||0,e||0,i||0,i||0,{innerR:n||0,start:o||0,end:s||0}),t.r=i,t},rect:function(t,e,i,n,o,s){var o=r(t)?t.r:o,a=this.createElement("rect"),t=r(t)?t:t===F?{}:{x:t,y:e,width:pe(i,0),height:pe(n,0)};return s!==F&&(t.strokeWidth=s,t=a.crisp(t)),o&&(t.r=o),a.rSetter=function(t){u(this.element,{rx:t,ry:t})},a.attr(t)},setSize:function(t,e,i){var n=this.alignedObjects,r=n.length;for(this.width=t,this.height=e,this.boxWrapper[p(i,!0)?"animate":"attr"]({width:t,height:e});r--;)n[r].align()},g:function(t){var e=this.createElement("g");return c(t)?e.attr({"class":"highcharts-"+t}):e},image:function(e,i,n,r,o){var s={preserveAspectRatio:Ne};return arguments.length>1&&t(s,{x:i,y:n,width:r,height:o}),s=this.createElement("image").attr(s),s.element.setAttributeNS?s.element.setAttributeNS("http://www.w3.org/1999/xlink","href",e):s.element.setAttribute("hc-svg-href",e),s},symbol:function(e,i,n,r,o,s){var a,l,h,c=this.symbols[e],c=c&&c(ce(i),ce(n),r,o,s),u=/^url\((.*?)\)$/;return c?(a=this.path(c),t(a,{symbolName:e,x:i,y:n,width:r,height:o}),s&&t(a,s)):u.test(e)&&(h=function(t,e){t.element&&(t.attr({width:e[0],height:e[1]}),t.alignByTranslate||t.translate(ce((r-e[0])/2),ce((o-e[1])/2)))},l=e.match(u)[1],e=Pe[l]||s&&s.width&&s.height&&[s.width,s.height],a=this.image(l).attr({x:i,y:n}),a.isImg=!0,e?h(a,e):(a.attr({width:0,height:0}),m("img",{onload:function(){h(a,Pe[l]=[this.width,this.height])},src:l}))),a},symbols:{circle:function(t,e,i,n){var r=.166*i;return["M",t+i/2,e,"C",t+i+r,e,t+i+r,e+n,t+i/2,e+n,"C",t-r,e+n,t-r,e,t+i/2,e,"Z"]},square:function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i,e+n,t,e+n,"Z"]},triangle:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n,t,e+n,"Z"]},"triangle-down":function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i/2,e+n,"Z"]},diamond:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n/2,t+i/2,e+n,t,e+n/2,"Z"]},arc:function(t,e,i,n,r){var o=r.start,i=r.r||i||n,s=r.end-.001,n=r.innerR,a=r.open,l=ge(o),h=ve(o),c=ge(s),s=ve(s),r=r.end-o<ye?0:1;return["M",t+i*l,e+i*h,"A",i,i,0,r,1,t+i*c,e+i*s,a?"M":"L",t+n*c,e+n*s,"A",n,n,0,r,0,t+n*l,e+n*h,a?"":"Z"]},callout:function(t,e,i,n,r){var o=fe(r&&r.r||0,i,n),s=o+6,a=r&&r.anchorX,l=r&&r.anchorY,r=ce(r.strokeWidth||0)%2/2;return t+=r,e+=r,r=["M",t+o,e,"L",t+i-o,e,"C",t+i,e,t+i,e,t+i,e+o,"L",t+i,e+n-o,"C",t+i,e+n,t+i,e+n,t+i-o,e+n,"L",t+o,e+n,"C",t,e+n,t,e+n,t,e+n-o,"L",t,e+o,"C",t,e,t,e,t+o,e],a&&a>i&&l>e+s&&e+n-s>l?r.splice(13,3,"L",t+i,l-6,t+i+6,l,t+i,l+6,t+i,e+n-o):a&&0>a&&l>e+s&&e+n-s>l?r.splice(33,3,"L",t,l+6,t-6,l,t,l-6,t,e+o):l&&l>n&&a>t+s&&t+i-s>a?r.splice(23,3,"L",a+6,e+n,a,e+n+6,a-6,e+n,t+o,e+n):l&&0>l&&a>t+s&&t+i-s>a&&r.splice(3,3,"L",a-6,e,a,e-6,a+6,e,i-o,e),r}},clipRect:function(t,e,i,n){var r="highcharts-"+ke++,o=this.createElement("clipPath").attr({id:r}).add(this.defs),t=this.rect(t,e,i,n,0).add(o);return t.id=r,t.clipPath=o,t},text:function(t,e,i,n){var r=De||!Ce&&this.forExport,o={};return n&&!this.forExport?this.html(t,e,i):(o.x=Math.round(e||0),i&&(o.y=Math.round(i)),(t||0===t)&&(o.text=t),t=this.createElement("text").attr(o),r&&t.css({position:"absolute"}),n||(t.xSetter=function(t,e,i){var n,r,o=i.getElementsByTagName("tspan"),s=i.getAttribute(e);for(r=0;r<o.length;r++)n=o[r],n.getAttribute(e)===s&&n.setAttribute(e,t);i.setAttribute(e,t)}),t)},fontMetrics:function(t,e){t=t||this.style.fontSize,e&&le.getComputedStyle&&(e=e.element||e,t=le.getComputedStyle(e,"").fontSize);var t=/px/.test(t)?i(t):/em/.test(t)?12*parseFloat(t):12,n=24>t?t+4:ce(1.2*t),r=ce(.8*n);return{h:n,b:r,f:t}},label:function(i,n,r,o,s,a,l,h,u){function d(){var e,i;e=R.element.style,g=(void 0===v||void 0===y||w.styles.textAlign)&&R.textStr&&R.getBBox(),w.width=(v||g.width||0)+2*M+C,w.height=(y||g.height||0)+2*M,_=M+x.fontMetrics(e&&e.fontSize,R).b,T&&(m||(e=ce(-S*M),i=h?-_:0,w.box=m=o?x.symbol(o,e,i,w.width,w.height,D):x.rect(e,i,w.width,w.height,0,D[Be]),m.attr("fill",Ne).add(w)),m.isImg||m.attr(t({width:ce(w.width),height:ce(w.height)},D)),D=null)}function p(){var t,e=w.styles,e=e&&e.textAlign,i=C+M*(1-S);t=h?0:_,c(v)&&g&&("center"===e||"right"===e)&&(i+={center:.5,right:1}[e]*(v-g.width)),(i!==R.x||t!==R.y)&&(R.attr("x",i),t!==F&&R.attr("y",t)),R.x=i,R.y=t}function f(t,e){m?m.attr(t,e):D[t]=e}var m,g,v,y,E,b,_,T,x=this,w=x.g(u),R=x.text("",0,0,l).attr({zIndex:1}),S=0,M=3,C=0,H=0,D={};w.onAdd=function(){R.add(w),w.attr({text:i||0===i?i:"",x:n,y:r}),m&&c(s)&&w.attr({anchorX:s,anchorY:a})},w.widthSetter=function(t){v=t},w.heightSetter=function(t){y=t},w.paddingSetter=function(t){c(t)&&t!==M&&(M=t,p())},w.paddingLeftSetter=function(t){c(t)&&t!==C&&(C=t,p())},w.alignSetter=function(t){S={left:0,center:.5,right:1}[t]},w.textSetter=function(t){t!==F&&R.textSetter(t),d(),p()},w["stroke-widthSetter"]=function(t,e){t&&(T=!0),H=t%2/2,f(e,t)},w.strokeSetter=w.fillSetter=w.rSetter=function(t,e){"fill"===e&&t&&(T=!0),f(e,t)},w.anchorXSetter=function(t,e){s=t,f(e,t+H-E)},w.anchorYSetter=function(t,e){a=t,f(e,t-b)},w.xSetter=function(t){w.x=t,S&&(t-=S*((v||g.width)+M)),E=ce(t),w.attr("translateX",E)},w.ySetter=function(t){b=w.y=ce(t),w.attr("translateY",b)};var k=w.css;return t(w,{css:function(t){if(t){var i={},t=e(t);Xe(w.textProps,function(e){t[e]!==F&&(i[e]=t[e],delete t[e])}),R.css(i)}return k.call(w,t)},getBBox:function(){return{width:g.width+2*M,height:g.height+2*M,x:g.x-M,y:g.y-M}},shadow:function(t){return m&&m.shadow(t),w},destroy:function(){Ke(w.element,"mouseenter"),Ke(w.element,"mouseleave"),R&&(R=R.destroy()),m&&(m=m.destroy()),P.prototype.destroy.call(w),w=x=d=p=f=null}})}},N=ai,t(P.prototype,{htmlCss:function(e){var i=this.element;return(i=e&&"SPAN"===i.tagName&&e.width)&&(delete e.width,this.textWidth=i,this.updateTransform()),this.styles=t(this.styles,e),f(this.element,e),this},htmlGetBBox:function(){var t=this.element,e=this.bBox;return e||("text"===t.nodeName&&(t.style.position="absolute"),e=this.bBox={x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}),e},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,n=this.translateX||0,r=this.translateY||0,o=this.x||0,s=this.y||0,a=this.textAlign||"left",l={left:0,center:.5,right:1}[a],h=this.shadows;if(f(e,{marginLeft:n,marginTop:r}),h&&Xe(h,function(t){f(t,{marginLeft:n+1,marginTop:r+1})
  13. }),this.inverted&&Xe(e.childNodes,function(i){t.invertChild(i,e)}),"SPAN"===e.tagName){var u,d=this.rotation,m=i(this.textWidth),g=[d,a,e.innerHTML,this.textWidth].join(",");g!==this.cTT&&(u=t.fontMetrics(e.style.fontSize).b,c(d)&&this.setSpanRotation(d,l,u),h=p(this.elemWidth,e.offsetWidth),h>m&&/[ \-]/.test(e.textContent||e.innerText)&&(f(e,{width:m+"px",display:"block",whiteSpace:"normal"}),h=m),this.getSpanCorrection(h,u,l,d,a)),f(e,{left:o+(this.xCorr||0)+"px",top:s+(this.yCorr||0)+"px"}),we&&(u=e.offsetHeight),this.cTT=g}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var n={},r=Te?"-ms-transform":we?"-webkit-transform":Re?"MozTransform":_e?"-o-transform":"";n[r]=n.transform="rotate("+t+"deg)",n[r+(Re?"Origin":"-origin")]=n.transformOrigin=100*e+"% "+i+"px",f(this.element,n)},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),t(ai.prototype,{html:function(e,i,n){var r=this.createElement("span"),o=r.element,s=r.renderer;return r.textSetter=function(t){t!==o.innerHTML&&delete this.bBox,o.innerHTML=this.textStr=t},r.xSetter=r.ySetter=r.alignSetter=r.rotationSetter=function(t,e){"align"===e&&(e="textAlign"),r[e]=t,r.htmlUpdateTransform()},r.attr({text:e,x:ce(i),y:ce(n)}).css({position:"absolute",whiteSpace:"nowrap",fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),r.css=r.htmlCss,s.isSVG&&(r.add=function(e){var i,n=s.box.parentNode,a=[];if(this.parentGroup=e){if(i=e.div,!i){for(;e;)a.push(e),e=e.parentGroup;Xe(a.reverse(),function(e){var r;i=e.div=e.div||m(Fe,{className:u(e.element,"class")},{position:"absolute",left:(e.translateX||0)+"px",top:(e.translateY||0)+"px"},i||n),r=i.style,t(e,{translateXSetter:function(t,i){r.left=t+"px",e[i]=t,e.doTransform=!0},translateYSetter:function(t,i){r.top=t+"px",e[i]=t,e.doTransform=!0},visibilitySetter:function(t,e){r[e]=t}})})}}else i=n;return i.appendChild(o),r.added=!0,r.alignOnAdd&&r.htmlUpdateTransform(),r}),r}});var li;if(!Ce&&!De){li={init:function(t,e){var i=["<",e,' filled="f" stroked="f"'],n=["position: ","absolute",";"],r=e===Fe;("shape"===e||r)&&n.push("left:0;top:0;width:1px;height:1px;"),n.push("visibility: ",r?"hidden":"visible"),i.push(' style="',n.join(""),'"/>'),e&&(i=r||"span"===e||"img"===e?i.join(""):t.prepVML(i),this.element=m(i)),this.renderer=t},add:function(t){var e=this.renderer,i=this.element,n=e.box,n=t?t.element||t:n;return t&&t.inverted&&e.invertChild(i,n),n.appendChild(i),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),this.onAdd&&this.onAdd(),this},updateTransform:P.prototype.htmlUpdateTransform,setSpanRotation:function(){var t=this.rotation,e=ge(t*Ee),i=ve(t*Ee);f(this.element,{filter:t?["progid:DXImageTransform.Microsoft.Matrix(M11=",e,", M12=",-i,", M21=",i,", M22=",e,", sizingMethod='auto expand')"].join(""):Ne})},getSpanCorrection:function(t,e,i,n,r){var o,s=n?ge(n*Ee):1,a=n?ve(n*Ee):0,l=p(this.elemHeight,this.element.offsetHeight);this.xCorr=0>s&&-t,this.yCorr=0>a&&-l,o=0>s*a,this.xCorr+=a*e*(o?1-i:i),this.yCorr-=s*e*(n?o?i:1-i:1),r&&"left"!==r&&(this.xCorr-=t*i*(0>s?-1:1),n&&(this.yCorr-=l*i*(0>a?-1:1)),f(this.element,{textAlign:r}))},pathToVML:function(t){for(var e=t.length,i=[];e--;)s(t[e])?i[e]=ce(10*t[e])-5:"Z"===t[e]?i[e]="x":(i[e]=t[e],!t.isArc||"wa"!==t[e]&&"at"!==t[e]||(i[e+5]===i[e+7]&&(i[e+7]+=t[e+7]>t[e+5]?1:-1),i[e+6]===i[e+8]&&(i[e+8]+=t[e+8]>t[e+6]?1:-1)));return i.join(" ")||"x"},clip:function(t){var e,i=this;return t?(e=t.members,h(e,i),e.push(i),i.destroyClip=function(){h(e,i)},t=t.getCSS(i)):(i.destroyClip&&i.destroyClip(),t={clip:xe?"inherit":"rect(auto)"}),i.css(t)},css:P.prototype.htmlCss,safeRemoveChild:function(t){t.parentNode&&M(t)},destroy:function(){return this.destroyClip&&this.destroyClip(),P.prototype.destroy.apply(this)},on:function(t,e){return this.element["on"+t]=function(){var t=le.event;t.target=t.srcElement,e(t)},this},cutOffPath:function(t,e){var n,t=t.split(/[ ,]/);return n=t.length,(9===n||11===n)&&(t[n-4]=t[n-2]=i(t[n-2])-10*e),t.join(" ")},shadow:function(t,e,n){var r,o,s,a,l,h,c,u=[],d=this.element,f=this.renderer,g=d.style,v=d.path;if(v&&"string"!=typeof v.value&&(v="x"),l=v,t){for(h=p(t.width,3),c=(t.opacity||.15)/h,r=1;3>=r;r++)a=2*h+1-2*r,n&&(l=this.cutOffPath(v.value,a+.5)),s=['<shape isShadow="true" strokeweight="',a,'" filled="false" path="',l,'" coordsize="10 10" style="',d.style.cssText,'" />'],o=m(f.prepVML(s),null,{left:i(g.left)+p(t.offsetX,1),top:i(g.top)+p(t.offsetY,1)}),n&&(o.cutOff=a+1),s=['<stroke color="',t.color||"black",'" opacity="',c*r,'"/>'],m(f.prepVML(s),null,null,o),e?e.element.appendChild(o):d.parentNode.insertBefore(o,d),u.push(o);this.shadows=u}return this},updateShadows:Ae,setAttr:function(t,e){xe?this.element[t]=e:this.element.setAttribute(t,e)},classSetter:function(t){this.element.className=t},dashstyleSetter:function(t,e,i){(i.getElementsByTagName("stroke")[0]||m(this.renderer.prepVML(["<stroke/>"]),null,null,i))[e]=t||"solid",this[e]=t},dSetter:function(t,e,i){var n=this.shadows,t=t||[];if(this.d=t.join&&t.join(" "),i.path=t=this.pathToVML(t),n)for(i=n.length;i--;)n[i].path=n[i].cutOff?this.cutOffPath(t,n[i].cutOff):t;this.setAttr(e,t)},fillSetter:function(t,e,i){var n=i.nodeName;"SPAN"===n?i.style.color=t:"IMG"!==n&&(i.filled=t!==Ne,this.setAttr("fillcolor",this.renderer.color(t,i,e,this)))},opacitySetter:Ae,rotationSetter:function(t,e,i){i=i.style,this[e]=i[e]=t,i.left=-ce(ve(t*Ee)+1)+"px",i.top=ce(ge(t*Ee))+"px"},strokeSetter:function(t,e,i){this.setAttr("strokecolor",this.renderer.color(t,i,e))},"stroke-widthSetter":function(t,e,i){i.stroked=!!t,this[e]=t,s(t)&&(t+="px"),this.setAttr("strokeweight",t)},titleSetter:function(t,e){this.setAttr(e,t)},visibilitySetter:function(t,e,i){"inherit"===t&&(t="visible"),this.shadows&&Xe(this.shadows,function(i){i.style[e]=t}),"DIV"===i.nodeName&&(t="hidden"===t?"-999em":0,xe||(i.style[e]=t?"visible":"hidden"),e="top"),i.style[e]=t},xSetter:function(t,e,i){this[e]=t,"x"===e?e="left":"y"===e&&(e="top"),this.updateClipping?(this[e]=t,this.updateClipping()):i.style[e]=t},zIndexSetter:function(t,e,i){i.style[e]=t}},se.VMLElement=li=g(P,li),li.prototype.ySetter=li.prototype.widthSetter=li.prototype.heightSetter=li.prototype.xSetter;var hi={Element:li,isIE8:be.indexOf("MSIE 8.0")>-1,init:function(e,i,n,r){var o;if(this.alignedObjects=[],r=this.createElement(Fe).css(t(this.getStyle(r),{position:"relative"})),o=r.element,e.appendChild(r.element),this.isVML=!0,this.box=o,this.boxWrapper=r,this.cache={},this.setSize(i,n,!1),!ae.namespaces.hcv){ae.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{ae.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(s){ae.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(e,i,n,o){var s=this.createElement(),a=r(e);return t(s,{members:[],left:(a?e.x:e)+1,top:(a?e.y:i)+1,width:(a?e.width:n)-1,height:(a?e.height:o)-1,getCSS:function(e){var i=e.element,n=i.nodeName,e=e.inverted,r=this.top-("shape"===n?i.offsetTop:0),o=this.left,i=o+this.width,s=r+this.height,r={clip:"rect("+ce(e?o:r)+"px,"+ce(e?s:i)+"px,"+ce(e?i:s)+"px,"+ce(e?r:o)+"px)"};return!e&&xe&&"DIV"===n&&t(r,{width:i+"px",height:s+"px"}),r},updateClipping:function(){Xe(s.members,function(t){t.element&&t.css(s.getCSS(t))})}})},color:function(t,e,i,n){var r,o,s,a=this,l=/^rgba/,h=Ne;if(t&&t.linearGradient?s="gradient":t&&t.radialGradient&&(s="pattern"),s){var c,u,d,p,f,g,v,y,E=t.linearGradient||t.radialGradient,b="",t=t.stops,_=[],T=function(){o=['<fill colors="'+_.join(",")+'" opacity="',f,'" o:opacity2="',p,'" type="',s,'" ',b,'focus="100%" method="any" />'],m(a.prepVML(o),null,null,e)};if(d=t[0],y=t[t.length-1],d[0]>0&&t.unshift([0,d[1]]),y[0]<1&&t.push([1,y[1]]),Xe(t,function(t,e){l.test(t[1])?(r=si(t[1]),c=r.get("rgb"),u=r.get("a")):(c=t[1],u=1),_.push(100*t[0]+"% "+c),e?(f=u,g=c):(p=u,v=c)}),"fill"===i)if("gradient"===s)i=E.x1||E[0]||0,t=E.y1||E[1]||0,d=E.x2||E[2]||0,E=E.y2||E[3]||0,b='angle="'+(90-180*he.atan((E-t)/(d-i))/ye)+'"',T();else{var x,h=E.r,w=2*h,R=2*h,S=E.cx,M=E.cy,C=e.radialReference,h=function(){C&&(x=n.getBBox(),S+=(C[0]-x.x)/x.width-.5,M+=(C[1]-x.y)/x.height-.5,w*=C[2]/x.width,R*=C[2]/x.height),b='src="'+O.global.VMLRadialGradientURL+'" size="'+w+","+R+'" origin="0.5,0.5" position="'+S+","+M+'" color2="'+v+'" ',T()};n.added?h():n.onAdd=h,h=g}else h=c}else l.test(t)&&"IMG"!==e.tagName?(r=si(t),o=["<",i,' opacity="',r.get("a"),'"/>'],m(this.prepVML(o),null,null,e),h=r.get("rgb")):(h=e.getElementsByTagName(i),h.length&&(h[0].opacity=1,h[0].type="solid"),h=t);return h},prepVML:function(t){var e=this.isIE8,t=t.join("");return e?(t=t.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),t=-1===t.indexOf('style="')?t.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):t.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):t=t.replace("<","<hcv:"),t},text:ai.prototype.html,path:function(e){var i={coordsize:"10 10"};return o(e)?i.d=e:r(e)&&t(i,e),this.createElement("shape").attr(i)},circle:function(t,e,i){var n=this.symbol("circle");return r(t)&&(i=t.r,e=t.y,t=t.x),n.isCircle=!0,n.r=i,n.attr({x:t,y:e})},g:function(t){var e;return t&&(e={className:"highcharts-"+t,"class":"highcharts-"+t}),this.createElement(Fe).attr(e)},image:function(t,e,i,n,r){var o=this.createElement("img").attr({src:t});return arguments.length>1&&o.attr({x:e,y:i,width:n,height:r}),o},createElement:function(t){return"rect"===t?this.symbol(t):ai.prototype.createElement.call(this,t)},invertChild:function(t,e){var n=this,r=e.style,o="IMG"===t.tagName&&t.style;f(t,{flip:"x",left:i(r.width)-(o?i(o.top):1),top:i(r.height)-(o?i(o.left):1),rotation:-90}),Xe(t.childNodes,function(e){n.invertChild(e,t)})},symbols:{arc:function(t,e,i,n,r){var o=r.start,s=r.end,a=r.r||i||n,i=r.innerR,n=ge(o),l=ve(o),h=ge(s),c=ve(s);return s-o===0?["x"]:(o=["wa",t-a,e-a,t+a,e+a,t+a*n,e+a*l,t+a*h,e+a*c],r.open&&!i&&o.push("e","M",t,e),o.push("at",t-i,e-i,t+i,e+i,t+i*h,e+i*c,t+i*n,e+i*l,"x","e"),o.isArc=!0,o)},circle:function(t,e,i,n,r){return r&&(i=n=2*r.r),r&&r.isCircle&&(t-=i/2,e-=n/2),["wa",t,e,t+i,e+n,t+i,e+n/2,t+i,e+n/2,"e"]},rect:function(t,e,i,n,r){return ai.prototype.symbols[c(r)&&r.r?"callout":"square"].call(0,t,e,i,n,r)}}};se.VMLRenderer=li=function(){this.init.apply(this,arguments)},li.prototype=e(ai.prototype,hi),N=li}ai.prototype.measureSpanWidth=function(t,e){var i,n=ae.createElement("span");return i=ae.createTextNode(t),n.appendChild(i),f(n,e),this.box.appendChild(n),i=n.offsetWidth,M(n),i};var ci;De&&(se.CanVGRenderer=li=function(){Me="http://www.w3.org/1999/xhtml"},li.prototype.symbols={},ci=function(){function t(){var t,i=e.length;for(t=0;i>t;t++)e[t]();e=[]}var e=[];return{push:function(i,n){0===e.length&&We(n,t),e.push(i)}}}(),N=li),k.prototype={addLabel:function(){var e,i=this.axis,n=i.options,r=i.chart,o=i.horiz,a=i.categories,h=i.names,u=this.pos,d=n.labels,f=d.rotation,m=i.tickPositions,o=o&&a&&!d.step&&!d.staggerLines&&!d.rotation&&r.plotWidth/m.length||!o&&(r.margin[3]||.33*r.chartWidth),g=u===m[0],v=u===m[m.length-1],h=a?p(a[u],h[u],u):u,a=this.label,y=m.info;i.isDatetimeAxis&&y&&(e=n.dateTimeLabelFormats[y.higherRanks[u]||y.unitName]),this.isFirst=g,this.isLast=v,n=i.labelFormatter.call({axis:i,chart:r,isFirst:g,isLast:v,dateTimeLabelFormat:e,value:i.isLog?C(l(h)):h}),u=o&&{width:pe(1,ce(o-2*(d.padding||10)))+"px"},c(a)?a&&a.attr({text:n}).css(u):(e={align:i.labelAlign},s(f)&&(e.rotation=f),o&&d.ellipsis&&(u.HcHeight=i.len/m.length),this.label=a=c(n)&&d.enabled?r.renderer.text(n,0,0,d.useHTML).attr(e).css(t(u,d.style)).add(i.labelGroup):null,i.tickBaseline=r.renderer.fontMetrics(d.style.fontSize,a).b,f&&2===i.side&&(i.tickBaseline*=ge(f*Ee))),this.yOffset=a?p(d.y,i.tickBaseline+(2===i.side?8:-(a.getBBox().height/2))):0},getLabelSize:function(){var t=this.label,e=this.axis;return t?t.getBBox()[e.horiz?"height":"width"]:0},getLabelSides:function(){var t=this.label.getBBox(),e=this.axis,i=e.horiz,n=e.options.labels,t=i?t.width:t.height,e=i?n.x-t*{left:0,center:.5,right:1}[e.labelAlign]:0;return[e,i?t+e:t]},handleOverflow:function(t,e){var i,n,r,o=!0,s=this.axis,a=this.isFirst,l=this.isLast,h=s.horiz?e.x:e.y,c=s.reversed,u=s.tickPositions,d=this.getLabelSides(),p=d[0],d=d[1],f=this.label.line;if(i=f||0,n=s.labelEdge,r=s.justifyLabels&&(a||l),n[i]===F||h+p>n[i]?n[i]=h+d:r||(o=!1),r){i=(n=s.justifyToPlot)?s.pos:0,n=n?i+s.len:s.chart.chartWidth;do t+=a?1:-1,r=s.ticks[u[t]];while(u[t]&&(!r||!r.label||r.label.line!==f));s=r&&r.label.xy&&r.label.xy.x+r.getLabelSides()[a?0:1],a&&!c||l&&c?i>h+p&&(h=i-p,r&&h+d>s&&(o=!1)):h+d>n&&(h=n-d,r&&s>h+p&&(o=!1)),e.x=h}return o},getPosition:function(t,e,i,n){var r=this.axis,o=r.chart,s=n&&o.oldChartHeight||o.chartHeight;return{x:t?r.translate(e+i,null,null,n)+r.transB:r.left+r.offset+(r.opposite?(n&&o.oldChartWidth||o.chartWidth)-r.right-r.left:0),y:t?s-r.bottom+r.offset-(r.opposite?r.height:0):s-r.translate(e+i,null,null,n)-r.transB}},getLabelPosition:function(t,e,i,n,r,o,s,a){var l=this.axis,h=l.transA,c=l.reversed,u=l.staggerLines,t=t+r.x-(o&&n?o*h*(c?-1:1):0),e=e+this.yOffset-(o&&!n?o*h*(c?1:-1):0);return u&&(i.line=s/(a||1)%u,e+=i.line*(l.labelOffset/u)),{x:t,y:e}},getMarkPath:function(t,e,i,n,r,o){return o.crispLine(["M",t,e,"L",t+(r?0:-i),e+(r?i:0)],n)},render:function(t,e,i){var n=this.axis,r=n.options,o=n.chart.renderer,s=n.horiz,a=this.type,l=this.label,h=this.pos,c=r.labels,u=this.gridLine,d=a?a+"Grid":"grid",f=a?a+"Tick":"tick",m=r[d+"LineWidth"],g=r[d+"LineColor"],v=r[d+"LineDashStyle"],y=r[f+"Length"],d=r[f+"Width"]||0,E=r[f+"Color"],b=r[f+"Position"],f=this.mark,_=c.step,T=!0,x=n.tickmarkOffset,w=this.getPosition(s,h,x,e),R=w.x,w=w.y,S=s&&R===n.pos+n.len||!s&&w===n.pos?-1:1,i=p(i,1);this.isActive=!0,m&&(h=n.getPlotLinePath(h+x,m*S,e,!0),u===F&&(u={stroke:g,"stroke-width":m},v&&(u.dashstyle=v),a||(u.zIndex=1),e&&(u.opacity=0),this.gridLine=u=m?o.path(h).attr(u).add(n.gridGroup):null),!e&&u&&h&&u[this.isNew?"attr":"animate"]({d:h,opacity:i})),d&&y&&("inside"===b&&(y=-y),n.opposite&&(y=-y),a=this.getMarkPath(R,w,y,d*S,s,o),f?f.animate({d:a,opacity:i}):this.mark=o.path(a).attr({stroke:E,"stroke-width":d,opacity:i}).add(n.axisGroup)),l&&!isNaN(R)&&(l.xy=w=this.getLabelPosition(R,w,l,s,c,x,t,_),this.isFirst&&!this.isLast&&!p(r.showFirstLabel,1)||this.isLast&&!this.isFirst&&!p(r.showLastLabel,1)?T=!1:!n.isRadial&&!c.step&&!c.rotation&&!e&&0!==i&&(T=this.handleOverflow(t,w)),_&&t%_&&(T=!1),T&&!isNaN(w.y)?(w.opacity=i,l[this.isNew?"attr":"animate"](w),this.isNew=!1):l.attr("y",-9999))},destroy:function(){S(this,this.axis)}},se.PlotLineOrBand=function(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)},se.PlotLineOrBand.prototype={render:function(){var t,i=this,n=i.axis,r=n.horiz,o=(n.pointRange||0)/2,s=i.options,l=s.label,h=i.label,u=s.width,d=s.to,p=s.from,f=c(p)&&c(d),m=s.value,g=s.dashStyle,v=i.svgElem,y=[],E=s.color,b=s.zIndex,_=s.events,T={},x=n.chart.renderer;if(n.isLog&&(p=a(p),d=a(d),m=a(m)),u)y=n.getPlotLinePath(m,u),T={stroke:E,"stroke-width":u},g&&(T.dashstyle=g);else{if(!f)return;p=pe(p,n.min-o),d=fe(d,n.max+o),y=n.getPlotBandPath(p,d,s),E&&(T.fill=E),s.borderWidth&&(T.stroke=s.borderColor,T["stroke-width"]=s.borderWidth)}if(c(b)&&(T.zIndex=b),v)y?v.animate({d:y},null,v.onGetPath):(v.hide(),v.onGetPath=function(){v.show()},h&&(i.label=h=h.destroy()));else if(y&&y.length&&(i.svgElem=v=x.path(y).attr(T).add(),_))for(t in o=function(t){v.on(t,function(e){_[t].apply(i,[e])})},_)o(t);return l&&c(l.text)&&y&&y.length&&n.width>0&&n.height>0?(l=e({align:r&&f&&"center",x:r?!f&&4:10,verticalAlign:!r&&f&&"middle",y:r?f?16:10:f?6:-4,rotation:r&&!f&&90},l),h||(T={align:l.textAlign||l.align,rotation:l.rotation},c(b)&&(T.zIndex=b),i.label=h=x.text(l.text,0,0,l.useHTML).attr(T).css(l.style).add()),n=[y[1],y[4],f?y[6]:y[1]],f=[y[2],y[5],f?y[7]:y[2]],y=w(n),r=w(f),h.align(l,!1,{x:y,y:r,width:R(n)-y,height:R(f)-r}),h.show()):h&&h.hide(),i},destroy:function(){h(this.axis.plotLinesAndBands,this),delete this.axis,S(this)}},A.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:Ve,lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#707070"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return v(this.total,-1)},style:Ve.style}},defaultLeftAxisOptions:{labels:{x:-15,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:null},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-15},title:{rotation:0}},init:function(t,e){var i=e.isX;this.horiz=t.inverted?!i:i,this.coll=(this.isXAxis=i)?"xAxis":"yAxis",this.opposite=e.opposite,this.side=e.side||(this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(e);var n=this.options,r=n.type;this.labelFormatter=n.labels.formatter||this.defaultLabelFormatter,this.userOptions=e,this.minPixelPadding=0,this.chart=t,this.reversed=n.reversed,this.zoomEnabled=n.zoomEnabled!==!1,this.categories=n.categories||"category"===r,this.names=[],this.isLog="logarithmic"===r,this.isDatetimeAxis="datetime"===r,this.isLinked=c(n.linkedTo),this.tickmarkOffset=this.categories&&"between"===n.tickmarkPlacement&&1===p(n.tickInterval,1)?.5:0,this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=n.minRange||n.maxZoom,this.range=n.range,this.offset=n.offset||0,this.stacks={},this.oldStacks={},this.min=this.max=null,this.crosshair=p(n.crosshair,d(t.options.tooltip.crosshairs)[i?0:1],!1);var o,n=this.options.events;-1===Ge(this,t.axes)&&(i&&!this.isColorAxis?t.axes.splice(t.xAxis.length,0,this):t.axes.push(this),t[this.coll].push(this)),this.series=this.series||[],t.inverted&&i&&this.reversed===F&&(this.reversed=!0),this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(o in n)$e(this,o,n[o]);this.isLog&&(this.val2lin=a,this.lin2val=l)},setOptions:function(t){this.options=e(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],e(O[this.coll],t))},defaultLabelFormatter:function(){var t,e=this.axis,i=this.value,n=e.categories,r=this.dateTimeLabelFormat,o=O.lang.numericSymbols,s=o&&o.length,a=e.options.labels.format,e=e.isLog?i:e.tickInterval;if(a)t=b(a,this);else if(n)t=i;else if(r)t=U(r,i);else if(s&&e>=1e3)for(;s--&&t===F;)n=Math.pow(1e3,s+1),e>=n&&null!==o[s]&&(t=v(i/n,-1)+o[s]);return t===F&&(t=me(i)>=1e4?v(i,0):v(i,-1,F,"")),t},getSeriesExtremes:function(){var t=this,e=t.chart;t.hasVisibleSeries=!1,t.dataMin=t.dataMax=t.ignoreMinPadding=t.ignoreMaxPadding=null,t.buildStacks&&t.buildStacks(),Xe(t.series,function(i){if(i.visible||!e.options.chart.ignoreHiddenSeries){var n;n=i.options.threshold;var r;t.hasVisibleSeries=!0,t.isLog&&0>=n&&(n=null),t.isXAxis?(n=i.xData,n.length&&(t.dataMin=fe(p(t.dataMin,n[0]),w(n)),t.dataMax=pe(p(t.dataMax,n[0]),R(n)))):(i.getExtremes(),r=i.dataMax,i=i.dataMin,c(i)&&c(r)&&(t.dataMin=fe(p(t.dataMin,i),i),t.dataMax=pe(p(t.dataMax,r),r)),c(n)&&(t.dataMin>=n?(t.dataMin=n,t.ignoreMinPadding=!0):t.dataMax<n&&(t.dataMax=n,t.ignoreMaxPadding=!0)))}})},translate:function(t,e,i,n,r,o){var a=1,l=0,h=n?this.oldTransA:this.transA,n=n?this.oldMin:this.min,c=this.minPixelPadding,r=(this.options.ordinal||this.isLog&&r)&&this.lin2val;return h||(h=this.transA),i&&(a*=-1,l=this.len),this.reversed&&(a*=-1,l-=a*(this.sector||this.len)),e?(t=t*a+l,t-=c,t=t/h+n,r&&(t=this.lin2val(t))):(r&&(t=this.val2lin(t)),"between"===o&&(o=.5),t=a*(t-n)*h+l+a*c+(s(o)?h*o*this.pointRange:0)),t},toPixels:function(t,e){return this.translate(t,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(t,e,i,n,r){var o,s,a,l=this.chart,h=this.left,c=this.top,u=i&&l.oldChartHeight||l.chartHeight,d=i&&l.oldChartWidth||l.chartWidth;return o=this.transB,r=p(r,this.translate(t,null,null,i)),t=i=ce(r+o),o=s=ce(u-r-o),isNaN(r)?a=!0:this.horiz?(o=c,s=u-this.bottom,(h>t||t>h+this.width)&&(a=!0)):(t=h,i=d-this.right,(c>o||o>c+this.height)&&(a=!0)),a&&!n?null:l.renderer.crispLine(["M",t,o,"L",i,s],e||1)},getLinearTickPositions:function(t,e,i){var n,r=C(ue(e/t)*t),o=C(de(i/t)*t),a=[];if(e===i&&s(e))return[e];for(e=r;o>=e&&(a.push(e),e=C(e+t),e!==n);)n=e;return a},getMinorTickPositions:function(){var t,e=this.options,i=this.tickPositions,n=this.minorTickInterval,r=[];if(this.isLog)for(t=i.length,e=1;t>e;e++)r=r.concat(this.getLogTickPositions(n,i[e-1],i[e],!0));else if(this.isDatetimeAxis&&"auto"===e.minorTickInterval)r=r.concat(this.getTimeTicks(this.normalizeTimeTickInterval(n),this.min,this.max,e.startOfWeek)),r[0]<this.min&&r.shift();else for(i=this.min+(i[0]-this.min)%n;i<=this.max;i+=n)r.push(i);return r},adjustForMinRange:function(){var t,e,i,n,r,o,s=this.options,a=this.min,l=this.max,h=this.dataMax-this.dataMin>=this.minRange;if(this.isXAxis&&this.minRange===F&&!this.isLog&&(c(s.min)||c(s.max)?this.minRange=null:(Xe(this.series,function(t){for(r=t.xData,i=o=t.xIncrement?1:r.length-1;i>0;i--)n=r[i]-r[i-1],(e===F||e>n)&&(e=n)}),this.minRange=fe(5*e,this.dataMax-this.dataMin))),l-a<this.minRange){var u=this.minRange;t=(u-l+a)/2,t=[a-t,p(s.min,a-t)],h&&(t[2]=this.dataMin),a=R(t),l=[a+u,p(s.max,a+u)],h&&(l[2]=this.dataMax),l=w(l),u>l-a&&(t[0]=l-u,t[1]=p(s.min,l-u),a=R(t))}this.min=a,this.max=l},setAxisTranslation:function(t){var e,i=this,r=i.max-i.min,o=i.axisPointRange||0,s=0,a=0,l=i.linkedParent,h=!!i.categories,u=i.transA;(i.isXAxis||h||o)&&(l?(s=l.minPointOffset,a=l.pointRangePadding):Xe(i.series,function(t){var l=h?1:i.isXAxis?t.pointRange:i.axisPointRange||0,u=t.options.pointPlacement,d=t.closestPointRange;l>r&&(l=0),o=pe(o,l),s=pe(s,n(u)?0:l/2),a=pe(a,"on"===u?0:l),!t.noSharedTooltip&&c(d)&&(e=c(e)?fe(e,d):d)}),l=i.ordinalSlope&&e?i.ordinalSlope/e:1,i.minPointOffset=s*=l,i.pointRangePadding=a*=l,i.pointRange=fe(o,r),i.closestPointRange=e),t&&(i.oldTransA=u),i.translationSlope=i.transA=u=i.len/(r+a||1),i.transB=i.horiz?i.left:i.bottom,i.minPixelPadding=u*s},setTickPositions:function(t){var e,i=this,n=i.chart,r=i.options,o=r.startOnTick,l=r.endOnTick,h=i.isLog,u=i.isDatetimeAxis,d=i.isXAxis,f=i.isLinked,m=i.options.tickPositioner,g=r.maxPadding,v=r.minPadding,y=r.tickInterval,E=r.minTickInterval,b=r.tickPixelInterval,x=i.categories;f?(i.linkedParent=n[i.coll][r.linkedTo],n=i.linkedParent.getExtremes(),i.min=p(n.min,n.dataMin),i.max=p(n.max,n.dataMax),r.type!==i.linkedParent.options.type&&G(11,1)):(i.min=p(i.userMin,r.min,i.dataMin),i.max=p(i.userMax,r.max,i.dataMax)),h&&(!t&&fe(i.min,p(i.dataMin,i.min))<=0&&G(10,1),i.min=C(a(i.min)),i.max=C(a(i.max))),i.range&&c(i.max)&&(i.userMin=i.min=pe(i.min,i.max-i.range),i.userMax=i.max,i.range=null),i.beforePadding&&i.beforePadding(),i.adjustForMinRange(),x||i.axisPointRange||i.usePercentage||f||!c(i.min)||!c(i.max)||!(n=i.max-i.min)||(c(r.min)||c(i.userMin)||!v||!(i.dataMin<0)&&i.ignoreMinPadding||(i.min-=n*v),c(r.max)||c(i.userMax)||!g||!(i.dataMax>0)&&i.ignoreMaxPadding||(i.max+=n*g)),s(r.floor)&&(i.min=pe(i.min,r.floor)),s(r.ceiling)&&(i.max=fe(i.max,r.ceiling)),i.min===i.max||void 0===i.min||void 0===i.max?i.tickInterval=1:f&&!y&&b===i.linkedParent.options.tickPixelInterval?i.tickInterval=i.linkedParent.tickInterval:(i.tickInterval=p(y,x?1:(i.max-i.min)*b/pe(i.len,b)),!c(y)&&i.len<b&&!this.isRadial&&!this.isLog&&!x&&o&&l&&(e=!0,i.tickInterval/=4)),d&&!t&&Xe(i.series,function(t){t.processData(i.min!==i.oldMin||i.max!==i.oldMax)}),i.setAxisTranslation(!0),i.beforeSetTickPositions&&i.beforeSetTickPositions(),i.postProcessTickInterval&&(i.tickInterval=i.postProcessTickInterval(i.tickInterval)),i.pointRange&&(i.tickInterval=pe(i.pointRange,i.tickInterval)),!y&&i.tickInterval<E&&(i.tickInterval=E),u||h||y||(i.tickInterval=T(i.tickInterval,null,_(i.tickInterval),p(r.allowDecimals,!(i.tickInterval>1&&i.tickInterval<5&&i.max>1e3&&i.max<9999)))),i.minorTickInterval="auto"===r.minorTickInterval&&i.tickInterval?i.tickInterval/5:r.minorTickInterval,i.tickPositions=t=r.tickPositions?[].concat(r.tickPositions):m&&m.apply(i,[i.min,i.max]),t||(!i.ordinalPositions&&(i.max-i.min)/i.tickInterval>pe(2*i.len,200)&&G(19,!0),t=u?i.getTimeTicks(i.normalizeTimeTickInterval(i.tickInterval,r.units),i.min,i.max,r.startOfWeek,i.ordinalPositions,i.closestPointRange,!0):h?i.getLogTickPositions(i.tickInterval,i.min,i.max):i.getLinearTickPositions(i.tickInterval,i.min,i.max),e&&t.splice(1,t.length-2),i.tickPositions=t),f||(r=t[0],h=t[t.length-1],u=i.minPointOffset||0,o?i.min=r:i.min-u>r&&t.shift(),l?i.max=h:i.max+u<h&&t.pop(),0===t.length&&c(r)&&t.push((h+r)/2),1===t.length&&(o=me(i.max)>1e13?1:.001,i.min-=o,i.max+=o))},setMaxTicks:function(){var t=this.chart,e=t.maxTicks||{},i=this.tickPositions,n=this._maxTicksKey=[this.coll,this.pos,this.len].join("-");!this.isLinked&&!this.isDatetimeAxis&&i&&i.length>(e[n]||0)&&this.options.alignTicks!==!1&&(e[n]=i.length),t.maxTicks=e},adjustTickAmount:function(){var t=this._maxTicksKey,e=this.tickPositions,i=this.chart.maxTicks;if(i&&i[t]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1&&this.min!==F){var n=this.tickAmount,r=e.length;if(this.tickAmount=t=i[t],t>r){for(;e.length<t;)e.push(C(e[e.length-1]+this.tickInterval));this.transA*=(r-1)/(t-1),this.max=e[e.length-1]}c(n)&&t!==n&&(this.isDirty=!0)}},setScale:function(){var t,e,i,n,r=this.stacks;if(this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),n=this.len!==this.oldAxisLength,Xe(this.series,function(t){(t.isDirtyData||t.isDirty||t.xAxis.isDirty)&&(i=!0)}),n||i||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax){if(!this.isXAxis)for(t in r)for(e in r[t])r[t][e].total=null,r[t][e].cum=0;this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickPositions(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=n||this.min!==this.oldMin||this.max!==this.oldMax)}else if(!this.isXAxis){this.oldStacks&&(r=this.stacks=this.oldStacks);for(t in r)for(e in r[t])r[t][e].cum=r[t][e].total}this.setMaxTicks()},setExtremes:function(e,i,n,r,o){var s=this,a=s.chart,n=p(n,!0),o=t(o,{min:e,max:i});Je(s,"setExtremes",o,function(){s.userMin=e,s.userMax=i,s.eventArgs=o,s.isDirtyExtremes=!0,n&&a.redraw(r)})},zoom:function(t,e){var i=this.dataMin,n=this.dataMax,r=this.options;return this.allowZoomOutside||(c(i)&&t<=fe(i,p(r.min,i))&&(t=F),c(n)&&e>=pe(n,p(r.max,n))&&(e=F)),this.displayBtn=t!==F||e!==F,this.setExtremes(t,e,!1,F,{trigger:"zoom"}),!0},setAxisSize:function(){var t=this.chart,e=this.options,i=e.offsetLeft||0,n=this.horiz,r=p(e.width,t.plotWidth-i+(e.offsetRight||0)),o=p(e.height,t.plotHeight),s=p(e.top,t.plotTop),e=p(e.left,t.plotLeft+i),i=/%$/;i.test(o)&&(o=parseInt(o,10)/100*t.plotHeight),i.test(s)&&(s=parseInt(s,10)/100*t.plotHeight+t.plotTop),this.left=e,this.top=s,this.width=r,this.height=o,this.bottom=t.chartHeight-o-s,this.right=t.chartWidth-r-e,this.len=pe(n?r:o,0),this.pos=n?e:s},getExtremes:function(){var t=this.isLog;return{min:t?C(l(this.min)):this.min,max:t?C(l(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=this.isLog,i=e?l(this.min):this.min,e=e?l(this.max):this.max;return i>t||null===t?t=i:t>e&&(t=e),this.translate(t,0,1,0,1)},autoLabelAlign:function(t){return t=(p(t,0)-90*this.side+720)%360,t>15&&165>t?"right":t>195&&345>t?"left":"center"},getOffset:function(){var t,e,i,n,r,o,s,a,l,h=this,u=h.chart,d=u.renderer,f=h.options,m=h.tickPositions,g=h.ticks,v=h.horiz,y=h.side,E=u.inverted?[1,0,3,2][y]:y,b=0,_=0,T=f.title,x=f.labels,w=0,R=u.axisOffset,u=u.clipOffset,S=[-1,1,1,-1][y],M=1,C=p(x.maxStaggerLines,5);if(h.hasData=t=h.hasVisibleSeries||c(h.min)&&c(h.max)&&!!m,h.showAxis=e=t||p(f.showEmpty,!0),h.staggerLines=h.horiz&&x.staggerLines,h.axisGroup||(h.gridGroup=d.g("grid").attr({zIndex:f.gridZIndex||1}).add(),h.axisGroup=d.g("axis").attr({zIndex:f.zIndex||2}).add(),h.labelGroup=d.g("axis-labels").attr({zIndex:x.zIndex||7}).addClass("highcharts-"+h.coll.toLowerCase()+"-labels").add()),t||h.isLinked){if(h.labelAlign=p(x.align||h.autoLabelAlign(x.rotation)),Xe(m,function(t){g[t]?g[t].addLabel():g[t]=new k(h,t)}),h.horiz&&!h.staggerLines&&C&&!x.rotation){for(t=h.reversed?[].concat(m).reverse():m;C>M;){for(r=[],o=!1,n=0;n<t.length;n++)s=t[n],a=(a=g[s].label&&g[s].label.getBBox())?a.width:0,l=n%M,a&&(s=h.translate(s),r[l]!==F&&s<r[l]&&(o=!0),r[l]=s+a);if(!o)break;M++}M>1&&(h.staggerLines=M)}Xe(m,function(t){(0===y||2===y||{1:"left",3:"right"}[y]===h.labelAlign)&&(w=pe(g[t].getLabelSize(),w))}),h.staggerLines&&(w*=h.staggerLines,h.labelOffset=w)}else for(n in g)g[n].destroy(),delete g[n];T&&T.text&&T.enabled!==!1&&(h.axisTitle||(h.axisTitle=d.text(T.text,0,0,T.useHTML).attr({zIndex:7,rotation:T.rotation||0,align:T.textAlign||{low:"left",middle:"center",high:"right"}[T.align]}).addClass("highcharts-"+this.coll.toLowerCase()+"-title").css(T.style).add(h.axisGroup),h.axisTitle.isNew=!0),e&&(b=h.axisTitle.getBBox()[v?"height":"width"],i=T.offset,_=c(i)?0:p(T.margin,v?5:10)),h.axisTitle[e?"show":"hide"]()),h.offset=S*p(f.offset,R[y]),d=2===y?h.tickBaseline:0,v=w+_+(w&&S*(v?p(x.y,h.tickBaseline+8):x.x)-d),h.axisTitleMargin=p(i,v),R[y]=pe(R[y],h.axisTitleMargin+b+S*h.offset,v),u[E]=pe(u[E],2*ue(f.lineWidth/2))},getLinePath:function(t){var e=this.chart,i=this.opposite,n=this.offset,r=this.horiz,o=this.left+(i?this.width:0)+n,n=e.chartHeight-this.bottom-(i?this.height:0)+n;return i&&(t*=-1),e.renderer.crispLine(["M",r?this.left:o,r?n:this.top,"L",r?e.chartWidth-this.right:o,r?n:e.chartHeight-this.bottom],t)},getTitlePosition:function(){var t=this.horiz,e=this.left,n=this.top,r=this.len,o=this.options.title,s=t?e:n,a=this.opposite,l=this.offset,h=i(o.style.fontSize||12),r={low:s+(t?0:r),middle:s+r/2,high:s+(t?r:0)}[o.align],e=(t?n+this.height:e)+(t?1:-1)*(a?-1:1)*this.axisTitleMargin+(2===this.side?h:0);return{x:t?r:e+(a?this.width:0)+l+(o.x||0),y:t?e-(a?this.height:0)+l:r+(o.y||0)}},render:function(){var t,e,i,n=this,r=n.horiz,o=n.reversed,s=n.chart,a=s.renderer,h=n.options,u=n.isLog,d=n.isLinked,p=n.tickPositions,f=n.axisTitle,m=n.ticks,g=n.minorTicks,v=n.alternateBands,y=h.stackLabels,E=h.alternateGridColor,b=n.tickmarkOffset,_=h.lineWidth,T=s.hasRendered&&c(n.oldMin)&&!isNaN(n.oldMin),x=n.hasData,w=n.showAxis,R=h.labels.overflow,S=n.justifyLabels=r&&R!==!1;n.labelEdge.length=0,n.justifyToPlot="justify"===R,Xe([m,g,v],function(t){for(var e in t)t[e].isActive=!1}),(x||d)&&(n.minorTickInterval&&!n.categories&&Xe(n.getMinorTickPositions(),function(t){g[t]||(g[t]=new k(n,t,"minor")),T&&g[t].isNew&&g[t].render(null,!0),g[t].render(null,!1,1)}),p.length&&(t=p.slice(),(r&&o||!r&&!o)&&t.reverse(),S&&(t=t.slice(1).concat([t[0]])),Xe(t,function(e,i){S&&(i=i===t.length-1?0:i+1),(!d||e>=n.min&&e<=n.max)&&(m[e]||(m[e]=new k(n,e)),T&&m[e].isNew&&m[e].render(i,!0,.1),m[e].render(i))}),b&&0===n.min&&(m[-1]||(m[-1]=new k(n,-1,null,!0)),m[-1].render(-1))),E&&Xe(p,function(t,r){r%2===0&&t<n.max&&(v[t]||(v[t]=new se.PlotLineOrBand(n)),e=t+b,i=p[r+1]!==F?p[r+1]+b:n.max,v[t].options={from:u?l(e):e,to:u?l(i):i,color:E},v[t].render(),v[t].isActive=!0)
  14. }),n._addedPlotLB||(Xe((h.plotLines||[]).concat(h.plotBands||[]),function(t){n.addPlotBandOrLine(t)}),n._addedPlotLB=!0)),Xe([m,g,v],function(t){var e,i,n=[],r=V?V.duration||500:0,o=function(){for(i=n.length;i--;)t[n[i]]&&!t[n[i]].isActive&&(t[n[i]].destroy(),delete t[n[i]])};for(e in t)t[e].isActive||(t[e].render(e,!1,0),t[e].isActive=!1,n.push(e));t!==v&&s.hasRendered&&r?r&&setTimeout(o,r):o()}),_&&(r=n.getLinePath(_),n.axisLine?n.axisLine.animate({d:r}):n.axisLine=a.path(r).attr({stroke:h.lineColor,"stroke-width":_,zIndex:7}).add(n.axisGroup),n.axisLine[w?"show":"hide"]()),f&&w&&(f[f.isNew?"attr":"animate"](n.getTitlePosition()),f.isNew=!1),y&&y.enabled&&n.renderStackTotals(),n.isDirty=!1},redraw:function(){this.render(),Xe(this.plotLinesAndBands,function(t){t.render()}),Xe(this.series,function(t){t.isDirty=!0})},destroy:function(t){var e,i=this,n=i.stacks,r=i.plotLinesAndBands;t||Ke(i);for(e in n)S(n[e]),n[e]=null;for(Xe([i.ticks,i.minorTicks,i.alternateBands],function(t){S(t)}),t=r.length;t--;)r[t].destroy();Xe("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","),function(t){i[t]&&(i[t]=i[t].destroy())}),this.cross&&this.cross.destroy()},drawCrosshair:function(t,e){if(this.crosshair)if((c(e)||!p(this.crosshair.snap,!0))===!1)this.hideCrosshair();else{var i,n=this.crosshair,r=n.animation;p(n.snap,!0)?c(e)&&(i=this.chart.inverted!=this.horiz?e.plotX:this.len-e.plotY):i=this.horiz?t.chartX-this.pos:this.len-t.chartY+this.pos,i=this.isRadial?this.getPlotLinePath(this.isXAxis?e.x:p(e.stackY,e.y)):this.getPlotLinePath(null,null,null,null,i),null===i?this.hideCrosshair():this.cross?this.cross.attr({visibility:"visible"})[r?"animate":"attr"]({d:i},r):(r={"stroke-width":n.width||1,stroke:n.color||"#C0C0C0",zIndex:n.zIndex||2},n.dashStyle&&(r.dashstyle=n.dashStyle),this.cross=this.chart.renderer.path(i).attr(r).add())}},hideCrosshair:function(){this.cross&&this.cross.hide()}},t(A.prototype,{getPlotBandPath:function(t,e){var i=this.getPlotLinePath(e),n=this.getPlotLinePath(t);return n&&i?n.push(i[4],i[5],i[1],i[2]):n=null,n},addPlotBand:function(t){return this.addPlotBandOrLine(t,"plotBands")},addPlotLine:function(t){return this.addPlotBandOrLine(t,"plotLines")},addPlotBandOrLine:function(t,e){var i=new se.PlotLineOrBand(this,t).render(),n=this.userOptions;return i&&(e&&(n[e]=n[e]||[],n[e].push(t)),this.plotLinesAndBands.push(i)),i},removePlotBandOrLine:function(t){for(var e=this.plotLinesAndBands,i=this.options,n=this.userOptions,r=e.length;r--;)e[r].id===t&&e[r].destroy();Xe([i.plotLines||[],n.plotLines||[],i.plotBands||[],n.plotBands||[]],function(e){for(r=e.length;r--;)e[r].id===t&&h(e,e[r])})}}),A.prototype.getTimeTicks=function(e,i,n,r){var o,s=[],a={},l=O.global.useUTC,h=new X(i-Y),u=e.unitRange,d=e.count;if(c(i)){u>=W.second&&(h.setMilliseconds(0),h.setSeconds(u>=W.minute?0:d*ue(h.getSeconds()/d))),u>=W.minute&&h[ee](u>=W.hour?0:d*ue(h[q]()/d)),u>=W.hour&&h[ie](u>=W.day?0:d*ue(h[$]()/d)),u>=W.day&&h[ne](u>=W.month?1:d*ue(h[J]()/d)),u>=W.month&&(h[re](u>=W.year?0:d*ue(h[Q]()/d)),o=h[te]()),u>=W.year&&(o-=o%d,h[oe](o)),u===W.week&&h[ne](h[J]()-h[K]()+p(r,1)),i=1,Y&&(h=new X(h.getTime()+Y)),o=h[te]();for(var r=h.getTime(),f=h[Q](),m=h[J](),g=(W.day+(l?Y:6e4*h.getTimezoneOffset()))%W.day;n>r;)s.push(r),u===W.year?r=Z(o+i*d,0):u===W.month?r=Z(o,f+i*d):l||u!==W.day&&u!==W.week?r+=u*d:r=Z(o,f,m+i*d*(u===W.day?1:7)),i++;s.push(r),Xe(Ze(s,function(t){return u<=W.hour&&t%W.day===g}),function(t){a[t]="day"})}return s.info=t(e,{higherRanks:a,totalRange:u*d}),s},A.prototype.normalizeTimeTickInterval=function(t,e){var i,n=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],r=n[n.length-1],o=W[r[0]],s=r[1];for(i=0;i<n.length&&(r=n[i],o=W[r[0]],s=r[1],!(n[i+1]&&t<=(o*s[s.length-1]+W[n[i+1][0]])/2));i++);return o===W.year&&5*o>t&&(s=[1,2,5]),n=T(t/o,s,"year"===r[0]?pe(_(t/o),1):1),{unitRange:o,count:n,unitName:r[0]}},A.prototype.getLogTickPositions=function(t,e,i,n){var r=this.options,o=this.len,s=[];if(n||(this._minorAutoInterval=null),t>=.5)t=ce(t),s=this.getLinearTickPositions(t,e,i);else if(t>=.08)for(var h,c,u,d,f,o=ue(e),r=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];i+1>o&&!f;o++)for(c=r.length,h=0;c>h&&!f;h++)u=a(l(o)*r[h]),u>e&&(!n||i>=d)&&d!==F&&s.push(d),d>i&&(f=!0),d=u;else e=l(e),i=l(i),t=r[n?"minorTickInterval":"tickInterval"],t=p("auto"===t?null:t,this._minorAutoInterval,(i-e)*(r.tickPixelInterval/(n?5:1))/((n?o/this.tickPositions.length:o)||1)),t=T(t,null,_(t)),s=qe(this.getLinearTickPositions(t,e,i),a),n||(this._minorAutoInterval=t/5);return n||(this.tickInterval=t),s};var ui=se.Tooltip=function(){this.init.apply(this,arguments)};ui.prototype={init:function(t,e){var n=e.borderWidth,r=e.style,o=i(r.padding);this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.label=t.renderer.label("",0,0,e.shape||"callout",null,null,e.useHTML,null,"tooltip").attr({padding:o,fill:e.backgroundColor,"stroke-width":n,r:e.borderRadius,zIndex:8}).css(r).css({padding:0}).add().attr({y:-9999}),De||this.label.shadow(e.shadow),this.shared=e.shared},destroy:function(){this.label&&(this.label=this.label.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(e,i,n,r){var o=this,s=o.now,a=o.options.animation!==!1&&!o.isHidden&&(me(e-s.x)>1||me(i-s.y)>1),l=o.followPointer||o.len>1;t(s,{x:a?(2*s.x+e)/3:e,y:a?(s.y+i)/2:i,anchorX:l?F:a?(2*s.anchorX+n)/3:n,anchorY:l?F:a?(s.anchorY+r)/2:r}),o.label.attr(s),a&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){o&&o.move(e,i,n,r)},32))},hide:function(t){var e,i=this;clearTimeout(this.hideTimer),this.isHidden||(e=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){i.label.fadeOut(),i.isHidden=!0},p(t,this.options.hideDelay,500)),e&&Xe(e,function(t){t.setState()}),this.chart.hoverPoints=null)},getAnchor:function(t,e){var i,n,r=this.chart,o=r.inverted,s=r.plotTop,a=0,l=0,t=d(t);return i=t[0].tooltipPos,this.followPointer&&e&&(e.chartX===F&&(e=r.pointer.normalize(e)),i=[e.chartX-r.plotLeft,e.chartY-s]),i||(Xe(t,function(t){n=t.series.yAxis,a+=t.plotX,l+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!o&&n?n.top-s:0)}),a/=t.length,l/=t.length,i=[o?r.plotWidth-l:a,this.shared&&!o&&t.length>1&&e?e.chartY-s:o?r.plotHeight-a:l]),qe(i,ce)},getPosition:function(t,e,i){var n,r=this.chart,o=this.distance,s={},a=["y",r.chartHeight,e,i.plotY+r.plotTop],l=["x",r.chartWidth,t,i.plotX+r.plotLeft],h=i.ttBelow||r.inverted&&!i.negative||!r.inverted&&i.negative,c=function(t,e,i,n){var r=n-o>i,e=e>n+o+i,i=n-o-i;if(n+=o,h&&e)s[t]=n;else if(!h&&r)s[t]=i;else if(r)s[t]=i;else{if(!e)return!1;s[t]=n}},u=function(t,e,i,n){return o>n||n>e-o?!1:void(s[t]=i/2>n?1:n>e-i/2?e-i-2:n-i/2)},d=function(t){var e=a;a=l,l=e,n=t},p=function(){c.apply(0,a)!==!1?u.apply(0,l)===!1&&!n&&(d(!0),p()):n?s.x=s.y=0:(d(!0),p())};return(r.inverted||this.len>1)&&d(),p(),s},defaultFormatter:function(t){var e,i=this.points||d(this),n=i[0].series;return e=[t.tooltipHeaderFormatter(i[0])],Xe(i,function(t){n=t.series,e.push(n.tooltipFormatter&&n.tooltipFormatter(t)||t.point.tooltipFormatter(n.tooltipOptions.pointFormat))}),e.push(t.options.footerFormat||""),e.join("")},refresh:function(t,e){var i,n,r,o=this.chart,s=this.label,a=this.options,l={},h=[];r=a.formatter||this.defaultFormatter;var c,l=o.hoverPoints,u=this.shared;clearTimeout(this.hideTimer),this.followPointer=d(t)[0].series.tooltipOptions.followPointer,n=this.getAnchor(t,e),i=n[0],n=n[1],!u||t.series&&t.series.noSharedTooltip?l=t.getLabelConfig():(o.hoverPoints=t,l&&Xe(l,function(t){t.setState()}),Xe(t,function(t){t.setState("hover"),h.push(t.getLabelConfig())}),l={x:t[0].category,y:t[0].y},l.points=h,this.len=h.length,t=t[0]),r=r.call(l,this),l=t.series,this.distance=p(l.tooltipOptions.distance,16),r===!1?this.hide():(this.isHidden&&(ei(s),s.attr("opacity",1).show()),s.attr({text:r}),c=a.borderColor||t.color||l.color||"#606060",s.attr({stroke:c}),this.updatePosition({plotX:i,plotY:n,negative:t.negative,ttBelow:t.ttBelow}),this.isHidden=!1),Je(o,"tooltipRefresh",{text:r,x:i+o.plotLeft,y:n+o.plotTop,borderColor:c})},updatePosition:function(t){var e=this.chart,i=this.label,i=(this.options.positioner||this.getPosition).call(this,i.width,i.height,t);this.move(ce(i.x),ce(i.y),t.plotX+e.plotLeft,t.plotY+e.plotTop)},tooltipHeaderFormatter:function(t){var e,i=t.series,n=i.tooltipOptions,r=n.dateTimeLabelFormats,o=n.xDateFormat,a=i.xAxis,l=a&&"datetime"===a.options.type&&s(t.key),n=n.headerFormat,a=a&&a.closestPointRange;if(l&&!o){if(a){for(e in W)if(W[e]>=a||W[e]<=W.day&&t.key%W[e]>0){o=r[e];break}}else o=r.day;o=o||r.year}return l&&o&&(n=n.replace("{point.key}","{point.key:"+o+"}")),b(n,{point:t,series:i})}};var di;z=ae.documentElement.ontouchstart!==F;var pi=se.Pointer=function(t,e){this.init(t,e)};if(pi.prototype={init:function(t,e){var i,n=e.chart,r=n.events,o=De?"":n.zoomType,n=t.inverted;this.options=e,this.chart=t,this.zoomX=i=/x/.test(o),this.zoomY=o=/y/.test(o),this.zoomHor=i&&!n||o&&n,this.zoomVert=o&&!n||i&&n,this.hasZoom=i||o,this.runChartClick=r&&!!r.click,this.pinchDown=[],this.lastValidTouch={},se.Tooltip&&e.tooltip.enabled&&(t.tooltip=new ui(t,e.tooltip),this.followTouchMove=e.tooltip.followTouchMove),this.setDOMEvents()},normalize:function(e,i){var n,r,e=e||window.event,e=Qe(e);return e.target||(e.target=e.srcElement),r=e.touches?e.touches.length?e.touches.item(0):e.changedTouches[0]:e,i||(this.chartPosition=i=Ye(this.chart.container)),r.pageX===F?(n=pe(e.x,e.clientX-i.left),r=e.y):(n=r.pageX-i.left,r=r.pageY-i.top),t(e,{chartX:ce(n),chartY:ce(r)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return Xe(this.chart.axes,function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},getIndex:function(t){var e=this.chart;return e.inverted?e.plotHeight+e.plotTop-t.chartY:t.chartX-e.plotLeft},runPointActions:function(t){var e,i,n,r,o=this.chart,s=o.series,a=o.tooltip,l=o.hoverPoint,h=o.hoverSeries,c=o.chartWidth,u=this.getIndex(t);if(a&&this.options.tooltip.shared&&(!h||!h.noSharedTooltip)){for(i=[],n=s.length,r=0;n>r;r++)s[r].visible&&s[r].options.enableMouseTracking!==!1&&!s[r].noSharedTooltip&&s[r].singularTooltips!==!0&&s[r].tooltipPoints.length&&(e=s[r].tooltipPoints[u])&&e.series&&(e._dist=me(u-e.clientX),c=fe(c,e._dist),i.push(e));for(n=i.length;n--;)i[n]._dist>c&&i.splice(n,1);i.length&&i[0].clientX!==this.hoverX&&(a.refresh(i,t),this.hoverX=i[0].clientX)}s=h&&h.tooltipOptions.followPointer,h&&h.tracker&&!s?(e=h.tooltipPoints[u])&&e!==l&&e.onMouseOver(t):a&&s&&!a.isHidden&&(h=a.getAnchor([{}],t),a.updatePosition({plotX:h[0],plotY:h[1]})),a&&!this._onDocumentMouseMove&&(this._onDocumentMouseMove=function(t){Le[di]&&Le[di].pointer.onDocumentMouseMove(t)},$e(ae,"mousemove",this._onDocumentMouseMove)),Xe(o.axes,function(i){i.drawCrosshair(t,p(e,l))})},reset:function(t,e){var i=this.chart,n=i.hoverSeries,r=i.hoverPoint,o=i.tooltip,s=o&&o.shared?i.hoverPoints:r;(t=t&&o&&s)&&d(s)[0].plotX===F&&(t=!1),t?(o.refresh(s),r&&r.setState(r.state,!0)):(r&&r.onMouseOut(),n&&n.onMouseOut(),o&&o.hide(e),this._onDocumentMouseMove&&(Ke(ae,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null),Xe(i.axes,function(t){t.hideCrosshair()}),this.hoverX=null)},scaleGroups:function(t,e){var i,n=this.chart;Xe(n.series,function(r){i=t||r.getPlotBox(),r.xAxis&&r.xAxis.zoomEnabled&&(r.group.attr(i),r.markerGroup&&(r.markerGroup.attr(i),r.markerGroup.clip(e?n.clipRect:null)),r.dataLabelsGroup&&r.dataLabelsGroup.attr(i))}),n.clipRect.attr(e||n.clipBox)},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i=this.chart,n=i.options.chart,r=t.chartX,o=t.chartY,s=this.zoomHor,a=this.zoomVert,l=i.plotLeft,h=i.plotTop,c=i.plotWidth,u=i.plotHeight,d=this.mouseDownX,p=this.mouseDownY,f=n.panKey&&t[n.panKey+"Key"];l>r?r=l:r>l+c&&(r=l+c),h>o?o=h:o>h+u&&(o=h+u),this.hasDragged=Math.sqrt(Math.pow(d-r,2)+Math.pow(p-o,2)),this.hasDragged>10&&(e=i.isInsidePlot(d-l,p-h),i.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&!f&&!this.selectionMarker&&(this.selectionMarker=i.renderer.rect(l,h,s?1:c,a?1:u,0).attr({fill:n.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add()),this.selectionMarker&&s&&(r-=d,this.selectionMarker.attr({width:me(r),x:(r>0?0:r)+d})),this.selectionMarker&&a&&(r=o-p,this.selectionMarker.attr({height:me(r),y:(r>0?0:r)+p})),e&&!this.selectionMarker&&n.panning&&i.pan(t,n.panning))},drop:function(e){var i=this.chart,n=this.hasPinched;if(this.selectionMarker){var r,o={xAxis:[],yAxis:[],originalEvent:e.originalEvent||e},s=this.selectionMarker,a=s.attr?s.attr("x"):s.x,l=s.attr?s.attr("y"):s.y,h=s.attr?s.attr("width"):s.width,c=s.attr?s.attr("height"):s.height;(this.hasDragged||n)&&(Xe(i.axes,function(t){if(t.zoomEnabled){var i=t.horiz,n="touchend"===e.type?t.minPixelPadding:0,s=t.toValue((i?a:l)+n),i=t.toValue((i?a+h:l+c)-n);!isNaN(s)&&!isNaN(i)&&(o[t.coll].push({axis:t,min:fe(s,i),max:pe(s,i)}),r=!0)}}),r&&Je(i,"selection",o,function(e){i.zoom(t(e,n?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),n&&this.scaleGroups()}i&&(f(i.container,{cursor:i._cursor}),i.cancelClick=this.hasDragged>10,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){t=this.normalize(t),t.preventDefault&&t.preventDefault(),this.dragStart(t)},onDocumentMouseUp:function(t){Le[di]&&Le[di].pointer.drop(t)},onDocumentMouseMove:function(t){var e=this.chart,i=this.chartPosition,n=e.hoverSeries,t=this.normalize(t,i);i&&n&&!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&this.reset()},onContainerMouseLeave:function(){var t=Le[di];t&&(t.pointer.reset(),t.pointer.chartPosition=null)},onContainerMouseMove:function(t){var e=this.chart;di=e.index,t=this.normalize(t),t.returnValue=!1,"mousedown"===e.mouseIsDown&&this.drag(t),(this.inClass(t.target,"highcharts-tracker")||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop))&&!e.openMenu&&this.runPointActions(t)},inClass:function(t,e){for(var i;t;){if(i=u(t,"class")){if(-1!==i.indexOf(e))return!0;if(-1!==i.indexOf("highcharts-container"))return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries,i=(t=t.relatedTarget||t.toElement)&&t.point&&t.point.series;!e||e.options.stickyTracking||this.inClass(t,"highcharts-tooltip")||i===e||e.onMouseOut()},onContainerClick:function(e){var i=this.chart,n=i.hoverPoint,r=i.plotLeft,o=i.plotTop,e=this.normalize(e);e.cancelBubble=!0,i.cancelClick||(n&&this.inClass(e.target,"highcharts-tracker")?(Je(n.series,"click",t(e,{point:n})),i.hoverPoint&&n.firePointEvent("click",e)):(t(e,this.getCoordinates(e)),i.isInsidePlot(e.chartX-r,e.chartY-o)&&Je(i,"click",e)))},setDOMEvents:function(){var t=this,e=t.chart.container;e.onmousedown=function(e){t.onContainerMouseDown(e)},e.onmousemove=function(e){t.onContainerMouseMove(e)},e.onclick=function(e){t.onContainerClick(e)},$e(e,"mouseleave",t.onContainerMouseLeave),1===Ie&&$e(ae,"mouseup",t.onDocumentMouseUp),z&&(e.ontouchstart=function(e){t.onContainerTouchStart(e)},e.ontouchmove=function(e){t.onContainerTouchMove(e)},1===Ie&&$e(ae,"touchend",t.onDocumentTouchEnd))},destroy:function(){var t;Ke(this.chart.container,"mouseleave",this.onContainerMouseLeave),Ie||(Ke(ae,"mouseup",this.onDocumentMouseUp),Ke(ae,"touchend",this.onDocumentTouchEnd)),clearInterval(this.tooltipTimeout);for(t in this)this[t]=null}},t(se.Pointer.prototype,{pinchTranslate:function(t,e,i,n,r,o){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,t,e,i,n,r,o),(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,t,e,i,n,r,o)},pinchTranslateDirection:function(t,e,i,n,r,o,s,a){var l,h,c,u=this.chart,d=t?"x":"y",p=t?"X":"Y",f="chart"+p,m=t?"width":"height",g=u["plot"+(t?"Left":"Top")],v=a||1,y=u.inverted,E=u.bounds[t?"h":"v"],b=1===e.length,_=e[0][f],T=i[0][f],x=!b&&e[1][f],w=!b&&i[1][f],i=function(){!b&&me(_-x)>20&&(v=a||me(T-w)/me(_-x)),h=(g-T)/v+_,l=u["plot"+(t?"Width":"Height")]/v};i(),e=h,e<E.min?(e=E.min,c=!0):e+l>E.max&&(e=E.max-l,c=!0),c?(T-=.8*(T-s[d][0]),b||(w-=.8*(w-s[d][1])),i()):s[d]=[T,w],y||(o[d]=h-g,o[m]=l),o=y?1/v:v,r[m]=l,r[d]=e,n[y?t?"scaleY":"scaleX":"scale"+p]=v,n["translate"+p]=o*g+(T-o*_)},pinch:function(e){var i=this,n=i.chart,r=i.pinchDown,o=i.followTouchMove,s=e.touches,a=s.length,l=i.lastValidTouch,h=i.hasZoom,c=i.selectionMarker,u={},d=1===a&&(i.inClass(e.target,"highcharts-tracker")&&n.runTrackerClick||i.runChartClick),f={};(h||o)&&!d&&e.preventDefault(),qe(s,function(t){return i.normalize(t)}),"touchstart"===e.type?(Xe(s,function(t,e){r[e]={chartX:t.chartX,chartY:t.chartY}}),l.x=[r[0].chartX,r[1]&&r[1].chartX],l.y=[r[0].chartY,r[1]&&r[1].chartY],Xe(n.axes,function(t){if(t.zoomEnabled){var e=n.bounds[t.horiz?"h":"v"],i=t.minPixelPadding,r=t.toPixels(p(t.options.min,t.dataMin)),o=t.toPixels(p(t.options.max,t.dataMax)),s=fe(r,o),r=pe(r,o);e.min=fe(t.pos,s-i),e.max=pe(t.pos+t.len,r+i)}}),i.res=!0):r.length&&(c||(i.selectionMarker=c=t({destroy:Ae},n.plotBox)),i.pinchTranslate(r,s,u,c,f,l),i.hasPinched=h,i.scaleGroups(u,f),!h&&o&&1===a?this.runPointActions(i.normalize(e)):i.res&&(i.res=!1,this.reset(!1,0)))},onContainerTouchStart:function(t){var e=this.chart;di=e.index,1===t.touches.length?(t=this.normalize(t),e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)?(this.runPointActions(t),this.pinch(t)):this.reset()):2===t.touches.length&&this.pinch(t)},onContainerTouchMove:function(t){(1===t.touches.length||2===t.touches.length)&&this.pinch(t)},onDocumentTouchEnd:function(t){Le[di]&&Le[di].pointer.drop(t)}}),le.PointerEvent||le.MSPointerEvent){var fi={},mi=!!le.PointerEvent,gi=function(){var t,e=[];e.item=function(t){return this[t]};for(t in fi)fi.hasOwnProperty(t)&&e.push({pageX:fi[t].pageX,pageY:fi[t].pageY,target:fi[t].target});return e},vi=function(t,e,i,n){t=t.originalEvent||t,"touch"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_TOUCH||!Le[di]||(n(t),n=Le[di].pointer,n[e]({type:i,target:t.currentTarget,preventDefault:Ae,touches:gi()}))};t(pi.prototype,{onContainerPointerDown:function(t){vi(t,"onContainerTouchStart","touchstart",function(t){fi[t.pointerId]={pageX:t.pageX,pageY:t.pageY,target:t.currentTarget}})},onContainerPointerMove:function(t){vi(t,"onContainerTouchMove","touchmove",function(t){fi[t.pointerId]={pageX:t.pageX,pageY:t.pageY},fi[t.pointerId].target||(fi[t.pointerId].target=t.currentTarget)})},onDocumentPointerUp:function(t){vi(t,"onContainerTouchEnd","touchend",function(t){delete fi[t.pointerId]})},batchMSEvents:function(t){t(this.chart.container,mi?"pointerdown":"MSPointerDown",this.onContainerPointerDown),t(this.chart.container,mi?"pointermove":"MSPointerMove",this.onContainerPointerMove),t(ae,mi?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),E(pi.prototype,"init",function(t,e,i){t.call(this,e,i),(this.hasZoom||this.followTouchMove)&&f(e.container,{"-ms-touch-action":Ne,"touch-action":Ne})}),E(pi.prototype,"setDOMEvents",function(t){t.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents($e)}),E(pi.prototype,"destroy",function(t){this.batchMSEvents(Ke),t.call(this)})}var yi=se.Legend=function(t,e){this.init(t,e)};yi.prototype={init:function(t,i){var n=this,r=i.itemStyle,o=p(i.padding,8),s=i.itemMarginTop||0;this.options=i,i.enabled&&(n.itemStyle=r,n.itemHiddenStyle=e(r,i.itemHiddenStyle),n.itemMarginTop=s,n.padding=o,n.initialItemX=o,n.initialItemY=o-5,n.maxItemWidth=0,n.chart=t,n.itemHeight=0,n.lastLineHeight=0,n.symbolWidth=p(i.symbolWidth,16),n.pages=[],n.render(),$e(n.chart,"endResize",function(){n.positionCheckboxes()}))},colorizeItem:function(t,e){var i,n=this.options,r=t.legendItem,o=t.legendLine,s=t.legendSymbol,a=this.itemHiddenStyle.color,n=e?n.itemStyle.color:a,l=e?t.legendColor||t.color||"#CCC":a,a=t.options&&t.options.marker,h={fill:l};if(r&&r.css({fill:n,color:n}),o&&o.attr({stroke:l}),s){if(a&&s.isMarker)for(i in h.stroke=l,a=t.convertAttribs(a))r=a[i],r!==F&&(h[i]=r);s.attr(h)}},positionItem:function(t){var e=this.options,i=e.symbolPadding,e=!e.rtl,n=t._legendItemPos,r=n[0],n=n[1],o=t.checkbox;t.legendGroup&&t.legendGroup.translate(e?r:this.legendWidth-r-2*i-4,n),o&&(o.x=r,o.y=n)},destroyItem:function(t){var e=t.checkbox;Xe(["legendItem","legendLine","legendSymbol","legendGroup"],function(e){t[e]&&(t[e]=t[e].destroy())}),e&&M(t.checkbox)},destroy:function(){var t=this.group,e=this.box;e&&(this.box=e.destroy()),t&&(this.group=t.destroy())},positionCheckboxes:function(t){var e,i=this.group.alignAttr,n=this.clipHeight||this.legendHeight;i&&(e=i.translateY,Xe(this.allItems,function(r){var o,s=r.checkbox;s&&(o=e+s.y+(t||0)+3,f(s,{left:i.translateX+r.checkboxOffset+s.x-20+"px",top:o+"px",display:o>e-6&&e+n-6>o?"":Ne}))}))},renderTitle:function(){var t=this.padding,e=this.options.title,i=0;e.text&&(this.title||(this.title=this.chart.renderer.label(e.text,t-3,t-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(e.style).add(this.group)),t=this.title.getBBox(),i=t.height,this.offsetWidth=t.width,this.contentGroup.attr({translateY:i})),this.titleHeight=i},renderItem:function(t){var i=this.chart,n=i.renderer,r=this.options,o="horizontal"===r.layout,s=this.symbolWidth,a=r.symbolPadding,l=this.itemStyle,h=this.itemHiddenStyle,c=this.padding,u=o?p(r.itemDistance,20):0,d=!r.rtl,f=r.width,m=r.itemMarginBottom||0,g=this.itemMarginTop,v=this.initialItemX,y=t.legendItem,E=t.series&&t.series.drawLegendSymbol?t.series:t,_=E.options,_=this.createCheckboxForItem&&_&&_.showCheckbox,T=r.useHTML;y||(t.legendGroup=n.g("legend-item").attr({zIndex:1}).add(this.scrollGroup),t.legendItem=y=n.text(r.labelFormat?b(r.labelFormat,t):r.labelFormatter.call(t),d?s+a:-a,this.baseline||0,T).css(e(t.visible?l:h)).attr({align:d?"left":"right",zIndex:2}).add(t.legendGroup),this.baseline||(this.baseline=n.fontMetrics(l.fontSize,y).f+3+g,y.attr("y",this.baseline)),E.drawLegendSymbol(this,t),this.setItemEvents&&this.setItemEvents(t,y,T,l,h),this.colorizeItem(t,t.visible),_&&this.createCheckboxForItem(t)),n=y.getBBox(),s=t.checkboxOffset=r.itemWidth||t.legendItemWidth||s+a+n.width+u+(_?20:0),this.itemHeight=a=ce(t.legendItemHeight||n.height),o&&this.itemX-v+s>(f||i.chartWidth-2*c-v-r.x)&&(this.itemX=v,this.itemY+=g+this.lastLineHeight+m,this.lastLineHeight=0),this.maxItemWidth=pe(this.maxItemWidth,s),this.lastItemY=g+this.itemY+m,this.lastLineHeight=pe(a,this.lastLineHeight),t._legendItemPos=[this.itemX,this.itemY],o?this.itemX+=s:(this.itemY+=g+a+m,this.lastLineHeight=a),this.offsetWidth=f||pe((o?this.itemX-v-u:s)+c,this.offsetWidth)},getAllItems:function(){var t=[];return Xe(this.chart.series,function(e){var i=e.options;p(i.showInLegend,c(i.linkedTo)?!1:F,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),t},render:function(){var e,i,n,r,o=this,s=o.chart,a=s.renderer,l=o.group,h=o.box,c=o.options,u=o.padding,d=c.borderWidth,p=c.backgroundColor;o.itemX=o.initialItemX,o.itemY=o.initialItemY,o.offsetWidth=0,o.lastItemY=0,l||(o.group=l=a.g("legend").attr({zIndex:7}).add(),o.contentGroup=a.g().attr({zIndex:1}).add(l),o.scrollGroup=a.g().add(o.contentGroup)),o.renderTitle(),e=o.getAllItems(),x(e,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),c.reversed&&e.reverse(),o.allItems=e,o.display=i=!!e.length,Xe(e,function(t){o.renderItem(t)}),n=c.width||o.offsetWidth,r=o.lastItemY+o.lastLineHeight+o.titleHeight,r=o.handleOverflow(r),(d||p)&&(n+=u,r+=u,h?n>0&&r>0&&(h[h.isNew?"attr":"animate"](h.crisp({width:n,height:r})),h.isNew=!1):(o.box=h=a.rect(0,0,n,r,c.borderRadius,d||0).attr({stroke:c.borderColor,"stroke-width":d||0,fill:p||Ne}).add(l).shadow(c.shadow),h.isNew=!0),h[i?"show":"hide"]()),o.legendWidth=n,o.legendHeight=r,Xe(e,function(t){o.positionItem(t)}),i&&l.align(t({width:n,height:r},c),!0,"spacingBox"),s.isResizing||this.positionCheckboxes()},handleOverflow:function(t){var e,i,n=this,r=this.chart,o=r.renderer,s=this.options,a=s.y,a=r.spacingBox.height+("top"===s.verticalAlign?-a:a)-this.padding,l=s.maxHeight,h=this.clipRect,c=s.navigation,u=p(c.animation,!0),d=c.arrowSize||12,f=this.nav,m=this.pages,g=this.allItems;return"horizontal"===s.layout&&(a/=2),l&&(a=fe(a,l)),m.length=0,t>a&&!s.useHTML?(this.clipHeight=e=pe(a-20-this.titleHeight-this.padding,0),this.currentPage=p(this.currentPage,1),this.fullHeight=t,Xe(g,function(t,n){var r=t._legendItemPos[1],o=ce(t.legendItem.getBBox().height),s=m.length;(!s||r-m[s-1]>e&&(i||r)!==m[s-1])&&(m.push(i||r),s++),n===g.length-1&&r+o-m[s-1]>e&&m.push(r),r!==i&&(i=r)}),h||(h=n.clipRect=o.clipRect(0,this.padding,9999,0),n.contentGroup.clip(h)),h.attr({height:e}),f||(this.nav=f=o.g().attr({zIndex:1}).add(this.group),this.up=o.symbol("triangle",0,0,d,d).on("click",function(){n.scroll(-1,u)}).add(f),this.pager=o.text("",15,10).css(c.style).add(f),this.down=o.symbol("triangle-down",0,0,d,d).on("click",function(){n.scroll(1,u)}).add(f)),n.scroll(0),t=a):f&&(h.attr({height:r.chartHeight}),f.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i=this.pages,n=i.length,r=this.currentPage+t,o=this.clipHeight,s=this.options.navigation,a=s.activeColor,s=s.inactiveColor,l=this.pager,h=this.padding;r>n&&(r=n),r>0&&(e!==F&&H(e,this.chart),this.nav.attr({translateX:h,translateY:o+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:1===r?s:a}).css({cursor:1===r?"default":"pointer"}),l.attr({text:r+"/"+n}),this.down.attr({x:18+this.pager.getBBox().width,fill:r===n?s:a}).css({cursor:r===n?"default":"pointer"}),i=-i[r-1]+this.initialItemY,this.scrollGroup.animate({translateY:i}),this.currentPage=r,this.positionCheckboxes(i))}},Ve=se.LegendSymbolMixin={drawRectangle:function(t,e){var i=t.options.symbolHeight||12;e.legendSymbol=this.chart.renderer.rect(0,t.baseline-5-i/2,t.symbolWidth,i,t.options.symbolRadius||0).attr({zIndex:3}).add(e.legendGroup)},drawLineMarker:function(t){var e,i=this.options,n=i.marker;e=t.symbolWidth;var r,o=this.chart.renderer,s=this.legendGroup,t=t.baseline-ce(.3*o.fontMetrics(t.options.itemStyle.fontSize,this.legendItem).b);i.lineWidth&&(r={"stroke-width":i.lineWidth},i.dashStyle&&(r.dashstyle=i.dashStyle),this.legendLine=o.path(["M",0,t,"L",e,t]).attr(r).add(s)),n&&n.enabled!==!1&&(i=n.radius,this.legendSymbol=e=o.symbol(this.symbol,e/2-i,t-i,2*i,2*i).add(s),e.isMarker=!0)}},(/Trident\/7\.0/.test(be)||Re)&&E(yi.prototype,"positionItem",function(t,e){var i=this,n=function(){e._legendItemPos&&t.call(i,e)};n(),setTimeout(n)}),L.prototype={init:function(t,i){var n,r=t.series;t.series=null,n=e(O,t),n.series=t.series=r,this.userOptions=t,r=n.chart,this.margin=this.splashArray("margin",r),this.spacing=this.splashArray("spacing",r);var o=r.events;this.bounds={h:{},v:{}},this.callback=i,this.isResizing=0,this.options=n,this.axes=[],this.series=[],this.hasCartesianSeries=r.showAxes;var s,a=this;if(a.index=Le.length,Le.push(a),Ie++,r.reflow!==!1&&$e(a,"load",function(){a.initReflow()}),o)for(s in o)$e(a,s,o[s]);a.xAxis=[],a.yAxis=[],a.animation=De?!1:p(r.animation,!0),a.pointCount=a.colorCounter=a.symbolCounter=0,a.firstRender()},initSeries:function(t){var e=this.options.chart;return(e=Oe[t.type||e.type||e.defaultSeriesType])||G(17,!0),e=new e,e.init(this,t),e},isInsidePlot:function(t,e,i){var n=i?e:t,t=i?t:e;return n>=0&&n<=this.plotWidth&&t>=0&&t<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&Xe(this.axes,function(t){t.adjustTickAmount()}),this.maxTicks=null},redraw:function(e){var i,n,r=this.axes,o=this.series,s=this.pointer,a=this.legend,l=this.isDirtyLegend,h=this.hasCartesianSeries,c=this.isDirtyBox,u=o.length,d=u,p=this.renderer,f=p.isHidden(),m=[];for(H(e,this),f&&this.cloneRenderTo(),this.layOutTitles();d--;)if(e=o[d],e.options.stacking&&(i=!0,e.isDirty)){n=!0;break}if(n)for(d=u;d--;)e=o[d],e.options.stacking&&(e.isDirty=!0);Xe(o,function(t){t.isDirty&&"point"===t.options.legendType&&(l=!0)}),l&&a.options.enabled&&(a.render(),this.isDirtyLegend=!1),i&&this.getStacks(),h&&(this.isResizing||(this.maxTicks=null,Xe(r,function(t){t.setScale()})),this.adjustTickAmounts()),this.getMargins(),h&&(Xe(r,function(t){t.isDirty&&(c=!0)}),Xe(r,function(e){e.isDirtyExtremes&&(e.isDirtyExtremes=!1,m.push(function(){Je(e,"afterSetExtremes",t(e.eventArgs,e.getExtremes())),delete e.eventArgs})),(c||i)&&e.redraw()})),c&&this.drawChartBox(),Xe(o,function(t){t.isDirty&&t.visible&&(!t.isCartesian||t.xAxis)&&t.redraw()}),s&&s.reset(!0),p.draw(),Je(this,"redraw"),f&&this.cloneRenderTo(!0),Xe(m,function(t){t.call()})},get:function(t){var e,i,n=this.axes,r=this.series;for(e=0;e<n.length;e++)if(n[e].options.id===t)return n[e];for(e=0;e<r.length;e++)if(r[e].options.id===t)return r[e];for(e=0;e<r.length;e++)for(i=r[e].points||[],n=0;n<i.length;n++)if(i[n].id===t)return i[n];return null},getAxes:function(){var t=this,e=this.options,i=e.xAxis=d(e.xAxis||{}),e=e.yAxis=d(e.yAxis||{});Xe(i,function(t,e){t.index=e,t.isX=!0}),Xe(e,function(t,e){t.index=e}),i=i.concat(e),Xe(i,function(e){new A(t,e)}),t.adjustTickAmounts()},getSelectedPoints:function(){var t=[];return Xe(this.series,function(e){t=t.concat(Ze(e.points||[],function(t){return t.selected}))}),t},getSelectedSeries:function(){return Ze(this.series,function(t){return t.selected})},getStacks:function(){var t=this;Xe(t.yAxis,function(t){t.stacks&&t.hasVisibleSeries&&(t.oldStacks=t.stacks)}),Xe(t.series,function(e){!e.options.stacking||e.visible!==!0&&t.options.chart.ignoreHiddenSeries!==!1||(e.stackKey=e.type+p(e.options.stack,""))})},setTitle:function(t,i,n){var r,o,s=this,a=s.options;o=a.title=e(a.title,t),r=a.subtitle=e(a.subtitle,i),a=r,Xe([["title",t,o],["subtitle",i,a]],function(t){var e=t[0],i=s[e],n=t[1],t=t[2];i&&n&&(s[e]=i=i.destroy()),t&&t.text&&!i&&(s[e]=s.renderer.text(t.text,0,0,t.useHTML).attr({align:t.align,"class":"highcharts-"+e,zIndex:t.zIndex||4}).css(t.style).add())}),s.layOutTitles(n)},layOutTitles:function(e){var i=0,n=this.title,r=this.subtitle,o=this.options,s=o.title,o=o.subtitle,a=this.renderer,l=this.spacingBox.width-44;!n||(n.css({width:(s.width||l)+"px"}).align(t({y:a.fontMetrics(s.style.fontSize,n).b-3},s),!1,"spacingBox"),s.floating||s.verticalAlign)||(i=n.getBBox().height),r&&(r.css({width:(o.width||l)+"px"}).align(t({y:i+(s.margin-13)+a.fontMetrics(s.style.fontSize,r).b},o),!1,"spacingBox"),!o.floating&&!o.verticalAlign&&(i=de(i+r.getBBox().height))),n=this.titleOffset!==i,this.titleOffset=i,!this.isDirtyBox&&n&&(this.isDirtyBox=n,this.hasRendered&&p(e,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var t=this.options.chart,e=t.width,t=t.height,i=this.renderToClone||this.renderTo;c(e)||(this.containerWidth=je(i,"width")),c(t)||(this.containerHeight=je(i,"height")),this.chartWidth=pe(0,e||this.containerWidth||600),this.chartHeight=pe(0,p(t,this.containerHeight>19?this.containerHeight:400))},cloneRenderTo:function(t){var e=this.renderToClone,i=this.container;t?e&&(this.renderTo.appendChild(i),M(e),delete this.renderToClone):(i&&i.parentNode===this.renderTo&&this.renderTo.removeChild(i),this.renderToClone=e=this.renderTo.cloneNode(0),f(e,{position:"absolute",top:"-9999px",display:"block"}),e.style.setProperty&&e.style.setProperty("display","block","important"),ae.body.appendChild(e),i&&e.appendChild(i))},getContainer:function(){var e,r,o,s,a=this.options.chart;this.renderTo=e=a.renderTo,s="highcharts-"+ke++,n(e)&&(this.renderTo=e=ae.getElementById(e)),e||G(13,!0),r=i(u(e,"data-highcharts-chart")),!isNaN(r)&&Le[r]&&Le[r].hasRendered&&Le[r].destroy(),u(e,"data-highcharts-chart",this.index),e.innerHTML="",!a.skipClone&&!e.offsetWidth&&this.cloneRenderTo(),this.getChartSize(),r=this.chartWidth,o=this.chartHeight,this.container=e=m(Fe,{className:"highcharts-container"+(a.className?" "+a.className:""),id:s},t({position:"relative",overflow:"hidden",width:r+"px",height:o+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},a.style),this.renderToClone||e),this._cursor=e.style.cursor,this.renderer=a.forExport?new ai(e,r,o,a.style,!0):new N(e,r,o,a.style),De&&this.renderer.create(this,e,r,o)
  15. },getMargins:function(){var t,e=this.spacing,i=this.legend,n=this.margin,r=this.options.legend,o=p(r.margin,20),s=r.x,a=r.y,l=r.align,h=r.verticalAlign,u=this.titleOffset;this.resetMargins(),t=this.axisOffset,u&&!c(n[0])&&(this.plotTop=pe(this.plotTop,u+this.options.title.margin+e[0])),i.display&&!r.floating&&("right"===l?c(n[1])||(this.marginRight=pe(this.marginRight,i.legendWidth-s+o+e[1])):"left"===l?c(n[3])||(this.plotLeft=pe(this.plotLeft,i.legendWidth+s+o+e[3])):"top"===h?c(n[0])||(this.plotTop=pe(this.plotTop,i.legendHeight+a+o+e[0])):"bottom"!==h||c(n[2])||(this.marginBottom=pe(this.marginBottom,i.legendHeight-a+o+e[2]))),this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),this.hasCartesianSeries&&Xe(this.axes,function(t){t.getOffset()}),c(n[3])||(this.plotLeft+=t[3]),c(n[0])||(this.plotTop+=t[0]),c(n[2])||(this.marginBottom+=t[2]),c(n[1])||(this.marginRight+=t[1]),this.setChartSize()},reflow:function(t){var e=this,i=e.options.chart,n=e.renderTo,r=i.width||je(n,"width"),o=i.height||je(n,"height"),i=t?t.target:le,n=function(){e.container&&(e.setSize(r,o,!1),e.hasUserSize=null)};e.hasUserSize||!r||!o||i!==le&&i!==ae||((r!==e.containerWidth||o!==e.containerHeight)&&(clearTimeout(e.reflowTimeout),t?e.reflowTimeout=setTimeout(n,100):n()),e.containerWidth=r,e.containerHeight=o)},initReflow:function(){var t=this,e=function(e){t.reflow(e)};$e(le,"resize",e),$e(t,"destroy",function(){Ke(le,"resize",e)})},setSize:function(t,e,i){var n,r,o,s=this;s.isResizing+=1,o=function(){s&&Je(s,"endResize",null,function(){s.isResizing-=1})},H(i,s),s.oldChartHeight=s.chartHeight,s.oldChartWidth=s.chartWidth,c(t)&&(s.chartWidth=n=pe(0,ce(t)),s.hasUserSize=!!n),c(e)&&(s.chartHeight=r=pe(0,ce(e))),(V?ti:f)(s.container,{width:n+"px",height:r+"px"},V),s.setChartSize(!0),s.renderer.setSize(n,r,i),s.maxTicks=null,Xe(s.axes,function(t){t.isDirty=!0,t.setScale()}),Xe(s.series,function(t){t.isDirty=!0}),s.isDirtyLegend=!0,s.isDirtyBox=!0,s.layOutTitles(),s.getMargins(),s.redraw(i),s.oldChartHeight=null,Je(s,"resize"),V===!1?o():setTimeout(o,V&&V.duration||500)},setChartSize:function(t){var e,i,n,r,o=this.inverted,s=this.renderer,a=this.chartWidth,l=this.chartHeight,h=this.options.chart,c=this.spacing,u=this.clipOffset;this.plotLeft=e=ce(this.plotLeft),this.plotTop=i=ce(this.plotTop),this.plotWidth=n=pe(0,ce(a-e-this.marginRight)),this.plotHeight=r=pe(0,ce(l-i-this.marginBottom)),this.plotSizeX=o?r:n,this.plotSizeY=o?n:r,this.plotBorderWidth=h.plotBorderWidth||0,this.spacingBox=s.spacingBox={x:c[3],y:c[0],width:a-c[3]-c[1],height:l-c[0]-c[2]},this.plotBox=s.plotBox={x:e,y:i,width:n,height:r},a=2*ue(this.plotBorderWidth/2),o=de(pe(a,u[3])/2),s=de(pe(a,u[0])/2),this.clipBox={x:o,y:s,width:ue(this.plotSizeX-pe(a,u[1])/2-o),height:pe(0,ue(this.plotSizeY-pe(a,u[2])/2-s))},t||Xe(this.axes,function(t){t.setAxisSize(),t.setAxisTranslation()})},resetMargins:function(){var t=this.spacing,e=this.margin;this.plotTop=p(e[0],t[0]),this.marginRight=p(e[1],t[1]),this.marginBottom=p(e[2],t[2]),this.plotLeft=p(e[3],t[3]),this.axisOffset=[0,0,0,0],this.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e=this.options.chart,i=this.renderer,n=this.chartWidth,r=this.chartHeight,o=this.chartBackground,s=this.plotBackground,a=this.plotBorder,l=this.plotBGImage,h=e.borderWidth||0,c=e.backgroundColor,u=e.plotBackgroundColor,d=e.plotBackgroundImage,p=e.plotBorderWidth||0,f=this.plotLeft,m=this.plotTop,g=this.plotWidth,v=this.plotHeight,y=this.plotBox,E=this.clipRect,b=this.clipBox;t=h+(e.shadow?8:0),(h||c)&&(o?o.animate(o.crisp({width:n-t,height:r-t})):(o={fill:c||Ne},h&&(o.stroke=e.borderColor,o["stroke-width"]=h),this.chartBackground=i.rect(t/2,t/2,n-t,r-t,e.borderRadius,h).attr(o).addClass("highcharts-background").add().shadow(e.shadow))),u&&(s?s.animate(y):this.plotBackground=i.rect(f,m,g,v,0).attr({fill:u}).add().shadow(e.plotShadow)),d&&(l?l.animate(y):this.plotBGImage=i.image(d,f,m,g,v).add()),E?E.animate({width:b.width,height:b.height}):this.clipRect=i.clipRect(b),p&&(a?a.animate(a.crisp({x:f,y:m,width:g,height:v,strokeWidth:-p})):this.plotBorder=i.rect(f,m,g,v,0,-p).attr({stroke:e.plotBorderColor,"stroke-width":p,fill:Ne,zIndex:1}).add()),this.isDirtyBox=!1},propFromSeries:function(){var t,e,i,n=this,r=n.options.chart,o=n.options.series;Xe(["inverted","angular","polar"],function(s){for(t=Oe[r.type||r.defaultSeriesType],i=n[s]||r[s]||t&&t.prototype[s],e=o&&o.length;!i&&e--;)(t=Oe[o[e].type])&&t.prototype[s]&&(i=!0);n[s]=i})},linkSeries:function(){var t=this,e=t.series;Xe(e,function(t){t.linkedSeries.length=0}),Xe(e,function(e){var i=e.options.linkedTo;n(i)&&(i=":previous"===i?t.series[e.index-1]:t.get(i))&&(i.linkedSeries.push(e),e.linkedParent=i)})},renderSeries:function(){Xe(this.series,function(t){t.translate(),t.setTooltipPoints&&t.setTooltipPoints(),t.render()})},renderLabels:function(){var e=this,n=e.options.labels;n.items&&Xe(n.items,function(r){var o=t(n.style,r.style),s=i(o.left)+e.plotLeft,a=i(o.top)+e.plotTop+12;delete o.left,delete o.top,e.renderer.text(r.html,s,a).attr({zIndex:2}).css(o).add()})},render:function(){var t=this.axes,e=this.renderer,i=this.options;this.setTitle(),this.legend=new yi(this,i.legend),this.getStacks(),Xe(t,function(t){t.setScale()}),this.getMargins(),this.maxTicks=null,Xe(t,function(t){t.setTickPositions(!0),t.setMaxTicks()}),this.adjustTickAmounts(),this.getMargins(),this.drawChartBox(),this.hasCartesianSeries&&Xe(t,function(t){t.render()}),this.seriesGroup||(this.seriesGroup=e.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.showCredits(i.credits),this.hasRendered=!0},showCredits:function(t){t.enabled&&!this.credits&&(this.credits=this.renderer.text(t.text,0,0).on("click",function(){t.href&&(location.href=t.href)}).attr({align:t.position.align,zIndex:8}).css(t.style).add().align(t.position))},destroy:function(){var t,e=this,i=e.axes,n=e.series,r=e.container,o=r&&r.parentNode;for(Je(e,"destroy"),Le[e.index]=F,Ie--,e.renderTo.removeAttribute("data-highcharts-chart"),Ke(e),t=i.length;t--;)i[t]=i[t].destroy();for(t=n.length;t--;)n[t]=n[t].destroy();Xe("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(t){var i=e[t];i&&i.destroy&&(e[t]=i.destroy())}),r&&(r.innerHTML="",Ke(r),o&&M(r));for(t in e)delete e[t]},isReadyToRender:function(){var t=this;return!Ce&&le==le.top&&"complete"!==ae.readyState||De&&!le.canvg?(De?ci.push(function(){t.firstRender()},t.options.global.canvasToolsURL):ae.attachEvent("onreadystatechange",function(){ae.detachEvent("onreadystatechange",t.firstRender),"complete"===ae.readyState&&t.firstRender()}),!1):!0},firstRender:function(){var t=this,e=t.options,i=t.callback;t.isReadyToRender()&&(t.getContainer(),Je(t,"init"),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),Xe(e.series||[],function(e){t.initSeries(e)}),t.linkSeries(),Je(t,"beforeRender"),se.Pointer&&(t.pointer=new pi(t,e)),t.render(),t.renderer.draw(),i&&i.apply(t,[t]),Xe(t.callbacks,function(e){e.apply(t,[t])}),t.cloneRenderTo(!0),Je(t,"load"))},splashArray:function(t,e){var i=e[t],i=r(i)?i:[i,i,i,i];return[p(e[t+"Top"],i[0]),p(e[t+"Right"],i[1]),p(e[t+"Bottom"],i[2]),p(e[t+"Left"],i[3])]}},L.prototype.callbacks=[],li=se.CenteredSeriesMixin={getCenter:function(){var t,e,n=this.options,r=this.chart,o=2*(n.slicedOffset||0),s=r.plotWidth-2*o,a=r.plotHeight-2*o,r=n.center,n=[p(r[0],"50%"),p(r[1],"50%"),n.size||"100%",n.innerSize||0],l=fe(s,a);return qe(n,function(n,r){return e=/%$/.test(n),t=2>r||2===r&&e,(e?[s,a,l,l][r]*i(n)/100:n)+(t?o:0)})}};var Ei=function(){};Ei.prototype={init:function(t,e,i){return this.series=t,this.applyOptions(e,i),this.pointAttr={},t.options.colorByPoint&&(e=t.options.colors||t.chart.options.colors,this.color=this.color||e[t.colorCounter++],t.colorCounter===e.length)&&(t.colorCounter=0),t.chart.pointCount++,this},applyOptions:function(e,i){var n=this.series,r=n.options.pointValKey||n.pointValKey,e=Ei.prototype.optionsToObject.call(this,e);return t(this,e),this.options=this.options?t(this.options,e):e,r&&(this.y=this[r]),this.x===F&&n&&(this.x=i===F?n.autoIncrement():i),this},optionsToObject:function(t){var e={},i=this.series,n=i.pointArrayMap||["y"],r=n.length,s=0,a=0;if("number"==typeof t||null===t)e[n[0]]=t;else if(o(t))for(t.length>r&&(i=typeof t[0],"string"===i?e.name=t[0]:"number"===i&&(e.x=t[0]),s++);r>a;)e[n[a++]]=t[s++];else"object"==typeof t&&(e=t,t.dataLabels&&(i._hasPointLabels=!0),t.marker&&(i._hasPointMarkers=!0));return e},destroy:function(){var t,e=this.series.chart,i=e.hoverPoints;e.pointCount--,i&&(this.setState(),h(i,this),!i.length)&&(e.hoverPoints=null),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&(Ke(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this);for(t in this)this[t]=null},destroyElements:function(){for(var t,e="graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","),i=6;i--;)t=e[i],this[t]&&(this[t]=this[t].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(t){var e=this.series,i=e.tooltipOptions,n=p(i.valueDecimals,""),r=i.valuePrefix||"",o=i.valueSuffix||"";return Xe(e.pointArrayMap||["y"],function(e){e="{point."+e,(r||o)&&(t=t.replace(e+"}",r+e+"}"+o)),t=t.replace(e+"}",e+":,."+n+"f}")}),b(t,{point:this,series:this.series})},firePointEvent:function(t,e,i){var n=this,r=this.series.options;(r.point.events[t]||n.options&&n.options.events&&n.options.events[t])&&this.importEvents(),"click"===t&&r.allowPointSelect&&(i=function(t){n.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),Je(this,t,e,i)}};var bi=function(){};bi.prototype={isCartesian:!0,type:"line",pointClass:Ei,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],init:function(e,i){var n,r,o=this,s=e.series,a=function(t,e){return p(t.options.index,t._i)-p(e.options.index,e._i)};o.chart=e,o.options=i=o.setOptions(i),o.linkedSeries=[],o.bindAxes(),t(o,{name:i.name,state:"",pointAttr:{},visible:i.visible!==!1,selected:i.selected===!0}),De&&(i.animation=!1),r=i.events;for(n in r)$e(o,n,r[n]);(r&&r.click||i.point&&i.point.events&&i.point.events.click||i.allowPointSelect)&&(e.runTrackerClick=!0),o.getColor(),o.getSymbol(),Xe(o.parallelArrays,function(t){o[t+"Data"]=[]}),o.setData(i.data,!1),o.isCartesian&&(e.hasCartesianSeries=!0),s.push(o),o._i=s.length-1,x(s,a),this.yAxis&&x(this.yAxis.series,a),Xe(s,function(t,e){t.index=e,t.name=t.name||"Series "+(e+1)})},bindAxes:function(){var t,e=this,i=e.options,n=e.chart;Xe(e.axisTypes||[],function(r){Xe(n[r],function(n){t=n.options,(i[r]===t.index||i[r]!==F&&i[r]===t.id||i[r]===F&&0===t.index)&&(n.series.push(e),e[r]=n,n.isDirty=!0)}),!e[r]&&e.optionalAxis!==r&&G(18,!0)})},updateParallelArrays:function(t,e){var i=t.series,n=arguments;Xe(i.parallelArrays,"number"==typeof e?function(n){var r="y"===n&&i.toYData?i.toYData(t):t[n];i[n+"Data"][e]=r}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(n,2))})},autoIncrement:function(){var t=this.options,e=this.xIncrement,e=p(e,t.pointStart,0);return this.pointInterval=p(this.pointInterval,t.pointInterval,1),this.xIncrement=e+this.pointInterval,e},getSegments:function(){var t,e=-1,i=[],n=this.points,r=n.length;if(r)if(this.options.connectNulls){for(t=r;t--;)null===n[t].y&&n.splice(t,1);n.length&&(i=[n])}else Xe(n,function(t,o){null===t.y?(o>e+1&&i.push(n.slice(e+1,o)),e=o):o===r-1&&i.push(n.slice(e+1,o+1))});this.segments=i},setOptions:function(t){var i=this.chart,n=i.options.plotOptions,i=i.userOptions||{},r=i.plotOptions||{},o=n[this.type];return this.userOptions=t,n=e(o,n.series,t),this.tooltipOptions=e(O.tooltip,O.plotOptions[this.type].tooltip,i.tooltip,r.series&&r.series.tooltip,r[this.type]&&r[this.type].tooltip,t.tooltip),null===o.marker&&delete n.marker,n},getCyclic:function(t,e,i){var n=this.userOptions,r="_"+t+"Index",o=t+"Counter";e||(c(n[r])?e=n[r]:(n[r]=e=this.chart[o]%i.length,this.chart[o]+=1),e=i[e]),this[t]=e},getColor:function(){this.options.colorByPoint||this.getCyclic("color",this.options.color||ii[this.type].color,this.chart.options.colors)},getSymbol:function(){var t=this.options.marker;this.getCyclic("symbol",t.symbol,this.chart.options.symbols),/^url/.test(this.symbol)&&(t.radius=0)},drawLegendSymbol:Ve.drawLineMarker,setData:function(t,e,i,r){var a,l=this,h=l.points,c=h&&h.length||0,u=l.options,d=l.chart,f=null,m=l.xAxis,g=m&&!!m.categories,v=l.tooltipPoints,y=u.turboThreshold,E=this.xData,b=this.yData,_=(a=l.pointArrayMap)&&a.length,t=t||[];if(a=t.length,e=p(e,!0),r===!1||!a||c!==a||l.cropped||l.hasGroupedData){if(l.xIncrement=null,l.pointRange=g?1:u.pointRange,l.colorCounter=0,Xe(this.parallelArrays,function(t){l[t+"Data"].length=0}),y&&a>y){for(i=0;null===f&&a>i;)f=t[i],i++;if(s(f)){for(g=p(u.pointStart,0),u=p(u.pointInterval,1),i=0;a>i;i++)E[i]=g,b[i]=t[i],g+=u;l.xIncrement=g}else if(o(f))if(_)for(i=0;a>i;i++)u=t[i],E[i]=u[0],b[i]=u.slice(1,_+1);else for(i=0;a>i;i++)u=t[i],E[i]=u[0],b[i]=u[1];else G(12)}else for(i=0;a>i;i++)t[i]!==F&&(u={series:l},l.pointClass.prototype.applyOptions.apply(u,[t[i]]),l.updateParallelArrays(u,i),g&&u.name)&&(m.names[u.x]=u.name);for(n(b[0])&&G(14,!0),l.data=[],l.options.data=t,i=c;i--;)h[i]&&h[i].destroy&&h[i].destroy();v&&(v.length=0),m&&(m.minRange=m.userMinRange),l.isDirty=l.isDirtyData=d.isDirtyBox=!0,i=!1}else Xe(t,function(t,e){h[e].update(t,!1,null,!1)});e&&d.redraw(i)},processData:function(t){var e,i=this.xData,n=this.yData,r=i.length;e=0;var o,s,a,l=this.xAxis,h=this.options;a=h.cropThreshold;var c,u,d=0,p=this.isCartesian;if(p&&!this.isDirty&&!l.isDirty&&!this.yAxis.isDirty&&!t)return!1;for(l&&(c=l.getExtremes(),u=c.min,c=c.max),p&&this.sorted&&(!a||r>a||this.forceCrop)&&(i[r-1]<u||i[0]>c?(i=[],n=[]):(i[0]<u||i[r-1]>c)&&(e=this.cropData(this.xData,this.yData,u,c),i=e.xData,n=e.yData,e=e.start,o=!0,d=i.length)),a=i.length-1;a>=0;a--)r=i[a]-i[a-1],!o&&i[a]>u&&i[a]<c&&d++,r>0&&(s===F||s>r)?s=r:0>r&&this.requireSorting&&G(15);this.cropped=o,this.cropStart=e,this.processedXData=i,this.processedYData=n,this.activePointCount=d,null===h.pointRange&&(this.pointRange=s||1),this.closestPointRange=s},cropData:function(t,e,i,n){var r,o=t.length,s=0,a=o,l=p(this.cropShoulder,1);for(r=0;o>r;r++)if(t[r]>=i){s=pe(0,r-l);break}for(;o>r;r++)if(t[r]>n){a=r+l;break}return{xData:t.slice(s,a),yData:e.slice(s,a),start:s,end:a}},generatePoints:function(){var t,e,i,n,r=this.options.data,o=this.data,s=this.processedXData,a=this.processedYData,l=this.pointClass,h=s.length,c=this.cropStart||0,u=this.hasGroupedData,p=[];for(o||u||(o=[],o.length=r.length,o=this.data=o),n=0;h>n;n++)e=c+n,u?p[n]=(new l).init(this,[s[n]].concat(d(a[n]))):(o[e]?i=o[e]:r[e]!==F&&(o[e]=i=(new l).init(this,r[e],s[n])),p[n]=i),p[n].index=e;if(o&&(h!==(t=o.length)||u))for(n=0;t>n;n++)n===c&&!u&&(n+=h),o[n]&&(o[n].destroyElements(),o[n].plotX=F);this.data=o,this.points=p},getExtremes:function(t){var e,i=this.yAxis,n=this.processedXData,r=[],o=0;e=this.xAxis.getExtremes();var s,a,l,h,c=e.min,u=e.max,t=t||this.stackedYData||this.processedYData;for(e=t.length,h=0;e>h;h++)if(a=n[h],l=t[h],s=null!==l&&l!==F&&(!i.isLog||l.length||l>0),a=this.getExtremesFromAll||this.cropped||(n[h+1]||a)>=c&&(n[h-1]||a)<=u,s&&a)if(s=l.length)for(;s--;)null!==l[s]&&(r[o++]=l[s]);else r[o++]=l;this.dataMin=p(void 0,w(r)),this.dataMax=p(void 0,R(r))},translate:function(){this.processedXData||this.processData(),this.generatePoints();for(var t=this.options,e=t.stacking,i=this.xAxis,n=i.categories,r=this.yAxis,o=this.points,a=o.length,l=!!this.modifyValue,h=t.pointPlacement,u="between"===h||s(h),d=t.threshold,t=0;a>t;t++){var f=o[t],m=f.x,g=f.y,v=f.low,y=e&&r.stacks[(this.negStacks&&d>g?"-":"")+this.stackKey];r.isLog&&0>=g&&(f.y=g=null,G(10)),f.plotX=i.translate(m,0,0,0,1,h,"flags"===this.type),e&&this.visible&&y&&y[m]&&(y=y[m],g=y.points[this.index+","+t],v=g[0],g=g[1],0===v&&(v=p(d,r.min)),r.isLog&&0>=v&&(v=null),f.total=f.stackTotal=y.total,f.percentage=y.total&&f.y/y.total*100,f.stackY=g,y.setOffset(this.pointXOffset||0,this.barW||0)),f.yBottom=c(v)?r.translate(v,0,1,0,1):null,l&&(g=this.modifyValue(g,f)),f.plotY="number"==typeof g&&1/0!==g?r.translate(g,0,1,0,1):F,f.clientX=u?i.translate(m,0,0,0,1):f.plotX,f.negative=f.y<(d||0),f.category=n&&n[f.x]!==F?n[f.x]:f.x}this.getSegments()},animate:function(e){var i,n=this.chart,o=n.renderer;i=this.options.animation;var s,a=this.clipBox||n.clipBox,l=n.inverted;i&&!r(i)&&(i=ii[this.type].animation),s=["_sharedClip",i.duration,i.easing,a.height].join(","),e?(e=n[s],i=n[s+"m"],e||(n[s]=e=o.clipRect(t(a,{width:0})),n[s+"m"]=i=o.clipRect(-99,l?-n.plotLeft:-n.plotTop,99,l?n.chartWidth:n.chartHeight)),this.group.clip(e),this.markerGroup.clip(i),this.sharedClipKey=s):((e=n[s])&&e.animate({width:n.plotSizeX},i),n[s+"m"]&&n[s+"m"].animate({width:n.plotSizeX+99},i),this.animate=null)},afterAnimate:function(){var t=this.chart,e=this.sharedClipKey,i=this.group,n=this.clipBox;i&&this.options.clip!==!1&&(e&&n||i.clip(n?t.renderer.clipRect(n):t.clipRect),this.markerGroup.clip()),Je(this,"afterAnimate"),setTimeout(function(){e&&t[e]&&(n||(t[e]=t[e].destroy()),t[e+"m"]&&(t[e+"m"]=t[e+"m"].destroy()))},100)},drawPoints:function(){var e,i,n,r,o,s,a,l,h,c,u,d,f=this.points,m=this.chart,g=this.options.marker,v=this.pointAttr[""],y=this.markerGroup,E=p(g.enabled,!this.requireSorting||this.activePointCount<.5*this.xAxis.len/g.radius);if(g.enabled!==!1||this._hasPointMarkers)for(r=f.length;r--;)o=f[r],i=ue(o.plotX),n=o.plotY,h=o.graphic,c=o.marker||{},u=!!o.marker,e=E&&c.enabled===F||c.enabled,d=m.isInsidePlot(ce(i),n,m.inverted),e&&n!==F&&!isNaN(n)&&null!==o.y?(e=o.pointAttr[o.selected?"select":""]||v,s=e.r,a=p(c.symbol,this.symbol),l=0===a.indexOf("url"),h?h[d?"show":"hide"](!0).animate(t({x:i-s,y:n-s},h.symbolName?{width:2*s,height:2*s}:{})):d&&(s>0||l)&&(o.graphic=m.renderer.symbol(a,i-s,n-s,2*s,2*s,u?c:g).attr(e).add(y))):h&&(o.graphic=h.destroy())},convertAttribs:function(t,e,i,n){var r,o,s=this.pointAttrToOptions,a={},t=t||{},e=e||{},i=i||{},n=n||{};for(r in s)o=s[r],a[r]=p(t[o],e[r],i[r],n[r]);return a},getAttribs:function(){var e,i=this,n=i.options,r=ii[i.type].marker?n.marker:n,o=r.states,s=o.hover,a=i.color;e={stroke:a,fill:a};var l,h,u=i.points||[],d=[],p=i.pointAttrToOptions;h=i.hasPointSpecificOptions;var f=n.negativeColor,m=r.lineColor,g=r.fillColor;l=n.turboThreshold;var v;if(n.marker?(s.radius=s.radius||r.radius+s.radiusPlus,s.lineWidth=s.lineWidth||r.lineWidth+s.lineWidthPlus):s.color=s.color||si(s.color||a).brighten(s.brightness).get(),d[""]=i.convertAttribs(r,e),Xe(["hover","select"],function(t){d[t]=i.convertAttribs(o[t],d[""])}),i.pointAttr=d,a=u.length,!l||l>a||h)for(;a--;){if(l=u[a],(r=l.options&&l.options.marker||l.options)&&r.enabled===!1&&(r.radius=0),l.negative&&f&&(l.color=l.fillColor=f),h=n.colorByPoint||l.color,l.options)for(v in p)c(r[p[v]])&&(h=!0);h?(r=r||{},h=[],o=r.states||{},e=o.hover=o.hover||{},n.marker||(e.color=e.color||!l.options.color&&s.color||si(l.color).brighten(e.brightness||s.brightness).get()),e={color:l.color},g||(e.fillColor=l.color),m||(e.lineColor=l.color),h[""]=i.convertAttribs(t(e,r),d[""]),h.hover=i.convertAttribs(o.hover,d.hover,h[""]),h.select=i.convertAttribs(o.select,d.select,h[""])):h=d,l.pointAttr=h}},destroy:function(){var t,e,i,n,r,o=this,s=o.chart,a=/AppleWebKit\/533/.test(be),l=o.data||[];for(Je(o,"destroy"),Ke(o),Xe(o.axisTypes||[],function(t){(r=o[t])&&(h(r.series,o),r.isDirty=r.forceRedraw=!0)}),o.legendItem&&o.chart.legend.destroyItem(o),e=l.length;e--;)(i=l[e])&&i.destroy&&i.destroy();o.points=null,clearTimeout(o.animationTimeout),Xe("area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip".split(","),function(e){o[e]&&(t=a&&"group"===e?"hide":"destroy",o[e][t]())}),s.hoverSeries===o&&(s.hoverSeries=null),h(s.series,o);for(n in o)delete o[n]},getSegmentPath:function(t){var e=this,i=[],n=e.options.step;return Xe(t,function(r,o){var s,a=r.plotX,l=r.plotY;e.getPointSpline?i.push.apply(i,e.getPointSpline(t,r,o)):(i.push(o?"L":"M"),n&&o&&(s=t[o-1],"right"===n?i.push(s.plotX,l):"center"===n?i.push((s.plotX+a)/2,s.plotY,(s.plotX+a)/2,l):i.push(a,s.plotY)),i.push(r.plotX,r.plotY))}),i},getGraphPath:function(){var t,e=this,i=[],n=[];return Xe(e.segments,function(r){t=e.getSegmentPath(r),r.length>1?i=i.concat(t):n.push(r[0])}),e.singlePoints=n,e.graphPath=i},drawGraph:function(){var t=this,e=this.options,i=[["graph",e.lineColor||this.color]],n=e.lineWidth,r=e.dashStyle,o="square"!==e.linecap,s=this.getGraphPath(),a=e.negativeColor;a&&i.push(["graphNeg",a]),Xe(i,function(i,a){var l=i[0],h=t[l];h?(ei(h),h.animate({d:s})):n&&s.length&&(h={stroke:i[1],"stroke-width":n,fill:Ne,zIndex:1},r?h.dashstyle=r:o&&(h["stroke-linecap"]=h["stroke-linejoin"]="round"),t[l]=t.chart.renderer.path(s).attr(h).add(t.group).shadow(!a&&e.shadow))})},clipNeg:function(){var t,e=this.options,i=this.chart,n=i.renderer,r=e.negativeColor||e.negativeFillColor,o=this.graph,s=this.area,a=this.posClip,l=this.negClip;t=i.chartWidth;var h=i.chartHeight,c=pe(t,h),u=this.yAxis;r&&(o||s)&&(r=ce(u.toPixels(e.threshold||0,!0)),0>r&&(c-=r),e={x:0,y:0,width:c,height:r},c={x:0,y:r,width:c,height:c},i.inverted&&(e.height=c.y=i.plotWidth-r,n.isVML&&(e={x:i.plotWidth-r-i.plotLeft,y:0,width:t,height:h},c={x:r+i.plotLeft-t,y:0,width:i.plotLeft+r,height:t})),u.reversed?(i=c,t=e):(i=e,t=c),a?(a.animate(i),l.animate(t)):(this.posClip=a=n.clipRect(i),this.negClip=l=n.clipRect(t),o&&this.graphNeg&&(o.clip(a),this.graphNeg.clip(l)),s&&(s.clip(a),this.areaNeg.clip(l))))},invertGroups:function(){function t(){var t={width:e.yAxis.len,height:e.xAxis.len};Xe(["group","markerGroup"],function(i){e[i]&&e[i].attr(t).invert()})}var e=this,i=e.chart;e.xAxis&&($e(i,"resize",t),$e(e,"destroy",function(){Ke(i,"resize",t)}),t(),e.invertGroups=t)},plotGroup:function(t,e,i,n,r){var o=this[t],s=!o;return s&&(this[t]=o=this.chart.renderer.g(e).attr({visibility:i,zIndex:n||.1}).add(r)),o[s?"attr":"animate"](this.getPlotBox()),o},getPlotBox:function(){var t=this.chart,e=this.xAxis,i=this.yAxis;return t.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:t.plotLeft,translateY:i?i.top:t.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this,i=e.chart,n=e.options,r=(t=n.animation)&&!!e.animate&&i.renderer.isSVG&&p(t.duration,500)||0,o=e.visible?"visible":"hidden",s=n.zIndex,a=e.hasRendered,l=i.seriesGroup;t=e.plotGroup("group","series",o,s,l),e.markerGroup=e.plotGroup("markerGroup","markers",o,s,l),r&&e.animate(!0),e.getAttribs(),t.inverted=e.isCartesian?i.inverted:!1,e.drawGraph&&(e.drawGraph(),e.clipNeg()),Xe(e.points,function(t){t.redraw&&t.redraw()}),e.drawDataLabels&&e.drawDataLabels(),e.visible&&e.drawPoints(),e.drawTracker&&e.options.enableMouseTracking!==!1&&e.drawTracker(),i.inverted&&e.invertGroups(),n.clip!==!1&&!e.sharedClipKey&&!a&&t.clip(i.clipRect),r&&e.animate(),a||(r?e.animationTimeout=setTimeout(function(){e.afterAnimate()},r):e.afterAnimate()),e.isDirty=e.isDirtyData=!1,e.hasRendered=!0},redraw:function(){var t=this.chart,e=this.isDirtyData,i=this.group,n=this.xAxis,r=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:p(n&&n.left,t.plotLeft),translateY:p(r&&r.top,t.plotTop)})),this.translate(),this.setTooltipPoints&&this.setTooltipPoints(!0),this.render(),e&&Je(this,"updatedData")}},I.prototype={destroy:function(){S(this,this.axis)},render:function(t){var e=this.options,i=e.format,i=i?b(i,this):e.formatter.call(this);this.label?this.label.attr({text:i,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(i,null,null,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,visibility:"hidden"}).add(t)},setOffset:function(t,e){var i=this.axis,n=i.chart,r=n.inverted,o=this.isNegative,s=i.translate(i.usePercentage?100:this.total,0,0,0,1),i=i.translate(0),i=me(s-i),a=n.xAxis[0].translate(this.x)+t,l=n.plotHeight,o={x:r?o?s:s-i:a,y:r?l-a-e:o?l-s-i:l-s,width:r?i:e,height:r?e:i};(r=this.label)&&(r.align(this.alignOptions,null,o),o=r.alignAttr,r[this.options.crop===!1||n.isInsidePlot(o.x,o.y)?"show":"hide"](!0))}},A.prototype.buildStacks=function(){var t=this.series,e=p(this.options.reversedStacks,!0),i=t.length;if(!this.isXAxis){for(this.usePercentage=!1;i--;)t[e?i:t.length-i-1].setStackedPoints();if(this.usePercentage)for(i=0;i<t.length;i++)t[i].setPercentStacks()}},A.prototype.renderStackTotals=function(){var t,e,i=this.chart,n=i.renderer,r=this.stacks,o=this.stackTotalGroup;o||(this.stackTotalGroup=o=n.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),o.translate(i.plotLeft,i.plotTop);for(t in r)for(e in i=r[t])i[e].render(o)},bi.prototype.setStackedPoints=function(){if(this.options.stacking&&(this.visible===!0||this.chart.options.chart.ignoreHiddenSeries===!1)){var t,e,i,n,r,o,s=this.processedXData,a=this.processedYData,l=[],h=a.length,c=this.options,u=c.threshold,d=c.stack,c=c.stacking,p=this.stackKey,f="-"+p,m=this.negStacks,g=this.yAxis,v=g.stacks,y=g.oldStacks;for(n=0;h>n;n++)r=s[n],o=a[n],i=this.index+","+n,e=(t=m&&u>o)?f:p,v[e]||(v[e]={}),v[e][r]||(y[e]&&y[e][r]?(v[e][r]=y[e][r],v[e][r].total=null):v[e][r]=new I(g,g.options.stackLabels,t,r,d)),e=v[e][r],e.points[i]=[e.cum||0],"percent"===c?(t=t?p:f,m&&v[t]&&v[t][r]?(t=v[t][r],e.total=t.total=pe(t.total,e.total)+me(o)||0):e.total=C(e.total+(me(o)||0))):e.total=C(e.total+(o||0)),e.cum=(e.cum||0)+(o||0),e.points[i].push(e.cum),l[n]=e.cum;"percent"===c&&(g.usePercentage=!0),this.stackedYData=l,g.oldStacks={}}},bi.prototype.setPercentStacks=function(){var t=this,e=t.stackKey,i=t.yAxis.stacks,n=t.processedXData;Xe([e,"-"+e],function(e){for(var r,o,s,a=n.length;a--;)o=n[a],r=(s=i[e]&&i[e][o])&&s.points[t.index+","+a],(o=r)&&(s=s.total?100/s.total:0,o[0]=C(o[0]*s),o[1]=C(o[1]*s),t.stackedYData[a]=o[1])})},t(L.prototype,{addSeries:function(t,e,i){var n,r=this;return t&&(e=p(e,!0),Je(r,"addSeries",{options:t},function(){n=r.initSeries(t),r.isDirtyLegend=!0,r.linkSeries(),e&&r.redraw(i)})),n},addAxis:function(t,i,n,r){var o=i?"xAxis":"yAxis",s=this.options;new A(this,e(t,{index:this[o].length,isX:i})),s[o]=d(s[o]||{}),s[o].push(t),p(n,!0)&&this.redraw(r)},showLoading:function(e){var i=this,n=i.options,r=i.loadingDiv,o=n.loading,s=function(){r&&f(r,{left:i.plotLeft+"px",top:i.plotTop+"px",width:i.plotWidth+"px",height:i.plotHeight+"px"})};r||(i.loadingDiv=r=m(Fe,{className:"highcharts-loading"},t(o.style,{zIndex:10,display:Ne}),i.container),i.loadingSpan=m("span",null,o.labelStyle,r),$e(i,"redraw",s)),i.loadingSpan.innerHTML=e||n.lang.loading,i.loadingShown||(f(r,{opacity:0,display:""}),ti(r,{opacity:o.style.opacity},{duration:o.showDuration||0}),i.loadingShown=!0),s()},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&ti(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){f(e,{display:Ne})}}),this.loadingShown=!1}}),t(Ei.prototype,{update:function(t,e,i,n){function s(){l.applyOptions(t),r(t)&&!o(t)&&(l.redraw=function(){c&&(t&&t.marker&&t.marker.symbol?l.graphic=c.destroy():c.attr(l.pointAttr[l.state||""])),t&&t.dataLabels&&l.dataLabel&&(l.dataLabel=l.dataLabel.destroy()),l.redraw=null}),a=l.index,h.updateParallelArrays(l,a),d.data[a]=l.options,h.isDirty=h.isDirtyData=!0,!h.fixedBox&&h.hasCartesianSeries&&(u.isDirtyBox=!0),"point"===d.legendType&&u.legend.destroyItem(l),e&&u.redraw(i)}var a,l=this,h=l.series,c=l.graphic,u=h.chart,d=h.options,e=p(e,!0);n===!1?s():l.firePointEvent("update",{options:t},s)},remove:function(t,e){var i,n=this,r=n.series,o=r.points,s=r.chart,a=r.data;H(e,s),t=p(t,!0),n.firePointEvent("remove",null,function(){i=Ge(n,a),a.length===o.length&&o.splice(i,1),a.splice(i,1),r.options.data.splice(i,1),r.updateParallelArrays(n,"splice",i,1),n.destroy(),r.isDirty=!0,r.isDirtyData=!0,t&&s.redraw()})}}),t(bi.prototype,{addPoint:function(t,e,i,n){var r,o=this.options,s=this.data,a=this.graph,l=this.area,h=this.chart,c=this.xAxis&&this.xAxis.names,u=a&&a.shift||0,d=o.data,f=this.xData;if(H(n,h),i&&Xe([a,l,this.graphNeg,this.areaNeg],function(t){t&&(t.shift=u+1)}),l&&(l.isArea=!0),e=p(e,!0),n={series:this},this.pointClass.prototype.applyOptions.apply(n,[t]),a=n.x,l=f.length,this.requireSorting&&a<f[l-1])for(r=!0;l&&f[l-1]>a;)l--;this.updateParallelArrays(n,"splice",l,0,0),this.updateParallelArrays(n,l),c&&n.name&&(c[a]=n.name),d.splice(l,0,t),r&&(this.data.splice(l,0,null),this.processData()),"point"===o.legendType&&this.generatePoints(),i&&(s[0]&&s[0].remove?s[0].remove(!1):(s.shift(),this.updateParallelArrays(n,"shift"),d.shift())),this.isDirtyData=this.isDirty=!0,e&&(this.getAttribs(),h.redraw())},remove:function(t,e){var i=this,n=i.chart,t=p(t,!0);i.isRemoving||(i.isRemoving=!0,Je(i,"remove",null,function(){i.destroy(),n.isDirtyLegend=n.isDirtyBox=!0,n.linkSeries(),t&&n.redraw(e)})),i.isRemoving=!1},update:function(i,n){var r,o=this,s=this.chart,a=this.userOptions,l=this.type,h=Oe[l].prototype,c=["group","markerGroup","dataLabelsGroup"];Xe(c,function(t){c[t]=o[t],delete o[t]}),i=e(a,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},i),this.remove(!1);for(r in h)h.hasOwnProperty(r)&&(this[r]=F);t(this,Oe[i.type||l].prototype),Xe(c,function(t){o[t]=c[t]}),this.init(s,i),s.linkSeries(),p(n,!0)&&s.redraw(!1)}}),t(A.prototype,{update:function(i,n){var r=this.chart,i=r.options[this.coll][this.options.index]=e(this.userOptions,i);this.destroy(!0),this._addedPlotLB=F,this.init(r,t(i,{events:F})),r.isDirtyBox=!0,p(n,!0)&&r.redraw()},remove:function(t){for(var e=this.chart,i=this.coll,n=this.series,r=n.length;r--;)n[r]&&n[r].remove(!1);h(e.axes,this),h(e[i],this),e.options[i].splice(this.options.index,1),Xe(e[i],function(t,e){t.options.index=e}),this.destroy(),e.isDirtyBox=!0,p(t,!0)&&e.redraw()},setTitle:function(t,e){this.update({title:t},e)},setCategories:function(t,e){this.update({categories:t},e)}}),hi=g(bi),Oe.line=hi,ii.area=e(Ue,{threshold:0});var _i=g(bi,{type:"area",getSegments:function(){var t,e,i,n,r=this,o=[],s=[],a=[],l=this.xAxis,h=this.yAxis,c=h.stacks[this.stackKey],u={},d=this.points,p=this.options.connectNulls;if(this.options.stacking&&!this.cropped){for(i=0;i<d.length;i++)u[d[i].x]=d[i];for(n in c)null!==c[n].total&&a.push(+n);a.sort(function(t,e){return t-e}),Xe(a,function(n){var o,a=0;if(!p||u[n]&&null!==u[n].y)if(u[n])s.push(u[n]);else{for(i=r.index;i<=h.series.length;i++)if(o=c[n].points[i+","+n]){a=o[1];break}t=l.translate(n),e=h.toPixels(a,!0),s.push({y:null,plotX:t,clientX:t,plotY:e,yBottom:e,onMouseOver:Ae})}}),s.length&&o.push(s)}else bi.prototype.getSegments.call(this),o=this.segments;this.segments=o},getSegmentPath:function(t){var e,i=bi.prototype.getSegmentPath.call(this,t),n=[].concat(i),r=this.options;e=i.length;var o,s=this.yAxis.getThreshold(r.threshold);if(3===e&&n.push("L",i[1],i[2]),r.stacking&&!this.closedStacks)for(e=t.length-1;e>=0;e--)o=p(t[e].yBottom,s),e<t.length-1&&r.step&&n.push(t[e+1].plotX,o),n.push(t[e].plotX,o);else this.closeSegment(n,t,s);return this.areaPath=this.areaPath.concat(n),i},closeSegment:function(t,e,i){t.push("L",e[e.length-1].plotX,i,"L",e[0].plotX,i)},drawGraph:function(){this.areaPath=[],bi.prototype.drawGraph.apply(this);var t=this,e=this.areaPath,i=this.options,n=i.negativeColor,r=i.negativeFillColor,o=[["area",this.color,i.fillColor]];(n||r)&&o.push(["areaNeg",n,r]),Xe(o,function(n){var r=n[0],o=t[r];o?o.animate({d:e}):t[r]=t.chart.renderer.path(e).attr({fill:p(n[2],si(n[1]).setOpacity(p(i.fillOpacity,.75)).get()),zIndex:0}).add(t.group)})},drawLegendSymbol:Ve.drawRectangle});Oe.area=_i,ii.spline=e(Ue),hi=g(bi,{type:"spline",getPointSpline:function(t,e,i){var n,r,o,s,a=e.plotX,l=e.plotY,h=t[i-1],c=t[i+1];
  16. if(h&&c){t=h.plotY,o=c.plotX;var u,c=c.plotY;n=(1.5*a+h.plotX)/2.5,r=(1.5*l+t)/2.5,o=(1.5*a+o)/2.5,s=(1.5*l+c)/2.5,u=(s-r)*(o-a)/(o-n)+l-s,r+=u,s+=u,r>t&&r>l?(r=pe(t,l),s=2*l-r):t>r&&l>r&&(r=fe(t,l),s=2*l-r),s>c&&s>l?(s=pe(c,l),r=2*l-s):c>s&&l>s&&(s=fe(c,l),r=2*l-s),e.rightContX=o,e.rightContY=s}return i?(e=["C",h.rightContX||h.plotX,h.rightContY||h.plotY,n||a,r||l,a,l],h.rightContX=h.rightContY=null):e=["M",a,l],e}}),Oe.spline=hi,ii.areaspline=e(ii.area),_i=_i.prototype,hi=g(hi,{type:"areaspline",closedStacks:!0,getSegmentPath:_i.getSegmentPath,closeSegment:_i.closeSegment,drawGraph:_i.drawGraph,drawLegendSymbol:Ve.drawRectangle}),Oe.areaspline=hi,ii.column=e(Ue,{borderColor:"#FFFFFF",borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1,halo:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},stickyTracking:!1,tooltip:{distance:6},threshold:0}),hi=g(bi,{type:"column",pointAttrToOptions:{stroke:"borderColor",fill:"color",r:"borderRadius"},cropShoulder:0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){bi.prototype.init.apply(this,arguments);var t=this,e=t.chart;e.hasRendered&&Xe(e.series,function(e){e.type===t.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var t,e,i=this,n=i.options,r=i.xAxis,o=i.yAxis,s=r.reversed,a={},l=0;n.grouping===!1?l=1:Xe(i.chart.series,function(n){var r=n.options,s=n.yAxis;n.type===i.type&&n.visible&&o.len===s.len&&o.pos===s.pos&&(r.stacking?(t=n.stackKey,a[t]===F&&(a[t]=l++),e=a[t]):r.grouping!==!1&&(e=l++),n.columnIndex=e)});var r=fe(me(r.transA)*(r.ordinalSlope||n.pointRange||r.closestPointRange||r.tickInterval||1),r.len),h=r*n.groupPadding,u=(r-2*h)/l,d=n.pointWidth,n=c(d)?(u-d)/2:u*n.pointPadding,d=p(d,u-2*n);return i.columnMetrics={width:d,offset:n+(h+((s?l-(i.columnIndex||0):i.columnIndex)||0)*u-r/2)*(s?-1:1)}},translate:function(){var t=this,e=t.chart,i=t.options,n=t.borderWidth=p(i.borderWidth,t.activePointCount>.5*t.xAxis.len?0:1),r=t.yAxis,o=t.translatedThreshold=r.getThreshold(i.threshold),s=p(i.minPointLength,5),a=t.getColumnMetrics(),l=a.width,h=t.barW=pe(l,1+2*n),c=t.pointXOffset=a.offset,u=-(n%2?.5:0),d=n%2?.5:1;e.renderer.isVML&&e.inverted&&(d+=1),i.pointPadding&&(h=de(h)),bi.prototype.translate.apply(t),Xe(t.points,function(i){var n,a=p(i.yBottom,o),f=fe(pe(-999-a,i.plotY),r.len+999+a),m=i.plotX+c,g=h,v=fe(f,a);n=pe(f,a)-v,me(n)<s&&s&&(n=s,v=ce(me(v-o)>s?a-s:o-(r.translate(i.y,0,1,0,1)<=o?s:0))),i.barX=m,i.pointWidth=l,i.tooltipPos=e.inverted?[r.len-f,t.xAxis.len-m-g/2]:[m+g/2,f+r.pos-e.plotTop],g=ce(m+g)+u,m=ce(m)+u,g-=m,a=me(v)<.5,n=ce(v+n)+d,v=ce(v)+d,n-=v,a&&(v-=1,n+=1),i.shapeType="rect",i.shapeArgs={x:m,y:v,width:g,height:n}})},getSymbol:Ae,drawLegendSymbol:Ve.drawRectangle,drawGraph:Ae,drawPoints:function(){var t,i,n=this,r=this.chart,o=n.options,s=r.renderer,a=o.animationLimit||250;Xe(n.points,function(l){var h=l.plotY,u=l.graphic;h===F||isNaN(h)||null===l.y?u&&(l.graphic=u.destroy()):(t=l.shapeArgs,h=c(n.borderWidth)?{"stroke-width":n.borderWidth}:{},i=l.pointAttr[l.selected?"select":""]||n.pointAttr[""],u?(ei(u),u.attr(h)[r.pointCount<a?"animate":"attr"](e(t))):l.graphic=s[l.shapeType](t).attr(i).attr(h).add(n.group).shadow(o.shadow,null,o.stacking&&!o.borderRadius))})},animate:function(t){var e=this.yAxis,i=this.options,n=this.chart.inverted,r={};Ce&&(t?(r.scaleY=.001,t=fe(e.pos+e.len,pe(e.pos,e.toPixels(i.threshold))),n?r.translateX=t-e.len:r.translateY=t,this.group.attr(r)):(r.scaleY=1,r[n?"translateX":"translateY"]=e.pos,this.group.animate(r,this.options.animation),this.animate=null))},remove:function(){var t=this,e=t.chart;e.hasRendered&&Xe(e.series,function(e){e.type===t.type&&(e.isDirty=!0)}),bi.prototype.remove.apply(t,arguments)}}),Oe.column=hi,ii.bar=e(ii.column),_i=g(hi,{type:"bar",inverted:!0}),Oe.bar=_i,ii.scatter=e(Ue,{lineWidth:0,tooltip:{headerFormat:'<span style="color:{series.color}">●</span> <span style="font-size: 10px;"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"},stickyTracking:!1}),_i=g(bi,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,singularTooltips:!0,drawGraph:function(){this.options.lineWidth&&bi.prototype.drawGraph.call(this)}}),Oe.scatter=_i,ii.pie=e(Ue,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}}),Ue={type:"pie",isCartesian:!1,pointClass:g(Ei,{init:function(){Ei.prototype.init.apply(this,arguments);var e,i=this;return i.y<0&&(i.y=null),t(i,{visible:i.visible!==!1,name:p(i.name,"Slice")}),e=function(t){i.slice("select"===t.type)},$e(i,"select",e),$e(i,"unselect",e),i},setVisible:function(t){var e=this,i=e.series,n=i.chart;e.visible=e.options.visible=t=t===F?!e.visible:t,i.options.data[Ge(e,i.data)]=e.options,Xe(["graphic","dataLabel","connector","shadowGroup"],function(i){e[i]&&e[i][t?"show":"hide"](!0)}),e.legendItem&&n.legend.colorizeItem(e,t),!i.isDirty&&i.options.ignoreHiddenPoint&&(i.isDirty=!0,n.redraw())},slice:function(t,e,i){var n=this.series;H(i,n.chart),p(e,!0),this.sliced=this.options.sliced=t=c(t)?t:!this.sliced,n.options.data[Ge(this,n.data)]=this.options,t=t?this.slicedTranslation:{translateX:0,translateY:0},this.graphic.animate(t),this.shadowGroup&&this.shadowGroup.animate(t)},haloPath:function(t){var e=this.shapeArgs,i=this.series.chart;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(i.plotLeft+e.x,i.plotTop+e.y,e.r+t,e.r+t,{innerR:this.shapeArgs.r,start:e.start,end:e.end})}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},singularTooltips:!0,getColor:Ae,animate:function(t){var e=this,i=e.points,n=e.startAngleRad;t||(Xe(i,function(t){var i=t.graphic,t=t.shapeArgs;i&&(i.attr({r:e.center[3]/2,start:n,end:n}),i.animate({r:t.r,start:t.start,end:t.end},e.options.animation))}),e.animate=null)},setData:function(t,e,i,n){bi.prototype.setData.call(this,t,!1,i,n),this.processData(),this.generatePoints(),p(e,!0)&&this.chart.redraw(i)},generatePoints:function(){var t,e,i,n,r=0,o=this.options.ignoreHiddenPoint;for(bi.prototype.generatePoints.call(this),e=this.points,i=e.length,t=0;i>t;t++)n=e[t],r+=o&&!n.visible?0:n.y;for(this.total=r,t=0;i>t;t++)n=e[t],n.percentage=r>0?n.y/r*100:0,n.total=r},translate:function(t){this.generatePoints();var e,i,n,r,o,s=0,a=this.options,l=a.slicedOffset,h=l+a.borderWidth,c=a.startAngle||0,u=this.startAngleRad=ye/180*(c-90),c=(this.endAngleRad=ye/180*(p(a.endAngle,c+360)-90))-u,d=this.points,f=a.dataLabels.distance,a=a.ignoreHiddenPoint,m=d.length;for(t||(this.center=t=this.getCenter()),this.getX=function(e,i){return n=he.asin(fe((e-t[1])/(t[2]/2+f),1)),t[0]+(i?-1:1)*ge(n)*(t[2]/2+f)},r=0;m>r;r++)o=d[r],e=u+s*c,(!a||o.visible)&&(s+=o.percentage/100),i=u+s*c,o.shapeType="arc",o.shapeArgs={x:t[0],y:t[1],r:t[2]/2,innerR:t[3]/2,start:ce(1e3*e)/1e3,end:ce(1e3*i)/1e3},n=(i+e)/2,n>1.5*ye?n-=2*ye:-ye/2>n&&(n+=2*ye),o.slicedTranslation={translateX:ce(ge(n)*l),translateY:ce(ve(n)*l)},e=ge(n)*t[2]/2,i=ve(n)*t[2]/2,o.tooltipPos=[t[0]+.7*e,t[1]+.7*i],o.half=-ye/2>n||n>ye/2?1:0,o.angle=n,h=fe(h,f/2),o.labelPos=[t[0]+e+ge(n)*f,t[1]+i+ve(n)*f,t[0]+e+ge(n)*h,t[1]+i+ve(n)*h,t[0]+e,t[1]+i,0>f?"center":o.half?"right":"left",n]},drawGraph:null,drawPoints:function(){var e,i,n,r,o=this,s=o.chart.renderer,a=o.options.shadow;a&&!o.shadowGroup&&(o.shadowGroup=s.g("shadow").add(o.group)),Xe(o.points,function(l){i=l.graphic,r=l.shapeArgs,n=l.shadowGroup,a&&!n&&(n=l.shadowGroup=s.g("shadow").add(o.shadowGroup)),e=l.sliced?l.slicedTranslation:{translateX:0,translateY:0},n&&n.attr(e),i?i.animate(t(r,e)):l.graphic=i=s[l.shapeType](r).setRadialReference(o.center).attr(l.pointAttr[l.selected?"select":""]).attr({"stroke-linejoin":"round"}).attr(e).add(o.group).shadow(a,n),void 0!==l.visible&&l.setVisible(l.visible)})},sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawLegendSymbol:Ve.drawRectangle,getCenter:li.getCenter,getSymbol:Ae},Ue=g(bi,Ue),Oe.pie=Ue,bi.prototype.drawDataLabels=function(){var i,n,r,o,s=this,a=s.options,l=a.cursor,h=a.dataLabels,u=s.points,d=s.hasRendered||0;(h.enabled||s._hasPointLabels)&&(s.dlProcessOptions&&s.dlProcessOptions(h),o=s.plotGroup("dataLabelsGroup","data-labels",h.defer?"hidden":"visible",h.zIndex||6),p(h.defer,!0)&&(o.attr({opacity:+d}),d||$e(s,"afterAnimate",function(){s.visible&&o.show(),o[a.animation?"animate":"attr"]({opacity:1},{duration:200})})),n=h,Xe(u,function(a){var u,d,f,m=a.dataLabel,g=a.connector,v=!0;if(i=a.options&&a.options.dataLabels,u=p(i&&i.enabled,n.enabled),m&&!u)a.dataLabel=m.destroy();else if(u){if(h=e(n,i),u=h.rotation,d=a.getLabelConfig(),r=h.format?b(h.format,d):h.formatter.call(d,h),h.style.color=p(h.color,h.style.color,s.color,"black"),m)c(r)?(m.attr({text:r}),v=!1):(a.dataLabel=m=m.destroy(),g&&(a.connector=g.destroy()));else if(c(r)){m={fill:h.backgroundColor,stroke:h.borderColor,"stroke-width":h.borderWidth,r:h.borderRadius||0,rotation:u,padding:h.padding,zIndex:1};for(f in m)m[f]===F&&delete m[f];m=a.dataLabel=s.chart.renderer[u?"text":"label"](r,0,-999,null,null,null,h.useHTML).attr(m).css(t(h.style,l&&{cursor:l})).add(o).shadow(h.shadow)}m&&s.alignDataLabel(a,m,h,null,v)}}))},bi.prototype.alignDataLabel=function(e,i,n,r,o){var s=this.chart,a=s.inverted,l=p(e.plotX,-999),h=p(e.plotY,-999),c=i.getBBox();(e=this.visible&&(e.series.forceDL||s.isInsidePlot(l,ce(h),a)||r&&s.isInsidePlot(l,a?r.x+1:r.y+r.height-1,a)))&&(r=t({x:a?s.plotWidth-h:l,y:ce(a?s.plotHeight-l:h),width:0,height:0},r),t(n,{width:c.width,height:c.height}),n.rotation?i[o?"attr":"animate"]({x:r.x+n.x+r.width/2,y:r.y+n.y+r.height/2}).attr({align:n.align}):(i.align(n,null,r),a=i.alignAttr,"justify"===p(n.overflow,"justify")?this.justifyDataLabel(i,n,a,c,r,o):p(n.crop,!0)&&(e=s.isInsidePlot(a.x,a.y)&&s.isInsidePlot(a.x+c.width,a.y+c.height)))),e||(i.attr({y:-999}),i.placed=!1)},bi.prototype.justifyDataLabel=function(t,e,i,n,r,o){var s,a,l=this.chart,h=e.align,c=e.verticalAlign;s=i.x,0>s&&("right"===h?e.align="left":e.x=-s,a=!0),s=i.x+n.width,s>l.plotWidth&&("left"===h?e.align="right":e.x=l.plotWidth-s,a=!0),s=i.y,0>s&&("bottom"===c?e.verticalAlign="top":e.y=-s,a=!0),s=i.y+n.height,s>l.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=l.plotHeight-s,a=!0),a&&(t.placed=!o,t.align(e,null,r))},Oe.pie&&(Oe.pie.prototype.drawDataLabels=function(){var t,e,i,n,r,o,s,a,l,h,c,u=this,d=u.data,f=u.chart,m=u.options.dataLabels,g=p(m.connectorPadding,10),v=p(m.connectorWidth,1),y=f.plotWidth,E=f.plotHeight,b=p(m.softConnector,!0),_=m.distance,T=u.center,x=T[2]/2,w=T[1],S=_>0,M=[[],[]],C=[0,0,0,0],H=function(t,e){return e.y-t.y};if(u.visible&&(m.enabled||u._hasPointLabels)){for(bi.prototype.drawDataLabels.apply(u),Xe(d,function(t){t.dataLabel&&t.visible&&M[t.half].push(t)}),h=2;h--;){var D,P=[],k=[],A=M[h],L=A.length;if(L){for(u.sortByAngle(A,h-.5),c=d=0;!d&&A[c];)d=A[c]&&A[c].dataLabel&&(A[c].dataLabel.getBBox().height||21),c++;if(_>0){for(r=fe(w+x+_,f.plotHeight),c=pe(0,w-x-_);r>=c;c+=d)P.push(c);if(r=P.length,L>r){for(t=[].concat(A),t.sort(H),c=L;c--;)t[c].rank=c;for(c=L;c--;)A[c].rank>=r&&A.splice(c,1);L=A.length}for(c=0;L>c;c++){t=A[c],o=t.labelPos,t=9999;var I,F;for(F=0;r>F;F++)I=me(P[F]-o[1]),t>I&&(t=I,D=F);if(c>D&&null!==P[c])D=c;else for(L-c+D>r&&null!==P[c]&&(D=r-L+c);null===P[D];)D++;k.push({i:D,y:P[D]}),P[D]=null}k.sort(H)}for(c=0;L>c;c++)t=A[c],o=t.labelPos,n=t.dataLabel,l=t.visible===!1?"hidden":"visible",t=o[1],_>0?(r=k.pop(),D=r.i,a=r.y,(t>a&&null!==P[D+1]||a>t&&null!==P[D-1])&&(a=fe(pe(0,t),f.plotHeight))):a=t,s=m.justify?T[0]+(h?-1:1)*(x+_):u.getX(a===w-x-_||a===w+x+_?t:a,h),n._attr={visibility:l,align:o[6]},n._pos={x:s+m.x+({left:g,right:-g}[o[6]]||0),y:a+m.y-10},n.connX=s,n.connY=a,null===this.options.size&&(r=n.width,g>s-r?C[3]=pe(ce(r-s+g),C[3]):s+r>y-g&&(C[1]=pe(ce(s+r-y+g),C[1])),0>a-d/2?C[0]=pe(ce(-a+d/2),C[0]):a+d/2>E&&(C[2]=pe(ce(a+d/2-E),C[2])))}}(0===R(C)||this.verifyDataLabelOverflow(C))&&(this.placeDataLabels(),S&&v&&Xe(this.points,function(t){e=t.connector,o=t.labelPos,(n=t.dataLabel)&&n._pos?(l=n._attr.visibility,s=n.connX,a=n.connY,i=b?["M",s+("left"===o[6]?5:-5),a,"C",s,a,2*o[2]-o[4],2*o[3]-o[5],o[2],o[3],"L",o[4],o[5]]:["M",s+("left"===o[6]?5:-5),a,"L",o[2],o[3],"L",o[4],o[5]],e?(e.animate({d:i}),e.attr("visibility",l)):t.connector=e=u.chart.renderer.path(i).attr({"stroke-width":v,stroke:m.connectorColor||t.color||"#606060",visibility:l}).add(u.dataLabelsGroup)):e&&(t.connector=e.destroy())}))}},Oe.pie.prototype.placeDataLabels=function(){Xe(this.points,function(t){var e,t=t.dataLabel;t&&((e=t._pos)?(t.attr(t._attr),t[t.moved?"animate":"attr"](e),t.moved=!0):t&&t.attr({y:-999}))})},Oe.pie.prototype.alignDataLabel=Ae,Oe.pie.prototype.verifyDataLabelOverflow=function(t){var e,i=this.center,n=this.options,r=n.center,o=n=n.minSize||80;return null!==r[0]?o=pe(i[2]-pe(t[1],t[3]),n):(o=pe(i[2]-t[1]-t[3],n),i[0]+=(t[3]-t[1])/2),null!==r[1]?o=pe(fe(o,i[2]-pe(t[0],t[2])),n):(o=pe(fe(o,i[2]-t[0]-t[2]),n),i[1]+=(t[0]-t[2])/2),o<i[2]?(i[2]=o,this.translate(i),Xe(this.points,function(t){t.dataLabel&&(t.dataLabel._pos=null)}),this.drawDataLabels&&this.drawDataLabels()):e=!0,e}),Oe.column&&(Oe.column.prototype.alignDataLabel=function(t,i,n,r,o){var s=this.chart,a=s.inverted,l=t.dlBox||t.shapeArgs,h=t.below||t.plotY>p(this.translatedThreshold,s.plotSizeY),c=p(n.inside,!!this.options.stacking);l&&(r=e(l),a&&(r={x:s.plotWidth-r.y-r.height,y:s.plotHeight-r.x-r.width,width:r.height,height:r.width}),!c)&&(a?(r.x+=h?0:r.width,r.width=0):(r.y+=h?r.height:0,r.height=0)),n.align=p(n.align,!a||c?"center":h?"right":"left"),n.verticalAlign=p(n.verticalAlign,a||c?"middle":h?"top":"bottom"),bi.prototype.alignDataLabel.call(this,t,i,n,r,o)}),Ue=se.TrackerMixin={drawTrackerPoint:function(){var t=this,e=t.chart,i=e.pointer,n=t.options.cursor,r=n&&{cursor:n},o=function(i){var n,r=i.target;for(e.hoverSeries!==t&&t.onMouseOver();r&&!n;)n=r.point,r=r.parentNode;n!==F&&n!==e.hoverPoint&&n.onMouseOver(i)};Xe(t.points,function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.element.point=t)}),t._hasTracking||(Xe(t.trackerGroups,function(e){t[e]&&(t[e].addClass("highcharts-tracker").on("mouseover",o).on("mouseout",function(t){i.onTrackerMouseOut(t)}).css(r),z)&&t[e].on("touchstart",o)}),t._hasTracking=!0)},drawTrackerGraph:function(){var t,e=this,i=e.options,n=i.trackByArea,r=[].concat(n?e.areaPath:e.graphPath),o=r.length,s=e.chart,a=s.pointer,l=s.renderer,h=s.options.tooltip.snap,c=e.tracker,u=i.cursor,d=u&&{cursor:u},u=e.singlePoints,p=function(){s.hoverSeries!==e&&e.onMouseOver()},f="rgba(192,192,192,"+(Ce?1e-4:.002)+")";if(o&&!n)for(t=o+1;t--;)"M"===r[t]&&r.splice(t+1,0,r[t+1]-h,r[t+2],"L"),(t&&"M"===r[t]||t===o)&&r.splice(t,0,"L",r[t-2]+h,r[t-1]);for(t=0;t<u.length;t++)o=u[t],r.push("M",o.plotX-h,o.plotY,"L",o.plotX+h,o.plotY);c?c.attr({d:r}):(e.tracker=l.path(r).attr({"stroke-linejoin":"round",visibility:e.visible?"visible":"hidden",stroke:f,fill:n?f:Ne,"stroke-width":i.lineWidth+(n?0:2*h),zIndex:2}).add(e.group),Xe([e.tracker,e.markerGroup],function(t){t.addClass("highcharts-tracker").on("mouseover",p).on("mouseout",function(t){a.onTrackerMouseOut(t)}).css(d),z&&t.on("touchstart",p)}))}},Oe.column&&(hi.prototype.drawTracker=Ue.drawTrackerPoint),Oe.pie&&(Oe.pie.prototype.drawTracker=Ue.drawTrackerPoint),Oe.scatter&&(_i.prototype.drawTracker=Ue.drawTrackerPoint),t(yi.prototype,{setItemEvents:function(t,e,i,n,r){var o=this;(i?e:t.legendGroup).on("mouseover",function(){t.setState("hover"),e.css(o.options.itemHoverStyle)}).on("mouseout",function(){e.css(t.visible?n:r),t.setState()}).on("click",function(e){var i=function(){t.setVisible()},e={browserEvent:e};t.firePointEvent?t.firePointEvent("legendItemClick",e,i):Je(t,"legendItemClick",e,i)})},createCheckboxForItem:function(t){t.checkbox=m("input",{type:"checkbox",checked:t.selected,defaultChecked:t.selected},this.options.itemCheckboxStyle,this.chart.container),$e(t.checkbox,"click",function(e){Je(t,"checkboxClick",{checked:e.target.checked},function(){t.select()})})}}),O.legend.itemStyle.cursor="pointer",t(L.prototype,{showResetZoom:function(){var t=this,e=O.lang,i=t.options.chart.resetZoomButton,n=i.theme,r=n.states,o="chart"===i.relativeTo?null:"plotBox";this.resetZoomButton=t.renderer.button(e.resetZoom,null,null,function(){t.zoomOut()},n,r&&r.hover).attr({align:i.position.align,title:e.resetZoomTitle}).add().align(i.position,!1,o)},zoomOut:function(){var t=this;Je(t,"selection",{resetSelection:!0},function(){t.zoom()})},zoom:function(t){var e,i,n=this.pointer,o=!1;!t||t.resetSelection?Xe(this.axes,function(t){e=t.zoom()}):Xe(t.xAxis.concat(t.yAxis),function(t){var i=t.axis,r=i.isXAxis;(n[r?"zoomX":"zoomY"]||n[r?"pinchX":"pinchY"])&&(e=i.zoom(t.min,t.max),i.displayBtn&&(o=!0))}),i=this.resetZoomButton,o&&!i?this.showResetZoom():!o&&r(i)&&(this.resetZoomButton=i.destroy()),e&&this.redraw(p(this.options.chart.animation,t&&t.animation,this.pointCount<100))},pan:function(t,e){var i,n=this,r=n.hoverPoints;r&&Xe(r,function(t){t.setState()}),Xe("xy"===e?[1,0]:[1],function(e){var r=t[e?"chartX":"chartY"],o=n[e?"xAxis":"yAxis"][0],s=n[e?"mouseDownX":"mouseDownY"],a=(o.pointRange||0)/2,l=o.getExtremes(),h=o.toValue(s-r,!0)+a,s=o.toValue(s+n[e?"plotWidth":"plotHeight"]-r,!0)-a;o.series.length&&h>fe(l.dataMin,l.min)&&s<pe(l.dataMax,l.max)&&(o.setExtremes(h,s,!1,!1,{trigger:"pan"}),i=!0),n[e?"mouseDownX":"mouseDownY"]=r}),i&&n.redraw(!1),f(n.container,{cursor:"move"})}}),t(Ei.prototype,{select:function(t,e){var i=this,n=i.series,r=n.chart,t=p(t,!i.selected);i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,n.options.data[Ge(i,n.data)]=i.options,i.setState(t&&"select"),e||Xe(r.getSelectedPoints(),function(t){t.selected&&t!==i&&(t.selected=t.options.selected=!1,n.options.data[Ge(t,n.data)]=t.options,t.setState(""),t.firePointEvent("unselect"))})})},onMouseOver:function(t){var e=this.series,i=e.chart,n=i.tooltip,r=i.hoverPoint;r&&r!==this&&r.onMouseOut(),this.firePointEvent("mouseOver"),n&&(!n.shared||e.noSharedTooltip)&&n.refresh(this,t),this.setState("hover"),i.hoverPoint=this},onMouseOut:function(){var t=this.series.chart,e=t.hoverPoints;this.firePointEvent("mouseOut"),e&&-1!==Ge(this,e)||(this.setState(),t.hoverPoint=null)},importEvents:function(){if(!this.hasImportedEvents){var t,i=e(this.series.options.point,this.options).events;this.events=i;for(t in i)$e(this,t,i[t]);this.hasImportedEvents=!0}},setState:function(i,n){var r,o=this.plotX,s=this.plotY,a=this.series,l=a.options.states,h=ii[a.type].marker&&a.options.marker,c=h&&!h.enabled,u=h&&h.states[i],d=u&&u.enabled===!1,p=a.stateMarkerGraphic,f=this.marker||{},m=a.chart,g=a.halo,i=i||"";r=this.pointAttr[i]||a.pointAttr[i],i===this.state&&!n||this.selected&&"select"!==i||l[i]&&l[i].enabled===!1||i&&(d||c&&u.enabled===!1)||i&&f.states&&f.states[i]&&f.states[i].enabled===!1||(this.graphic?(h=h&&this.graphic.symbolName&&r.r,this.graphic.attr(e(r,h?{x:o-h,y:s-h,width:2*h,height:2*h}:{})),p&&p.hide()):(i&&u&&(h=u.radius,f=f.symbol||a.symbol,p&&p.currentSymbol!==f&&(p=p.destroy()),p?p[n?"animate":"attr"]({x:o-h,y:s-h}):f&&(a.stateMarkerGraphic=p=m.renderer.symbol(f,o-h,s-h,2*h,2*h).attr(r).add(a.markerGroup),p.currentSymbol=f)),p&&p[i&&m.isInsidePlot(o,s,m.inverted)?"show":"hide"]()),(o=l[i]&&l[i].halo)&&o.size?(g||(a.halo=g=m.renderer.path().add(a.seriesGroup)),g.attr(t({fill:si(this.color||a.color).setOpacity(o.opacity).get()},o.attributes))[n?"animate":"attr"]({d:this.haloPath(o.size)})):g&&g.attr({d:[]}),this.state=i)},haloPath:function(t){var e=this.series,i=e.chart,n=e.getPlotBox(),r=i.inverted;return i.renderer.symbols.circle(n.translateX+(r?e.yAxis.len-this.plotY:this.plotX)-t,n.translateY+(r?e.xAxis.len-this.plotX:this.plotY)-t,2*t,2*t)}}),t(bi.prototype,{onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&Je(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},onMouseOut:function(){var t=this.options,e=this.chart,i=e.tooltip,n=e.hoverPoint;n&&n.onMouseOut(),this&&t.events.mouseOut&&Je(this,"mouseOut"),i&&!t.stickyTracking&&(!i.shared||this.noSharedTooltip)&&i.hide(),this.setState(),e.hoverSeries=null},setState:function(t){var e=this.options,i=this.graph,n=this.graphNeg,r=e.states,e=e.lineWidth,t=t||"";this.state!==t&&(this.state=t,r[t]&&r[t].enabled===!1||(t&&(e=r[t].lineWidth||e+(r[t].lineWidthPlus||0)),i&&!i.dashstyle&&(t={"stroke-width":e},i.attr(t),n&&n.attr(t))))},setVisible:function(t,e){var i,n=this,r=n.chart,o=n.legendItem,s=r.options.chart.ignoreHiddenSeries,a=n.visible;i=(n.visible=t=n.userOptions.visible=t===F?!a:t)?"show":"hide",Xe(["group","dataLabelsGroup","markerGroup","tracker"],function(t){n[t]&&n[t][i]()}),r.hoverSeries===n&&n.onMouseOut(),o&&r.legend.colorizeItem(n,t),n.isDirty=!0,n.options.stacking&&Xe(r.series,function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),Xe(n.linkedSeries,function(e){e.setVisible(t,!1)}),s&&(r.isDirtyBox=!0),e!==!1&&r.redraw(),Je(n,i)},setTooltipPoints:function(t){var e,i,n,r,o=[],s=this.xAxis,a=s&&s.getExtremes(),l=s?s.tooltipLen||s.len:this.chart.plotSizeX,h=[];if(this.options.enableMouseTracking!==!1&&!this.singularTooltips){for(t&&(this.tooltipPoints=null),Xe(this.segments||this.points,function(t){o=o.concat(t)}),s&&s.reversed&&(o=o.reverse()),this.orderTooltipPoints&&this.orderTooltipPoints(o),t=o.length,r=0;t>r;r++)if(s=o[r],e=s.x,e>=a.min&&e<=a.max)for(n=o[r+1],e=i===F?0:i+1,i=o[r+1]?fe(pe(0,ue((s.clientX+(n?n.wrappedClientX||n.clientX:l))/2)),l):l;e>=0&&i>=e;)h[e++]=s;this.tooltipPoints=h}},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){this.selected=t=t===F?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),Je(this,t?"select":"unselect")},drawTracker:Ue.drawTrackerGraph}),t(se,{Axis:A,Chart:L,Color:si,Point:Ei,Tick:k,Renderer:N,Series:bi,SVGElement:P,SVGRenderer:ai,arrayMin:w,arrayMax:R,charts:Le,dateFormat:U,format:b,pathAnim:j,getOptions:function(){return O},hasBidiBug:He,isTouchDevice:Se,numberFormat:v,seriesTypes:Oe,setOptions:function(t){return O=e(!0,O,t),D(),O},addEvent:$e,removeEvent:Ke,createElement:m,discardElement:M,css:f,each:Xe,extend:t,map:qe,merge:e,pick:p,splat:d,extendClass:g,pInt:i,wrap:E,svg:Ce,canvas:De,vml:!Ce&&!De,product:"Highcharts",version:"4.0.4"})}(),function(t){var e={set:{colors:1,values:1,backgroundColor:1,scaleColors:1,normalizeFunction:1,focus:1},get:{selectedRegions:1,selectedMarkers:1,mapObject:1,regionName:1}};t.fn.vectorMap=function(t){var i,n,i=this.children(".jvectormap-container").data("mapObject");if("addMap"===t)jvm.Map.maps[arguments[1]]=arguments[2];else{if(("set"===t||"get"===t)&&e[t][arguments[1]])return n=arguments[1].charAt(0).toUpperCase()+arguments[1].substr(1),i[t+n].apply(i,Array.prototype.slice.call(arguments,2));t=t||{},t.container=this,i=new jvm.Map(t)}return this}}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(t){function e(e){var s=e||window.event,a=l.call(arguments,1),h=0,c=0,u=0,d=0;if(e=t.event.fix(s),e.type="mousewheel","detail"in s&&(u=-1*s.detail),"wheelDelta"in s&&(u=s.wheelDelta),"wheelDeltaY"in s&&(u=s.wheelDeltaY),"wheelDeltaX"in s&&(c=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(c=-1*u,u=0),h=0===u?c:u,"deltaY"in s&&(u=-1*s.deltaY,h=u),"deltaX"in s&&(c=s.deltaX,0===u&&(h=-1*c)),0!==u||0!==c){if(1===s.deltaMode){var p=t.data(this,"mousewheel-line-height");h*=p,u*=p,c*=p}else if(2===s.deltaMode){var f=t.data(this,"mousewheel-page-height");h*=f,u*=f,c*=f}return d=Math.max(Math.abs(u),Math.abs(c)),(!o||o>d)&&(o=d,n(s,d)&&(o/=40)),n(s,d)&&(h/=40,c/=40,u/=40),h=Math[h>=1?"floor":"ceil"](h/o),c=Math[c>=1?"floor":"ceil"](c/o),u=Math[u>=1?"floor":"ceil"](u/o),e.deltaX=c,e.deltaY=u,e.deltaFactor=o,e.deltaMode=0,a.unshift(e,h,c,u),r&&clearTimeout(r),r=setTimeout(i,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function i(){o=null}function n(t,e){return c.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120===0}var r,o,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(t.event.fixHooks)for(var h=s.length;h;)t.event.fixHooks[s[--h]]=t.event.mouseHooks;var c=t.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var i=a.length;i;)this.addEventListener(a[--i],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",c.getLineHeight(this)),t.data(this,"mousewheel-page-height",c.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=a.length;t;)this.removeEventListener(a[--t],e,!1);else this.onmousewheel=null},getLineHeight:function(e){return parseInt(t(e)["offsetParent"in t.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})});var jvm={inherits:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.parentClass=e},mixin:function(t,e){var i;for(i in e.prototype)e.prototype.hasOwnProperty(i)&&(t.prototype[i]=e.prototype[i])},min:function(t){var e,i=Number.MAX_VALUE;if(t instanceof Array)for(e=0;e<t.length;e++)t[e]<i&&(i=t[e]);else for(e in t)t[e]<i&&(i=t[e]);return i},max:function(t){var e,i=Number.MIN_VALUE;if(t instanceof Array)for(e=0;e<t.length;e++)t[e]>i&&(i=t[e]);else for(e in t)t[e]>i&&(i=t[e]);return i},keys:function(t){var e,i=[];for(e in t)i.push(e);return i},values:function(t){var e,i,n=[];for(i=0;i<arguments.length;i++){t=arguments[i];for(e in t)n.push(t[e])}return n},whenImageLoaded:function(t){var e=new jvm.$.Deferred,i=jvm.$("<img/>");return i.error(function(){e.reject()}).load(function(){e.resolve(i)}),i.attr("src",t),e},isImageUrl:function(t){return/\.\w{3,4}$/.test(t)}};jvm.$=jQuery,Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var i;if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return-1;var o=+e||0;if(1/0===Math.abs(o)&&(o=0),o>=r)return-1;for(i=Math.max(o>=0?o:r-Math.abs(o),0);r>i;){if(i in n&&n[i]===t)return i;i++}return-1}),jvm.AbstractElement=function(t,e){this.node=this.createElement(t),this.name=t,this.properties={},e&&this.set(e)},jvm.AbstractElement.prototype.set=function(t,e){var i;if("object"==typeof t)for(i in t)this.properties[i]=t[i],this.applyAttr(i,t[i]);else this.properties[t]=e,this.applyAttr(t,e)},jvm.AbstractElement.prototype.get=function(t){return this.properties[t]},jvm.AbstractElement.prototype.applyAttr=function(t,e){this.node.setAttribute(t,e)},jvm.AbstractElement.prototype.remove=function(){jvm.$(this.node).remove()},jvm.AbstractCanvasElement=function(t,e,i){this.container=t,this.setSize(e,i),this.rootElement=new jvm[this.classPrefix+"GroupElement"],this.node.appendChild(this.rootElement.node),this.container.appendChild(this.node)},jvm.AbstractCanvasElement.prototype.add=function(t,e){e=e||this.rootElement,e.add(t),t.canvas=this},jvm.AbstractCanvasElement.prototype.addPath=function(t,e,i){var n=new jvm[this.classPrefix+"PathElement"](t,e);return this.add(n,i),n},jvm.AbstractCanvasElement.prototype.addCircle=function(t,e,i){var n=new jvm[this.classPrefix+"CircleElement"](t,e);return this.add(n,i),n},jvm.AbstractCanvasElement.prototype.addImage=function(t,e,i){var n=new jvm[this.classPrefix+"ImageElement"](t,e);return this.add(n,i),n},jvm.AbstractCanvasElement.prototype.addText=function(t,e,i){var n=new jvm[this.classPrefix+"TextElement"](t,e);return this.add(n,i),n},jvm.AbstractCanvasElement.prototype.addGroup=function(t){var e=new jvm[this.classPrefix+"GroupElement"];return t?t.node.appendChild(e.node):this.node.appendChild(e.node),e.canvas=this,e},jvm.AbstractShapeElement=function(t,e,i){this.style=i||{},this.style.current=this.style.current||{},this.isHovered=!1,this.isSelected=!1,this.updateStyle()},jvm.AbstractShapeElement.prototype.setStyle=function(t,e){var i={};"object"==typeof t?i=t:i[t]=e,jvm.$.extend(this.style.current,i),this.updateStyle()},jvm.AbstractShapeElement.prototype.updateStyle=function(){var t={};jvm.AbstractShapeElement.mergeStyles(t,this.style.initial),jvm.AbstractShapeElement.mergeStyles(t,this.style.current),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(t,this.style.hover),this.isSelected&&(jvm.AbstractShapeElement.mergeStyles(t,this.style.selected),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(t,this.style.selectedHover)),this.set(t)},jvm.AbstractShapeElement.mergeStyles=function(t,e){var i;e=e||{};for(i in e)null===e[i]?delete t[i]:t[i]=e[i]},jvm.SVGElement=function(){jvm.SVGElement.parentClass.apply(this,arguments)},jvm.inherits(jvm.SVGElement,jvm.AbstractElement),jvm.SVGElement.svgns="http://www.w3.org/2000/svg",jvm.SVGElement.prototype.createElement=function(t){return document.createElementNS(jvm.SVGElement.svgns,t)},jvm.SVGElement.prototype.addClass=function(t){this.node.setAttribute("class",t)},jvm.SVGElement.prototype.getElementCtr=function(t){return jvm["SVG"+t]},jvm.SVGElement.prototype.getBBox=function(){return this.node.getBBox()},jvm.SVGGroupElement=function(){jvm.SVGGroupElement.parentClass.call(this,"g")},jvm.inherits(jvm.SVGGroupElement,jvm.SVGElement),jvm.SVGGroupElement.prototype.add=function(t){this.node.appendChild(t.node)},jvm.SVGCanvasElement=function(){this.classPrefix="SVG",jvm.SVGCanvasElement.parentClass.call(this,"svg"),this.defsElement=new jvm.SVGElement("defs"),this.node.appendChild(this.defsElement.node),jvm.AbstractCanvasElement.apply(this,arguments)},jvm.inherits(jvm.SVGCanvasElement,jvm.SVGElement),jvm.mixin(jvm.SVGCanvasElement,jvm.AbstractCanvasElement),jvm.SVGCanvasElement.prototype.setSize=function(t,e){this.width=t,this.height=e,this.node.setAttribute("width",t),this.node.setAttribute("height",e)},jvm.SVGCanvasElement.prototype.applyTransformParams=function(t,e,i){this.scale=t,this.transX=e,this.transY=i,this.rootElement.node.setAttribute("transform","scale("+t+") translate("+e+", "+i+")")},jvm.SVGShapeElement=function(t,e){jvm.SVGShapeElement.parentClass.call(this,t,e),jvm.AbstractShapeElement.apply(this,arguments)},jvm.inherits(jvm.SVGShapeElement,jvm.SVGElement),jvm.mixin(jvm.SVGShapeElement,jvm.AbstractShapeElement),jvm.SVGShapeElement.prototype.applyAttr=function(t,e){var i,n,r=this;"fill"===t&&jvm.isImageUrl(e)?jvm.SVGShapeElement.images[e]?this.applyAttr("fill","url(#image"+jvm.SVGShapeElement.images[e]+")"):jvm.whenImageLoaded(e).then(function(t){n=new jvm.SVGElement("image"),n.node.setAttributeNS("http://www.w3.org/1999/xlink","href",e),n.applyAttr("x","0"),n.applyAttr("y","0"),n.applyAttr("width",t[0].width),n.applyAttr("height",t[0].height),i=new jvm.SVGElement("pattern"),i.applyAttr("id","image"+jvm.SVGShapeElement.imageCounter),i.applyAttr("x",0),i.applyAttr("y",0),i.applyAttr("width",t[0].width/2),i.applyAttr("height",t[0].height/2),i.applyAttr("viewBox","0 0 "+t[0].width+" "+t[0].height),i.applyAttr("patternUnits","userSpaceOnUse"),i.node.appendChild(n.node),r.canvas.defsElement.node.appendChild(i.node),jvm.SVGShapeElement.images[e]=jvm.SVGShapeElement.imageCounter++,r.applyAttr("fill","url(#image"+jvm.SVGShapeElement.images[e]+")")}):jvm.SVGShapeElement.parentClass.prototype.applyAttr.apply(this,arguments)
  17. },jvm.SVGShapeElement.imageCounter=1,jvm.SVGShapeElement.images={},jvm.SVGPathElement=function(t,e){jvm.SVGPathElement.parentClass.call(this,"path",t,e),this.node.setAttribute("fill-rule","evenodd")},jvm.inherits(jvm.SVGPathElement,jvm.SVGShapeElement),jvm.SVGCircleElement=function(t,e){jvm.SVGCircleElement.parentClass.call(this,"circle",t,e)},jvm.inherits(jvm.SVGCircleElement,jvm.SVGShapeElement),jvm.SVGImageElement=function(t,e){jvm.SVGImageElement.parentClass.call(this,"image",t,e)},jvm.inherits(jvm.SVGImageElement,jvm.SVGShapeElement),jvm.SVGImageElement.prototype.applyAttr=function(t,e){var i=this;"image"==t?jvm.SVGImageElement.images[e]||jvm.whenImageLoaded(e).then(function(t){i.node.setAttributeNS("http://www.w3.org/1999/xlink","href",e),i.width=t[0].width,i.height=t[0].height,i.applyAttr("width",i.width),i.applyAttr("height",i.height),jvm.SVGImageElement.images[e]=jvm.SVGImageElement.imageCounter++,i.applyAttr("x",i.cx-i.width/2),i.applyAttr("y",i.cy-i.height/2),jvm.$(i.node).trigger("imageloaded",[t])}):"cx"==t?(this.cx=e,this.width&&this.applyAttr("x",e-this.width/2)):"cy"==t?(this.cy=e,this.height&&this.applyAttr("y",e-this.height/2)):jvm.SVGImageElement.parentClass.prototype.applyAttr.apply(this,arguments)},jvm.SVGImageElement.imageCounter=1,jvm.SVGImageElement.images={},jvm.SVGTextElement=function(t,e){jvm.SVGTextElement.parentClass.call(this,"text",t,e)},jvm.inherits(jvm.SVGTextElement,jvm.SVGShapeElement),jvm.SVGTextElement.prototype.applyAttr=function(t,e){"text"===t?this.node.textContent=e:jvm.SVGTextElement.parentClass.prototype.applyAttr.apply(this,arguments)},jvm.VMLElement=function(){jvm.VMLElement.VMLInitialized||jvm.VMLElement.initializeVML(),jvm.VMLElement.parentClass.apply(this,arguments)},jvm.inherits(jvm.VMLElement,jvm.AbstractElement),jvm.VMLElement.VMLInitialized=!1,jvm.VMLElement.initializeVML=function(){try{document.namespaces.rvml||document.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),jvm.VMLElement.prototype.createElement=function(t){return document.createElement("<rvml:"+t+' class="rvml">')}}catch(t){jvm.VMLElement.prototype.createElement=function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}document.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"),jvm.VMLElement.VMLInitialized=!0},jvm.VMLElement.prototype.getElementCtr=function(t){return jvm["VML"+t]},jvm.VMLElement.prototype.addClass=function(t){jvm.$(this.node).addClass(t)},jvm.VMLElement.prototype.applyAttr=function(t,e){this.node[t]=e},jvm.VMLElement.prototype.getBBox=function(){var t=jvm.$(this.node);return{x:t.position().left/this.canvas.scale,y:t.position().top/this.canvas.scale,width:t.width()/this.canvas.scale,height:t.height()/this.canvas.scale}},jvm.VMLGroupElement=function(){jvm.VMLGroupElement.parentClass.call(this,"group"),this.node.style.left="0px",this.node.style.top="0px",this.node.coordorigin="0 0"},jvm.inherits(jvm.VMLGroupElement,jvm.VMLElement),jvm.VMLGroupElement.prototype.add=function(t){this.node.appendChild(t.node)},jvm.VMLCanvasElement=function(){this.classPrefix="VML",jvm.VMLCanvasElement.parentClass.call(this,"group"),jvm.AbstractCanvasElement.apply(this,arguments),this.node.style.position="absolute"},jvm.inherits(jvm.VMLCanvasElement,jvm.VMLElement),jvm.mixin(jvm.VMLCanvasElement,jvm.AbstractCanvasElement),jvm.VMLCanvasElement.prototype.setSize=function(t,e){var i,n,r,o;if(this.width=t,this.height=e,this.node.style.width=t+"px",this.node.style.height=e+"px",this.node.coordsize=t+" "+e,this.node.coordorigin="0 0",this.rootElement){for(i=this.rootElement.node.getElementsByTagName("shape"),r=0,o=i.length;o>r;r++)i[r].coordsize=t+" "+e,i[r].style.width=t+"px",i[r].style.height=e+"px";for(n=this.node.getElementsByTagName("group"),r=0,o=n.length;o>r;r++)n[r].coordsize=t+" "+e,n[r].style.width=t+"px",n[r].style.height=e+"px"}},jvm.VMLCanvasElement.prototype.applyTransformParams=function(t,e,i){this.scale=t,this.transX=e,this.transY=i,this.rootElement.node.coordorigin=this.width-e-this.width/100+","+(this.height-i-this.height/100),this.rootElement.node.coordsize=this.width/t+","+this.height/t},jvm.VMLShapeElement=function(t,e){jvm.VMLShapeElement.parentClass.call(this,t,e),this.fillElement=new jvm.VMLElement("fill"),this.strokeElement=new jvm.VMLElement("stroke"),this.node.appendChild(this.fillElement.node),this.node.appendChild(this.strokeElement.node),this.node.stroked=!1,jvm.AbstractShapeElement.apply(this,arguments)},jvm.inherits(jvm.VMLShapeElement,jvm.VMLElement),jvm.mixin(jvm.VMLShapeElement,jvm.AbstractShapeElement),jvm.VMLShapeElement.prototype.applyAttr=function(t,e){switch(t){case"fill":this.node.fillcolor=e;break;case"fill-opacity":this.fillElement.node.opacity=Math.round(100*e)+"%";break;case"stroke":this.node.stroked="none"===e?!1:!0,this.node.strokecolor=e;break;case"stroke-opacity":this.strokeElement.node.opacity=Math.round(100*e)+"%";break;case"stroke-width":this.node.stroked=0===parseInt(e,10)?!1:!0,this.node.strokeweight=e;break;case"d":this.node.path=jvm.VMLPathElement.pathSvgToVml(e);break;default:jvm.VMLShapeElement.parentClass.prototype.applyAttr.apply(this,arguments)}},jvm.VMLPathElement=function(t,e){var i=new jvm.VMLElement("skew");jvm.VMLPathElement.parentClass.call(this,"shape",t,e),this.node.coordorigin="0 0",i.node.on=!0,i.node.matrix="0.01,0,0,0.01,0,0",i.node.offset="0,0",this.node.appendChild(i.node)},jvm.inherits(jvm.VMLPathElement,jvm.VMLShapeElement),jvm.VMLPathElement.prototype.applyAttr=function(t,e){"d"===t?this.node.path=jvm.VMLPathElement.pathSvgToVml(e):jvm.VMLShapeElement.prototype.applyAttr.call(this,t,e)},jvm.VMLPathElement.pathSvgToVml=function(t){var e,i,n=0,r=0;return t=t.replace(/(-?\d+)e(-?\d+)/g,"0"),t.replace(/([MmLlHhVvCcSs])\s*((?:-?\d*(?:\.\d+)?\s*,?\s*)+)/g,function(t,o,s){s=s.replace(/(\d)-/g,"$1,-").replace(/^\s+/g,"").replace(/\s+$/g,"").replace(/\s+/g,",").split(","),s[0]||s.shift();for(var a=0,l=s.length;l>a;a++)s[a]=Math.round(100*s[a]);switch(o){case"m":return n+=s[0],r+=s[1],"t"+s.join(",");case"M":return n=s[0],r=s[1],"m"+s.join(",");case"l":return n+=s[0],r+=s[1],"r"+s.join(",");case"L":return n=s[0],r=s[1],"l"+s.join(",");case"h":return n+=s[0],"r"+s[0]+",0";case"H":return n=s[0],"l"+n+","+r;case"v":return r+=s[0],"r0,"+s[0];case"V":return r=s[0],"l"+n+","+r;case"c":return e=n+s[s.length-4],i=r+s[s.length-3],n+=s[s.length-2],r+=s[s.length-1],"v"+s.join(",");case"C":return e=s[s.length-4],i=s[s.length-3],n=s[s.length-2],r=s[s.length-1],"c"+s.join(",");case"s":return s.unshift(r-i),s.unshift(n-e),e=n+s[s.length-4],i=r+s[s.length-3],n+=s[s.length-2],r+=s[s.length-1],"v"+s.join(",");case"S":return s.unshift(r+r-i),s.unshift(n+n-e),e=s[s.length-4],i=s[s.length-3],n=s[s.length-2],r=s[s.length-1],"c"+s.join(",")}return""}).replace(/z/g,"e")},jvm.VMLCircleElement=function(t,e){jvm.VMLCircleElement.parentClass.call(this,"oval",t,e)},jvm.inherits(jvm.VMLCircleElement,jvm.VMLShapeElement),jvm.VMLCircleElement.prototype.applyAttr=function(t,e){switch(t){case"r":this.node.style.width=2*e+"px",this.node.style.height=2*e+"px",this.applyAttr("cx",this.get("cx")||0),this.applyAttr("cy",this.get("cy")||0);break;case"cx":if(!e)return;this.node.style.left=e-(this.get("r")||0)+"px";break;case"cy":if(!e)return;this.node.style.top=e-(this.get("r")||0)+"px";break;default:jvm.VMLCircleElement.parentClass.prototype.applyAttr.call(this,t,e)}},jvm.VectorCanvas=function(t,e,i){return this.mode=window.SVGAngle?"svg":"vml",this.impl="svg"==this.mode?new jvm.SVGCanvasElement(t,e,i):new jvm.VMLCanvasElement(t,e,i),this.impl.mode=this.mode,this.impl},jvm.SimpleScale=function(t){this.scale=t},jvm.SimpleScale.prototype.getValue=function(t){return t},jvm.OrdinalScale=function(t){this.scale=t},jvm.OrdinalScale.prototype.getValue=function(t){return this.scale[t]},jvm.OrdinalScale.prototype.getTicks=function(){var t,e=[];for(t in this.scale)e.push({label:t,value:this.scale[t]});return e},jvm.NumericScale=function(t,e,i,n){this.scale=[],e=e||"linear",t&&this.setScale(t),e&&this.setNormalizeFunction(e),"undefined"!=typeof i&&this.setMin(i),"undefined"!=typeof n&&this.setMin(n)},jvm.NumericScale.prototype={setMin:function(t){this.clearMinValue=t,this.minValue="function"==typeof this.normalize?this.normalize(t):t},setMax:function(t){this.clearMaxValue=t,this.maxValue="function"==typeof this.normalize?this.normalize(t):t},setScale:function(t){var e;for(this.scale=[],e=0;e<t.length;e++)this.scale[e]=[t[e]]},setNormalizeFunction:function(t){"polynomial"===t?this.normalize=function(t){return Math.pow(t,.2)}:"linear"===t?delete this.normalize:this.normalize=t,this.setMin(this.clearMinValue),this.setMax(this.clearMaxValue)},getValue:function(t){var e,i,n=[],r=0,o=0;for("function"==typeof this.normalize&&(t=this.normalize(t)),o=0;o<this.scale.length-1;o++)e=this.vectorLength(this.vectorSubtract(this.scale[o+1],this.scale[o])),n.push(e),r+=e;for(i=(this.maxValue-this.minValue)/r,o=0;o<n.length;o++)n[o]*=i;for(o=0,t-=this.minValue;t-n[o]>=0;)t-=n[o],o++;return t=this.vectorToNum(o==this.scale.length-1?this.scale[o]:this.vectorAdd(this.scale[o],this.vectorMult(this.vectorSubtract(this.scale[o+1],this.scale[o]),t/n[o])))},vectorToNum:function(t){var e,i=0;for(e=0;e<t.length;e++)i+=Math.round(t[e])*Math.pow(256,t.length-e-1);return i},vectorSubtract:function(t,e){var i,n=[];for(i=0;i<t.length;i++)n[i]=t[i]-e[i];return n},vectorAdd:function(t,e){var i,n=[];for(i=0;i<t.length;i++)n[i]=t[i]+e[i];return n},vectorMult:function(t,e){var i,n=[];for(i=0;i<t.length;i++)n[i]=t[i]*e;return n},vectorLength:function(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e]*t[e];return Math.sqrt(i)},getTicks:function(){var t,e,i=5,n=[this.clearMinValue,this.clearMaxValue],r=n[1]-n[0],o=Math.pow(10,Math.floor(Math.log(r/i)/Math.LN10)),s=i/r*o,a=[];for(.15>=s?o*=10:.35>=s?o*=5:.75>=s&&(o*=2),n[0]=Math.floor(n[0]/o)*o,n[1]=Math.ceil(n[1]/o)*o,t=n[0];t<=n[1];)e=t==n[0]?this.clearMinValue:t==n[1]?this.clearMaxValue:t,a.push({label:t,value:this.getValue(e)}),t+=o;return a}},jvm.ColorScale=function(){jvm.ColorScale.parentClass.apply(this,arguments)},jvm.inherits(jvm.ColorScale,jvm.NumericScale),jvm.ColorScale.prototype.setScale=function(t){var e;for(e=0;e<t.length;e++)this.scale[e]=jvm.ColorScale.rgbToArray(t[e])},jvm.ColorScale.prototype.getValue=function(t){return jvm.ColorScale.numToRgb(jvm.ColorScale.parentClass.prototype.getValue.call(this,t))},jvm.ColorScale.arrayToRgb=function(t){var e,i,n="#";for(i=0;i<t.length;i++)e=t[i].toString(16),n+=1==e.length?"0"+e:e;return n},jvm.ColorScale.numToRgb=function(t){for(t=t.toString(16);t.length<6;)t="0"+t;return"#"+t},jvm.ColorScale.rgbToArray=function(t){return t=t.substr(1),[parseInt(t.substr(0,2),16),parseInt(t.substr(2,2),16),parseInt(t.substr(4,2),16)]},jvm.Legend=function(t){this.params=t||{},this.map=this.params.map,this.series=this.params.series,this.body=jvm.$("<div/>"),this.body.addClass("jvectormap-legend"),this.params.cssClass&&this.body.addClass(this.params.cssClass),t.vertical?this.map.legendCntVertical.append(this.body):this.map.legendCntHorizontal.append(this.body),this.render()},jvm.Legend.prototype.render=function(){var t,e,i,n,r=this.series.scale.getTicks(),o=jvm.$("<div/>").addClass("jvectormap-legend-inner");for(this.body.html(""),this.params.title&&this.body.append(jvm.$("<div/>").addClass("jvectormap-legend-title").html(this.params.title)),this.body.append(o),t=0;t<r.length;t++){switch(e=jvm.$("<div/>").addClass("jvectormap-legend-tick"),i=jvm.$("<div/>").addClass("jvectormap-legend-tick-sample"),this.series.params.attribute){case"fill":jvm.isImageUrl(r[t].value)?i.css("background","url("+r[t].value+")"):i.css("background",r[t].value);break;case"stroke":i.css("background",r[t].value);break;case"image":i.css("background","url("+r[t].value+") no-repeat center center");break;case"r":jvm.$("<div/>").css({"border-radius":r[t].value,border:this.map.params.markerStyle.initial["stroke-width"]+"px "+this.map.params.markerStyle.initial.stroke+" solid",width:2*r[t].value+"px",height:2*r[t].value+"px",background:this.map.params.markerStyle.initial.fill}).appendTo(i)}e.append(i),n=r[t].label,this.params.labelRender&&(n=this.params.labelRender(n)),e.append(jvm.$("<div>"+n+" </div>").addClass("jvectormap-legend-tick-text")),o.append(e)}o.append(jvm.$("<div/>").css("clear","both"))},jvm.DataSeries=function(t,e,i){var n;t=t||{},t.attribute=t.attribute||"fill",this.elements=e,this.params=t,this.map=i,t.attributes&&this.setAttributes(t.attributes),jvm.$.isArray(t.scale)?(n="fill"===t.attribute||"stroke"===t.attribute?jvm.ColorScale:jvm.NumericScale,this.scale=new n(t.scale,t.normalizeFunction,t.min,t.max)):this.scale=t.scale?new jvm.OrdinalScale(t.scale):new jvm.SimpleScale(t.scale),this.values=t.values||{},this.setValues(this.values),this.params.legend&&(this.legend=new jvm.Legend($.extend({map:this.map,series:this},this.params.legend)))},jvm.DataSeries.prototype={setAttributes:function(t,e){var i,n=t;if("string"==typeof t)this.elements[t]&&this.elements[t].setStyle(this.params.attribute,e);else for(i in n)this.elements[i]&&this.elements[i].element.setStyle(this.params.attribute,n[i])},setValues:function(t){var e,i,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,o={};if(this.scale instanceof jvm.OrdinalScale||this.scale instanceof jvm.SimpleScale)for(i in t)o[i]=t[i]?this.scale.getValue(t[i]):this.elements[i].element.style.initial[this.params.attribute];else{if("undefined"==typeof this.params.min||"undefined"==typeof this.params.max)for(i in t)e=parseFloat(t[i]),e>n&&(n=e),r>e&&(r=e);"undefined"==typeof this.params.min?(this.scale.setMin(r),this.params.min=r):this.scale.setMin(this.params.min),"undefined"==typeof this.params.max?(this.scale.setMax(n),this.params.max=n):this.scale.setMax(this.params.max);for(i in t)"indexOf"!=i&&(e=parseFloat(t[i]),o[i]=isNaN(e)?this.elements[i].element.style.initial[this.params.attribute]:this.scale.getValue(e))}this.setAttributes(o),jvm.$.extend(this.values,t)},clear:function(){var t,e={};for(t in this.values)this.elements[t]&&(e[t]=this.elements[t].element.shape.style.initial[this.params.attribute]);this.setAttributes(e),this.values={}},setScale:function(t){this.scale.setScale(t),this.values&&this.setValues(this.values)},setNormalizeFunction:function(t){this.scale.setNormalizeFunction(t),this.values&&this.setValues(this.values)}},jvm.Proj={degRad:180/Math.PI,radDeg:Math.PI/180,radius:6381372,sgn:function(t){return t>0?1:0>t?-1:t},mill:function(t,e,i){return{x:this.radius*(e-i)*this.radDeg,y:-this.radius*Math.log(Math.tan((45+.4*t)*this.radDeg))/.8}},mill_inv:function(t,e,i){return{lat:(2.5*Math.atan(Math.exp(.8*e/this.radius))-5*Math.PI/8)*this.degRad,lng:(i*this.radDeg+t/this.radius)*this.degRad}},merc:function(t,e,i){return{x:this.radius*(e-i)*this.radDeg,y:-this.radius*Math.log(Math.tan(Math.PI/4+t*Math.PI/360))}},merc_inv:function(t,e,i){return{lat:(2*Math.atan(Math.exp(e/this.radius))-Math.PI/2)*this.degRad,lng:(i*this.radDeg+t/this.radius)*this.degRad}},aea:function(t,e,i){var n=0,r=i*this.radDeg,o=29.5*this.radDeg,s=45.5*this.radDeg,a=t*this.radDeg,l=e*this.radDeg,h=(Math.sin(o)+Math.sin(s))/2,c=Math.cos(o)*Math.cos(o)+2*h*Math.sin(o),u=h*(l-r),d=Math.sqrt(c-2*h*Math.sin(a))/h,p=Math.sqrt(c-2*h*Math.sin(n))/h;return{x:d*Math.sin(u)*this.radius,y:-(p-d*Math.cos(u))*this.radius}},aea_inv:function(t,e,i){var n=t/this.radius,r=e/this.radius,o=0,s=i*this.radDeg,a=29.5*this.radDeg,l=45.5*this.radDeg,h=(Math.sin(a)+Math.sin(l))/2,c=Math.cos(a)*Math.cos(a)+2*h*Math.sin(a),u=Math.sqrt(c-2*h*Math.sin(o))/h,d=Math.sqrt(n*n+(u-r)*(u-r)),p=Math.atan(n/(u-r));return{lat:Math.asin((c-d*d*h*h)/(2*h))*this.degRad,lng:(s+p/h)*this.degRad}},lcc:function(t,e,i){var n=0,r=i*this.radDeg,o=e*this.radDeg,s=33*this.radDeg,a=45*this.radDeg,l=t*this.radDeg,h=Math.log(Math.cos(s)*(1/Math.cos(a)))/Math.log(Math.tan(Math.PI/4+a/2)*(1/Math.tan(Math.PI/4+s/2))),c=Math.cos(s)*Math.pow(Math.tan(Math.PI/4+s/2),h)/h,u=c*Math.pow(1/Math.tan(Math.PI/4+l/2),h),d=c*Math.pow(1/Math.tan(Math.PI/4+n/2),h);return{x:u*Math.sin(h*(o-r))*this.radius,y:-(d-u*Math.cos(h*(o-r)))*this.radius}},lcc_inv:function(t,e,i){var n=t/this.radius,r=e/this.radius,o=0,s=i*this.radDeg,a=33*this.radDeg,l=45*this.radDeg,h=Math.log(Math.cos(a)*(1/Math.cos(l)))/Math.log(Math.tan(Math.PI/4+l/2)*(1/Math.tan(Math.PI/4+a/2))),c=Math.cos(a)*Math.pow(Math.tan(Math.PI/4+a/2),h)/h,u=c*Math.pow(1/Math.tan(Math.PI/4+o/2),h),d=this.sgn(h)*Math.sqrt(n*n+(u-r)*(u-r)),p=Math.atan(n/(u-r));return{lat:(2*Math.atan(Math.pow(c/d,1/h))-Math.PI/2)*this.degRad,lng:(s+p/h)*this.degRad}}},jvm.MapObject=function(){},jvm.MapObject.prototype.getLabelText=function(t){var e;return e=this.config.label?"function"==typeof this.config.label.render?this.config.label.render(t):t:null},jvm.MapObject.prototype.getLabelOffsets=function(t){var e;return this.config.label&&("function"==typeof this.config.label.offsets?e=this.config.label.offsets(t):"object"==typeof this.config.label.offsets&&(e=this.config.label.offsets[t])),e||[0,0]},jvm.MapObject.prototype.setHovered=function(t){this.isHovered!==t&&(this.isHovered=t,this.shape.isHovered=t,this.shape.updateStyle(),this.label&&(this.label.isHovered=t,this.label.updateStyle()))},jvm.MapObject.prototype.setSelected=function(t){this.isSelected!==t&&(this.isSelected=t,this.shape.isSelected=t,this.shape.updateStyle(),this.label&&(this.label.isSelected=t,this.label.updateStyle()),jvm.$(this.shape).trigger("selected",[t]))},jvm.MapObject.prototype.setStyle=function(){this.shape.setStyle.apply(this.shape,arguments)},jvm.MapObject.prototype.remove=function(){this.shape.remove(),this.label&&this.label.remove()},jvm.Region=function(t){var e,i,n;this.config=t,this.map=this.config.map,this.shape=t.canvas.addPath({d:t.path,"data-code":t.code},t.style,t.canvas.rootElement),this.shape.addClass("jvectormap-region jvectormap-element"),e=this.shape.getBBox(),i=this.getLabelText(t.code),this.config.label&&i&&(n=this.getLabelOffsets(t.code),this.labelX=e.x+e.width/2+n[0],this.labelY=e.y+e.height/2+n[1],this.label=t.canvas.addText({text:i,"text-anchor":"middle","alignment-baseline":"central",x:this.labelX,y:this.labelY,"data-code":t.code},t.labelStyle,t.labelsGroup),this.label.addClass("jvectormap-region jvectormap-element"))},jvm.inherits(jvm.Region,jvm.MapObject),jvm.Region.prototype.updateLabelPosition=function(){this.label&&this.label.set({x:this.labelX*this.map.scale+this.map.transX*this.map.scale,y:this.labelY*this.map.scale+this.map.transY*this.map.scale})},jvm.Marker=function(t){var e,i;this.config=t,this.map=this.config.map,this.isImage=!!this.config.style.initial.image,this.createShape(),e=this.getLabelText(t.index),this.config.label&&e&&(i=this.getLabelOffsets(t.code),this.labelX=(t.cx+i[0])/this.map.scale-this.map.transX,this.labelY=(t.cy+i[1])/this.map.scale-this.map.transY,console.log(this.labelX,this.labelY),this.label=t.canvas.addText({text:e,"data-index":t.index,dy:"0.6ex",x:this.labelX,y:this.labelY},t.labelStyle,t.labelsGroup),this.label.addClass("jvectormap-marker jvectormap-element"))},jvm.inherits(jvm.Marker,jvm.MapObject),jvm.Marker.prototype.createShape=function(){var t=this;this.shape&&this.shape.remove(),this.shape=this.config.canvas[this.isImage?"addImage":"addCircle"]({"data-index":this.config.index,cx:this.config.cx,cy:this.config.cy},this.config.style,this.config.group),this.shape.addClass("jvectormap-marker jvectormap-element"),this.isImage&&jvm.$(this.shape.node).on("imageloaded",function(){t.updateLabelPosition()})},jvm.Marker.prototype.updateLabelPosition=function(){this.label&&this.label.set({x:this.labelX*this.map.scale+this.map.transX*this.map.scale+5+(this.isImage?(this.shape.width||0)/2:this.shape.properties.r),y:this.labelY*this.map.scale+this.map.transY*this.map.scale})},jvm.Marker.prototype.setStyle=function(t){var e;jvm.Marker.parentClass.prototype.setStyle.apply(this,arguments),"r"===t&&this.updateLabelPosition(),e=!!this.shape.get("image"),e!=this.isImage&&(this.isImage=e,this.config.style=jvm.$.extend(!0,{},this.shape.style),this.createShape())},jvm.Map=function(t){var e,i=this;if(this.params=jvm.$.extend(!0,{},jvm.Map.defaultParams,t),!jvm.Map.maps[this.params.map])throw new Error("Attempt to use map which was not loaded: "+this.params.map);this.mapData=jvm.Map.maps[this.params.map],this.markers={},this.regions={},this.regionsColors={},this.regionsData={},this.container=jvm.$("<div>").addClass("jvectormap-container"),this.params.container&&this.params.container.append(this.container),this.container.data("mapObject",this),this.defaultWidth=this.mapData.width,this.defaultHeight=this.mapData.height,this.setBackgroundColor(this.params.backgroundColor),this.onResize=function(){i.updateSize()},jvm.$(window).resize(this.onResize);for(e in jvm.Map.apiEvents)this.params[e]&&this.container.bind(jvm.Map.apiEvents[e]+".jvectormap",this.params[e]);this.canvas=new jvm.VectorCanvas(this.container[0],this.width,this.height),("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&this.params.bindTouchEvents&&this.bindContainerTouchEvents(),this.bindContainerEvents(),this.bindElementEvents(),this.createTip(),this.params.zoomButtons&&this.bindZoomButtons(),this.createRegions(),this.createMarkers(this.params.markers||{}),this.updateSize(),this.params.focusOn&&("string"==typeof this.params.focusOn?this.params.focusOn={region:this.params.focusOn}:jvm.$.isArray(this.params.focusOn)&&(this.params.focusOn={regions:this.params.focusOn}),this.setFocus(this.params.focusOn)),this.params.selectedRegions&&this.setSelectedRegions(this.params.selectedRegions),this.params.selectedMarkers&&this.setSelectedMarkers(this.params.selectedMarkers),this.legendCntHorizontal=jvm.$("<div/>").addClass("jvectormap-legend-cnt jvectormap-legend-cnt-h"),this.legendCntVertical=jvm.$("<div/>").addClass("jvectormap-legend-cnt jvectormap-legend-cnt-v"),this.container.append(this.legendCntHorizontal),this.container.append(this.legendCntVertical),this.params.series&&this.createSeries()},jvm.Map.prototype={transX:0,transY:0,scale:1,baseTransX:0,baseTransY:0,baseScale:1,width:0,height:0,setBackgroundColor:function(t){this.container.css("background-color",t)},resize:function(){var t=this.baseScale;this.width/this.height>this.defaultWidth/this.defaultHeight?(this.baseScale=this.height/this.defaultHeight,this.baseTransX=Math.abs(this.width-this.defaultWidth*this.baseScale)/(2*this.baseScale)):(this.baseScale=this.width/this.defaultWidth,this.baseTransY=Math.abs(this.height-this.defaultHeight*this.baseScale)/(2*this.baseScale)),this.scale*=this.baseScale/t,this.transX*=this.baseScale/t,this.transY*=this.baseScale/t},updateSize:function(){this.width=this.container.width(),this.height=this.container.height(),this.resize(),this.canvas.setSize(this.width,this.height),this.applyTransform()},reset:function(){var t,e;for(t in this.series)for(e=0;e<this.series[t].length;e++)this.series[t][e].clear();this.scale=this.baseScale,this.transX=this.baseTransX,this.transY=this.baseTransY,this.applyTransform()},applyTransform:function(){var t,e,i,n;this.defaultWidth*this.scale<=this.width?(t=(this.width-this.defaultWidth*this.scale)/(2*this.scale),i=(this.width-this.defaultWidth*this.scale)/(2*this.scale)):(t=0,i=(this.width-this.defaultWidth*this.scale)/this.scale),this.defaultHeight*this.scale<=this.height?(e=(this.height-this.defaultHeight*this.scale)/(2*this.scale),n=(this.height-this.defaultHeight*this.scale)/(2*this.scale)):(e=0,n=(this.height-this.defaultHeight*this.scale)/this.scale),this.transY>e?this.transY=e:this.transY<n&&(this.transY=n),this.transX>t?this.transX=t:this.transX<i&&(this.transX=i),this.canvas.applyTransformParams(this.scale,this.transX,this.transY),this.markers&&this.repositionMarkers(),this.repositionLabels(),this.container.trigger("viewportChange",[this.scale/this.baseScale,this.transX,this.transY])},bindContainerEvents:function(){var t,e,i=!1,n=this;this.params.panOnDrag&&(this.container.mousemove(function(r){return i&&(n.transX-=(t-r.pageX)/n.scale,n.transY-=(e-r.pageY)/n.scale,n.applyTransform(),t=r.pageX,e=r.pageY),!1}).mousedown(function(n){return i=!0,t=n.pageX,e=n.pageY,!1}),this.onContainerMouseUp=function(){i=!1},jvm.$("body").mouseup(this.onContainerMouseUp)),this.params.zoomOnScroll&&this.container.mousewheel(function(t){var e=jvm.$(n.container).offset(),i=t.pageX-e.left,r=t.pageY-e.top,o=Math.pow(1.003,t.deltaY);n.tip.hide(),n.setScale(n.scale*o,i,r),t.preventDefault()})},bindContainerTouchEvents:function(){var t,e,i,n,r,o,s,a=this,l=function(l){var h,c,u,d,p=l.originalEvent.touches;"touchstart"==l.type&&(s=0),1==p.length?(1==s&&(u=a.transX,d=a.transY,a.transX-=(i-p[0].pageX)/a.scale,a.transY-=(n-p[0].pageY)/a.scale,a.applyTransform(),a.tip.hide(),(u!=a.transX||d!=a.transY)&&l.preventDefault()),i=p[0].pageX,n=p[0].pageY):2==p.length&&(2==s?(c=Math.sqrt(Math.pow(p[0].pageX-p[1].pageX,2)+Math.pow(p[0].pageY-p[1].pageY,2))/e,a.setScale(t*c,r,o),a.tip.hide(),l.preventDefault()):(h=jvm.$(a.container).offset(),r=p[0].pageX>p[1].pageX?p[1].pageX+(p[0].pageX-p[1].pageX)/2:p[0].pageX+(p[1].pageX-p[0].pageX)/2,o=p[0].pageY>p[1].pageY?p[1].pageY+(p[0].pageY-p[1].pageY)/2:p[0].pageY+(p[1].pageY-p[0].pageY)/2,r-=h.left,o-=h.top,t=a.scale,e=Math.sqrt(Math.pow(p[0].pageX-p[1].pageX,2)+Math.pow(p[0].pageY-p[1].pageY,2)))),s=p.length};jvm.$(this.container).bind("touchstart",l),jvm.$(this.container).bind("touchmove",l)},bindElementEvents:function(){var t,e=this;this.container.mousemove(function(){t=!0}),this.container.delegate("[class~='jvectormap-element']","mouseover mouseout",function(t){var i=jvm.$(this).attr("class").baseVal||jvm.$(this).attr("class"),n=-1===i.indexOf("jvectormap-region")?"marker":"region",r=jvm.$(this).attr("region"==n?"data-code":"data-index"),o="region"==n?e.regions[r].element:e.markers[r].element,s="region"==n?e.mapData.paths[r].name:e.markers[r].config.name||"",a=jvm.$.Event(n+"TipShow.jvectormap"),l=jvm.$.Event(n+"Over.jvectormap");"mouseover"==t.type?(e.container.trigger(l,[r]),l.isDefaultPrevented()||o.setHovered(!0),e.tip.text(s),e.container.trigger(a,[e.tip,r]),a.isDefaultPrevented()||(e.tip.show(),e.tipWidth=e.tip.width(),e.tipHeight=e.tip.height())):(o.setHovered(!1),e.tip.hide(),e.container.trigger(n+"Out.jvectormap",[r]))}),this.container.delegate("[class~='jvectormap-element']","mousedown",function(){t=!1}),this.container.delegate("[class~='jvectormap-element']","mouseup",function(){var i=jvm.$(this).attr("class").baseVal?jvm.$(this).attr("class").baseVal:jvm.$(this).attr("class"),n=-1===i.indexOf("jvectormap-region")?"marker":"region",r=jvm.$(this).attr("region"==n?"data-code":"data-index"),o=jvm.$.Event(n+"Click.jvectormap"),s="region"==n?e.regions[r].element:e.markers[r].element;t||(e.container.trigger(o,[r]),("region"===n&&e.params.regionsSelectable||"marker"===n&&e.params.markersSelectable)&&(o.isDefaultPrevented()||(e.params[n+"sSelectableOne"]&&e.clearSelected(n+"s"),s.setSelected(!s.isSelected))))})},bindZoomButtons:function(){var t=this;jvm.$("<div/>").addClass("jvectormap-zoomin").text("+").appendTo(this.container),jvm.$("<div/>").addClass("jvectormap-zoomout").html("&#x2212;").appendTo(this.container),this.container.find(".jvectormap-zoomin").click(function(){t.setScale(t.scale*t.params.zoomStep,t.width/2,t.height/2,!1,t.params.zoomAnimate)}),this.container.find(".jvectormap-zoomout").click(function(){t.setScale(t.scale/t.params.zoomStep,t.width/2,t.height/2,!1,t.params.zoomAnimate)})},createTip:function(){var t=this;this.tip=jvm.$("<div/>").addClass("jvectormap-tip").appendTo(jvm.$("body")),this.container.mousemove(function(e){var i=e.pageX-15-t.tipWidth,n=e.pageY-15-t.tipHeight;5>i&&(i=e.pageX+15),5>n&&(n=e.pageY+15),t.tip.is(":visible")&&t.tip.css({left:i,top:n})})},setScale:function(t,e,i,n,r){var o,s,a,l,h,c,u,d,p,f=jvm.$.Event("zoom.jvectormap"),m=this,g=0,v=Math.abs(Math.round(60*(t-this.scale)/Math.max(t,this.scale))),y=new jvm.$.Deferred;return t>this.params.zoomMax*this.baseScale?t=this.params.zoomMax*this.baseScale:t<this.params.zoomMin*this.baseScale&&(t=this.params.zoomMin*this.baseScale),"undefined"!=typeof e&&"undefined"!=typeof i&&(zoomStep=t/this.scale,n?(d=e+this.defaultWidth*(this.width/(this.defaultWidth*t))/2,p=i+this.defaultHeight*(this.height/(this.defaultHeight*t))/2):(d=this.transX-(zoomStep-1)/t*e,p=this.transY-(zoomStep-1)/t*i)),r&&v>0?(s=this.scale,a=(t-s)/v,l=this.transX*this.scale,c=this.transY*this.scale,h=(d*t-l)/v,u=(p*t-c)/v,o=setInterval(function(){g+=1,m.scale=s+a*g,m.transX=(l+h*g)/m.scale,m.transY=(c+u*g)/m.scale,m.applyTransform(),g==v&&(clearInterval(o),m.container.trigger(f,[t/m.baseScale]),y.resolve())},10)):(this.transX=d,this.transY=p,this.scale=t,this.applyTransform(),this.container.trigger(f,[t/this.baseScale]),y.resolve()),y},setFocus:function(t){var e,i,n,r,o,s;if(t=t||{},t.region?r=[t.region]:t.regions&&(r=t.regions),r){for(o=0;o<r.length;o++)this.regions[r[o]]&&(i=this.regions[r[o]].element.shape.getBBox(),i&&("undefined"==typeof e?e=i:(n={x:Math.min(e.x,i.x),y:Math.min(e.y,i.y),width:Math.max(e.x+e.width,i.x+i.width)-Math.min(e.x,i.x),height:Math.max(e.y+e.height,i.y+i.height)-Math.min(e.y,i.y)},e=n)));return this.setScale(Math.min(this.width/e.width,this.height/e.height),-(e.x+e.width/2),-(e.y+e.height/2),!0,t.animate)}return t.lat&&t.lng?(s=this.latLngToPoint(t.lat,t.lng),t.x=this.transX-s.x/this.scale,t.y=this.transY-s.y/this.scale,console.log(t.x,t.y)):t.x&&t.y&&(t.x*=-this.defaultWidth,t.y*=-this.defaultHeight),this.setScale(t.scale*this.baseScale,t.x,t.y,!0,t.animate)},getSelected:function(t){var e,i=[];for(e in this[t])this[t][e].element.isSelected&&i.push(e);return i},getSelectedRegions:function(){return this.getSelected("regions")},getSelectedMarkers:function(){return this.getSelected("markers")},setSelected:function(t,e){var i;if("object"!=typeof e&&(e=[e]),jvm.$.isArray(e))for(i=0;i<e.length;i++)this[t][e[i]].element.setSelected(!0);else for(i in e)this[t][i].element.setSelected(!!e[i])},setSelectedRegions:function(t){this.setSelected("regions",t)},setSelectedMarkers:function(t){this.setSelected("markers",t)},clearSelected:function(t){var e,i={},n=this.getSelected(t);for(e=0;e<n.length;e++)i[n[e]]=!1;this.setSelected(t,i)},clearSelectedRegions:function(){this.clearSelected("regions")},clearSelectedMarkers:function(){this.clearSelected("markers")},getMapObject:function(){return this},getRegionName:function(t){return this.mapData.paths[t].name},createRegions:function(){var t,e,i=this;this.regionLabelsGroup=this.regionLabelsGroup||this.canvas.addGroup();for(t in this.mapData.paths)e=new jvm.Region({map:this,path:this.mapData.paths[t].path,code:t,style:jvm.$.extend(!0,{},this.params.regionStyle),labelStyle:jvm.$.extend(!0,{},this.params.regionLabelStyle),canvas:this.canvas,labelsGroup:this.regionLabelsGroup,label:"vml"!=this.canvas.mode?this.params.labels&&this.params.labels.regions:null}),jvm.$(e.shape).bind("selected",function(t,e){i.container.trigger("regionSelected.jvectormap",[jvm.$(this.node).attr("data-code"),e,i.getSelectedRegions()])}),this.regions[t]={element:e,config:this.mapData.paths[t]}},createMarkers:function(t){var e,i,n,r,o,s=this;if(this.markersGroup=this.markersGroup||this.canvas.addGroup(),this.markerLabelsGroup=this.markerLabelsGroup||this.canvas.addGroup(),jvm.$.isArray(t))for(o=t.slice(),t={},e=0;e<o.length;e++)t[e]=o[e];for(e in t)r=t[e]instanceof Array?{latLng:t[e]}:t[e],n=this.getMarkerPosition(r),n!==!1&&(i=new jvm.Marker({map:this,style:jvm.$.extend(!0,{},this.params.markerStyle,{initial:r.style||{}}),labelStyle:jvm.$.extend(!0,{},this.params.markerLabelStyle),index:e,cx:n.x,cy:n.y,group:this.markersGroup,canvas:this.canvas,labelsGroup:this.markerLabelsGroup,label:"vml"!=this.canvas.mode?this.params.labels&&this.params.labels.markers:null}),jvm.$(i.shape).bind("selected",function(t,e){s.container.trigger("markerSelected.jvectormap",[jvm.$(this.node).attr("data-index"),e,s.getSelectedMarkers()])}),this.markers[e]&&this.removeMarkers([e]),this.markers[e]={element:i,config:r})
  18. },repositionMarkers:function(){var t,e;for(t in this.markers)e=this.getMarkerPosition(this.markers[t].config),e!==!1&&this.markers[t].element.setStyle({cx:e.x,cy:e.y})},repositionLabels:function(){var t;for(t in this.regions)this.regions[t].element.updateLabelPosition();for(t in this.markers)this.markers[t].element.updateLabelPosition()},getMarkerPosition:function(t){return jvm.Map.maps[this.params.map].projection?this.latLngToPoint.apply(this,t.latLng||[0,0]):{x:t.coords[0]*this.scale+this.transX*this.scale,y:t.coords[1]*this.scale+this.transY*this.scale}},addMarker:function(t,e,i){var n,r,o={},s=[],i=i||[];for(o[t]=e,r=0;r<i.length;r++)n={},n[t]=i[r],s.push(n);this.addMarkers(o,s)},addMarkers:function(t,e){var i;for(e=e||[],this.createMarkers(t),i=0;i<e.length;i++)this.series.markers[i].setValues(e[i]||{})},removeMarkers:function(t){var e;for(e=0;e<t.length;e++)this.markers[t[e]].element.remove(),delete this.markers[t[e]]},removeAllMarkers:function(){var t,e=[];for(t in this.markers)e.push(t);this.removeMarkers(e)},latLngToPoint:function(t,e){var i,n,r,o=jvm.Map.maps[this.params.map].projection,s=o.centralMeridian;return-180+s>e&&(e+=360),i=jvm.Proj[o.type](t,e,s),n=this.getInsetForPoint(i.x,i.y),n?(r=n.bbox,i.x=(i.x-r[0].x)/(r[1].x-r[0].x)*n.width*this.scale,i.y=(i.y-r[0].y)/(r[1].y-r[0].y)*n.height*this.scale,{x:i.x+this.transX*this.scale+n.left*this.scale,y:i.y+this.transY*this.scale+n.top*this.scale}):!1},pointToLatLng:function(t,e){var i,n,r,o,s,a=jvm.Map.maps[this.params.map].projection,l=a.centralMeridian,h=jvm.Map.maps[this.params.map].insets;for(i=0;i<h.length;i++)if(n=h[i],r=n.bbox,o=t-(this.transX*this.scale+n.left*this.scale),s=e-(this.transY*this.scale+n.top*this.scale),o=o/(n.width*this.scale)*(r[1].x-r[0].x)+r[0].x,s=s/(n.height*this.scale)*(r[1].y-r[0].y)+r[0].y,o>r[0].x&&o<r[1].x&&s>r[0].y&&s<r[1].y)return jvm.Proj[a.type+"_inv"](o,-s,l);return!1},getInsetForPoint:function(t,e){var i,n,r=jvm.Map.maps[this.params.map].insets;for(i=0;i<r.length;i++)if(n=r[i].bbox,t>n[0].x&&t<n[1].x&&e>n[0].y&&e<n[1].y)return r[i]},createSeries:function(){var t,e;this.series={markers:[],regions:[]};for(e in this.params.series)for(t=0;t<this.params.series[e].length;t++)this.series[e][t]=new jvm.DataSeries(this.params.series[e][t],this[e],this)},remove:function(){this.tip.remove(),this.container.remove(),jvm.$(window).unbind("resize",this.onResize),jvm.$("body").unbind("mouseup",this.onContainerMouseUp)}},jvm.Map.maps={},jvm.Map.defaultParams={map:"world_mill_en",backgroundColor:"#505050",zoomButtons:!0,zoomOnScroll:!0,panOnDrag:!0,zoomMax:8,zoomMin:1,zoomStep:1.6,zoomAnimate:!0,regionsSelectable:!1,markersSelectable:!1,bindTouchEvents:!0,regionStyle:{initial:{fill:"white","fill-opacity":1,stroke:"none","stroke-width":0,"stroke-opacity":1},hover:{"fill-opacity":.8,cursor:"pointer"},selected:{fill:"yellow"},selectedHover:{}},regionLabelStyle:{initial:{"font-family":"Verdana","font-size":"12","font-weight":"bold",cursor:"default",fill:"black"},hover:{cursor:"pointer"}},markerStyle:{initial:{fill:"grey",stroke:"#505050","fill-opacity":1,"stroke-width":1,"stroke-opacity":1,r:5},hover:{stroke:"black","stroke-width":2,cursor:"pointer"},selected:{fill:"blue"},selectedHover:{}},markerLabelStyle:{initial:{"font-family":"Verdana","font-size":"12","font-weight":"bold",cursor:"default",fill:"black"},hover:{cursor:"pointer"}}},jvm.Map.apiEvents={onRegionTipShow:"regionTipShow",onRegionOver:"regionOver",onRegionOut:"regionOut",onRegionClick:"regionClick",onRegionSelected:"regionSelected",onMarkerTipShow:"markerTipShow",onMarkerOver:"markerOver",onMarkerOut:"markerOut",onMarkerClick:"markerClick",onMarkerSelected:"markerSelected",onViewportChange:"viewportChange"},jQuery.fn.vectorMap("addMap","world_mill_en",{insets:[{width:900,top:0,height:440.70631074413296,bbox:[{y:-12671671.123330014,x:-20004297.151525836},{y:6930392.02513512,x:20026572.39474939}],left:0}],paths:{BD:{path:"M651.84,230.21l-0.6,-2.0l-1.36,-1.71l-2.31,-0.11l-0.41,0.48l0.2,0.94l-0.53,0.99l-0.72,-0.36l-0.68,0.35l-1.2,-0.36l-0.37,-2.0l-0.81,-1.86l0.39,-1.46l-0.22,-0.47l-1.14,-0.53l0.29,-0.5l1.48,-0.94l0.03,-0.65l-1.55,-1.22l0.55,-1.14l1.61,0.94l1.04,0.15l0.18,1.54l0.34,0.35l5.64,0.63l-0.84,1.64l-1.22,0.34l-0.77,1.51l0.07,0.47l1.37,1.37l0.67,-0.19l0.42,-1.39l1.21,3.84l-0.03,1.21l-0.33,-0.15l-0.4,0.28Z",name:"Bangladesh"},BE:{path:"M429.29,144.05l1.91,0.24l2.1,-0.63l2.63,1.99l-0.21,1.66l-0.69,0.4l-0.18,1.2l-1.66,-1.13l-1.39,0.15l-2.73,-2.7l-1.17,-0.18l-0.16,-0.52l1.54,-0.5Z",name:"Belgium"},BF:{path:"M421.42,247.64l-0.11,0.95l0.34,1.16l1.4,1.71l0.07,1.1l0.32,0.37l2.55,0.51l-0.04,1.28l-0.38,0.53l-1.07,0.21l-0.72,1.18l-0.63,0.21l-3.22,-0.25l-0.94,0.39l-5.4,-0.05l-0.39,0.38l0.16,2.73l-1.23,-0.43l-1.17,0.1l-0.89,0.57l-2.27,-1.72l-0.13,-1.11l0.61,-0.96l0.02,-0.93l1.87,-1.98l0.44,-1.81l0.43,-0.39l1.28,0.26l1.05,-0.52l0.47,-0.73l1.84,-1.09l0.55,-0.83l2.2,-1.0l1.15,-0.3l0.72,0.45l1.13,-0.01Z",name:"Burkina Faso"},BG:{path:"M491.65,168.18l-0.86,0.88l-0.91,2.17l0.48,1.34l-1.6,-0.24l-2.55,0.95l-0.28,1.51l-1.8,0.22l-2.0,-1.0l-1.92,0.79l-1.42,-0.07l-0.15,-1.63l-1.05,-0.97l0.0,-0.8l1.2,-1.57l0.01,-0.56l-1.14,-1.23l-0.05,-0.94l0.88,0.97l0.88,-0.2l1.91,0.47l3.68,0.16l1.42,-0.81l2.72,-0.66l2.55,1.24Z",name:"Bulgaria"},BA:{path:"M463.49,163.65l2.1,0.5l1.72,-0.03l1.52,0.68l-0.36,0.78l0.08,0.45l1.04,1.02l-0.25,0.98l-1.81,1.15l-0.38,1.38l-1.67,-0.87l-0.89,-1.2l-2.11,-1.83l-1.63,-2.22l0.23,-0.57l0.48,0.38l0.55,-0.06l0.43,-0.51l0.94,-0.06Z",name:"Bosnia and Herz."},BN:{path:"M707.48,273.58l0.68,-0.65l1.41,-0.91l-0.15,1.63l-0.81,-0.05l-0.61,0.58l-0.53,-0.6Z",name:"Brunei"},BO:{path:"M263.83,340.69l-3.09,-0.23l-0.38,0.23l-0.7,1.52l-1.31,-1.53l-3.28,-0.64l-2.37,2.4l-1.31,0.26l-0.88,-3.26l-1.3,-2.86l0.74,-2.37l-0.13,-0.43l-1.2,-1.01l-0.37,-1.89l-1.08,-1.55l1.45,-2.56l-0.96,-2.33l0.47,-1.06l-0.34,-0.73l0.91,-1.32l0.16,-3.84l0.5,-1.18l-1.81,-3.41l2.46,0.07l0.8,-0.85l3.4,-1.91l2.66,-0.35l-0.19,1.38l0.3,1.07l-0.05,1.97l2.72,2.27l2.88,0.49l0.89,0.86l1.79,0.58l0.98,0.7l1.71,0.05l1.17,0.61l0.6,2.7l-0.7,0.54l0.96,2.99l0.37,0.28l4.3,0.1l-0.25,1.2l0.27,1.02l1.43,0.9l0.5,1.35l-0.41,1.86l-0.65,1.08l0.12,1.35l-2.69,-1.65l-2.4,-0.03l-4.36,0.76l-1.49,2.5l-0.11,1.52l-0.75,2.37Z",name:"Bolivia"},JP:{path:"M781.12,166.87l1.81,0.68l1.62,-0.97l0.39,2.42l-3.35,0.75l-2.23,2.88l-3.63,-1.9l-0.56,0.2l-1.26,3.05l-2.16,0.03l-0.29,-2.51l1.08,-2.03l2.45,-0.16l0.37,-0.33l1.25,-5.94l2.47,2.71l2.03,1.12ZM773.56,187.34l-0.91,2.22l0.37,1.52l-1.14,1.75l-3.02,1.26l-4.58,0.27l-3.34,3.01l-1.25,-0.8l-0.09,-1.9l-0.46,-0.38l-4.35,0.62l-3.0,1.32l-2.85,0.05l-0.37,0.27l0.13,0.44l2.32,1.89l-1.54,4.34l-1.26,0.9l-0.79,-0.7l0.56,-2.27l-0.21,-0.45l-1.47,-0.75l-0.74,-1.4l2.12,-0.84l1.26,-1.7l2.45,-1.42l1.83,-1.91l4.78,-0.81l2.6,0.57l0.44,-0.21l2.39,-4.66l1.29,1.06l0.5,0.01l5.1,-4.02l1.69,-3.73l-0.38,-3.4l0.9,-1.61l2.14,-0.44l1.23,3.72l-0.07,2.18l-2.23,2.84l-0.04,3.16ZM757.78,196.26l0.19,0.56l-1.01,1.21l-1.16,-0.68l-1.28,0.65l-0.69,1.45l-1.02,-0.5l0.01,-0.93l1.14,-1.38l1.57,0.14l0.85,-0.98l1.4,0.46Z",name:"Japan"},BI:{path:"M495.45,295.49l-1.08,-2.99l1.14,-0.11l0.64,-1.19l0.76,0.09l0.65,1.83l-2.1,2.36Z",name:"Burundi"},BJ:{path:"M429.57,255.75l-0.05,0.8l0.5,1.34l-0.42,0.86l0.17,0.79l-1.81,2.12l-0.57,1.76l-0.08,5.42l-1.41,0.2l-0.48,-1.36l0.11,-5.71l-0.52,-0.7l-0.2,-1.35l-1.48,-1.48l0.21,-0.9l0.89,-0.43l0.42,-0.92l1.27,-0.36l1.22,-1.34l0.61,-0.0l1.62,1.24Z",name:"Benin"},BT:{path:"M650.32,213.86l0.84,0.71l-0.12,1.1l-3.76,-0.11l-1.57,0.4l-1.93,-0.87l1.48,-1.96l1.13,-0.57l1.63,0.57l1.33,0.08l0.99,0.65Z",name:"Bhutan"},JM:{path:"M228.38,239.28l-0.8,0.4l-2.26,-1.06l0.84,-0.23l2.14,0.3l1.17,0.56l-1.08,0.03Z",name:"Jamaica"},BW:{path:"M483.92,330.07l2.27,4.01l2.83,2.86l0.96,0.31l0.78,2.43l2.13,0.61l1.02,0.76l-3.0,1.64l-2.32,2.02l-1.54,2.69l-1.52,0.45l-0.64,1.94l-1.34,0.52l-1.85,-0.12l-1.21,-0.74l-1.35,-0.3l-1.22,0.62l-0.75,1.37l-2.31,1.9l-1.4,0.21l-0.35,-0.59l0.16,-1.75l-1.48,-2.54l-0.62,-0.43l-0.0,-7.1l2.08,-0.08l0.39,-0.4l0.07,-8.9l5.19,-0.93l0.8,0.89l0.51,0.07l1.5,-0.95l2.21,-0.49Z",name:"Botswana"},BR:{path:"M259.98,275.05l3.24,0.7l0.65,-0.53l4.55,-1.32l1.08,-1.06l-0.02,-0.63l0.55,-0.05l0.28,0.28l-0.26,0.87l0.22,0.48l0.73,0.32l0.4,0.81l-0.62,0.86l-0.4,2.13l0.82,2.56l1.69,1.43l1.43,0.2l3.17,-1.68l3.18,0.3l0.65,-0.75l-0.27,-0.92l1.9,-0.09l2.39,0.99l1.06,-0.61l0.84,0.78l1.2,-0.18l1.18,-1.06l0.84,-1.94l1.36,-2.11l0.37,-0.05l1.89,5.45l1.33,0.59l0.05,1.28l-1.77,1.94l0.02,0.56l1.02,0.87l4.07,0.36l0.08,2.16l0.66,0.29l1.74,-1.5l6.97,2.32l1.02,1.22l-0.35,1.18l0.49,0.5l2.81,-0.74l4.77,1.3l3.75,-0.08l3.57,2.0l3.29,2.86l1.93,0.72l2.12,0.12l0.71,0.62l1.21,4.51l-0.95,3.98l-4.72,5.06l-1.64,2.92l-1.72,2.05l-0.8,0.3l-0.72,2.03l0.18,4.75l-0.94,5.53l-0.81,1.13l-0.43,3.36l-2.55,3.5l-0.4,2.51l-1.86,1.04l-0.67,1.53l-2.54,0.01l-3.94,1.01l-1.83,1.2l-2.87,0.82l-3.03,2.19l-2.2,2.83l-0.36,2.0l0.4,1.58l-0.44,2.6l-0.51,1.2l-1.77,1.54l-2.75,4.78l-3.83,3.42l-1.24,2.74l-1.18,1.15l-0.36,-0.83l0.95,-1.14l0.01,-0.5l-1.52,-1.97l-4.56,-3.32l-1.03,-0.0l-2.38,-2.02l-0.81,-0.0l5.34,-5.45l3.77,-2.58l0.22,-2.46l-1.35,-1.81l-0.91,0.07l0.58,-2.33l0.01,-1.54l-1.11,-0.83l-1.75,0.3l-0.44,-3.11l-0.52,-0.95l-1.88,-0.88l-1.24,0.47l-2.17,-0.41l0.15,-3.21l-0.62,-1.34l0.66,-0.73l-0.22,-1.34l0.66,-1.13l0.44,-2.04l-0.61,-1.83l-1.4,-0.86l-0.2,-0.75l0.34,-1.39l-0.38,-0.5l-4.52,-0.1l-0.72,-2.22l0.59,-0.42l-0.03,-1.1l-0.5,-0.87l-0.32,-1.7l-1.45,-0.76l-1.63,-0.02l-1.05,-0.72l-1.6,-0.48l-1.13,-0.99l-2.69,-0.4l-2.47,-2.06l0.13,-4.35l-0.45,-0.45l-3.46,0.5l-3.44,1.94l-0.6,0.74l-2.9,-0.17l-1.47,0.42l-0.72,-0.18l0.15,-3.52l-0.63,-0.34l-1.94,1.41l-1.87,-0.06l-0.83,-1.18l-1.37,-0.26l0.21,-1.01l-1.35,-1.49l-0.88,-1.91l0.56,-0.6l-0.0,-0.81l1.29,-0.62l0.22,-0.43l-0.22,-1.19l0.61,-0.91l0.15,-0.99l2.65,-1.58l1.99,-0.47l0.42,-0.36l2.06,0.11l0.42,-0.33l1.19,-8.0l-0.41,-1.56l-1.1,-1.0l0.01,-1.33l1.91,-0.42l0.08,-0.96l-0.33,-0.43l-1.14,-0.2l-0.02,-0.83l4.47,0.05l0.82,-0.67l0.82,1.81l0.8,0.07l1.15,1.1l2.26,-0.05l0.71,-0.83l2.78,-0.96l0.48,-1.13l1.6,-0.64l0.24,-0.47l-0.48,-0.82l-1.83,-0.19l-0.36,-3.22Z",name:"Brazil"},BS:{path:"M226.4,223.87l-0.48,-1.15l-0.84,-0.75l0.36,-1.11l0.95,1.95l0.01,1.06ZM225.56,216.43l-1.87,0.29l-0.04,-0.22l0.74,-0.14l1.17,0.06Z",name:"Bahamas"},BY:{path:"M493.84,128.32l0.29,0.7l0.49,0.23l1.19,-0.38l2.09,0.72l0.19,1.26l-0.45,1.24l1.57,2.26l0.89,0.59l0.17,0.81l1.58,0.56l0.4,0.5l-0.53,0.41l-1.87,-0.11l-0.73,0.38l-0.13,0.52l1.04,2.74l-1.91,0.26l-0.89,0.99l-0.11,1.18l-2.73,-0.04l-0.53,-0.62l-0.52,-0.08l-0.75,0.46l-0.91,-0.42l-1.92,-0.07l-2.75,-0.79l-2.6,-0.28l-2.0,0.07l-1.5,0.92l-0.67,0.07l-0.08,-1.22l-0.59,-1.19l1.36,-0.88l0.01,-1.35l-0.7,-1.41l-0.07,-1.0l2.16,-0.02l2.72,-1.3l0.75,-2.04l1.91,-1.04l0.2,-0.41l-0.19,-1.25l3.8,-1.78l2.3,0.77Z",name:"Belarus"},BZ:{path:"M198.03,244.38l0.1,-4.49l0.69,-0.06l0.74,-1.3l0.34,0.28l-0.4,1.3l0.17,0.58l-0.34,2.25l-1.3,1.42Z",name:"Belize"},RU:{path:"M491.55,115.25l2.55,-1.85l-0.01,-0.65l-2.2,-1.5l7.32,-6.76l1.03,-2.11l-0.13,-0.49l-3.46,-2.52l0.86,-2.7l-2.11,-2.81l1.56,-3.67l-2.77,-4.52l2.15,-2.99l-0.08,-0.55l-3.65,-2.73l0.3,-2.54l1.81,-0.37l4.26,-1.77l2.42,-1.45l4.06,2.61l6.79,1.04l9.34,4.85l1.78,1.88l0.14,2.46l-2.55,2.02l-3.9,1.06l-11.07,-3.14l-2.06,0.53l-0.13,0.7l3.94,2.94l0.31,5.86l0.26,0.36l5.14,2.24l0.58,-0.29l0.32,-1.94l-1.35,-1.78l1.13,-1.09l6.13,2.42l2.11,-0.98l0.18,-0.56l-1.51,-2.67l5.41,-3.76l2.07,0.22l2.26,1.41l0.57,-0.16l1.46,-2.87l-0.05,-0.44l-1.92,-2.32l1.12,-2.32l-1.32,-2.27l5.87,1.16l1.04,1.75l-2.59,0.43l-0.33,0.4l0.02,2.36l2.46,1.83l3.87,-0.91l0.86,-2.8l13.69,-5.65l0.99,0.11l-1.92,2.06l0.23,0.67l3.11,0.45l2.0,-1.48l4.56,-0.12l3.64,-1.73l2.65,2.44l0.56,-0.01l2.85,-2.88l-0.01,-0.57l-2.35,-2.29l0.9,-1.01l7.14,1.3l3.41,1.36l9.05,4.97l0.51,-0.11l1.67,-2.27l-0.05,-0.53l-2.43,-2.21l-0.06,-0.78l-0.34,-0.36l-2.52,-0.36l0.64,-1.93l-1.32,-3.46l-0.06,-1.21l4.48,-4.06l1.69,-4.29l1.6,-0.81l6.23,1.18l0.44,2.21l-2.29,3.64l0.06,0.5l1.47,1.39l0.76,3.0l-0.56,6.03l2.69,2.82l-0.96,2.57l-4.86,5.95l0.23,0.64l2.86,0.61l0.42,-0.17l0.93,-1.4l2.64,-1.03l0.87,-2.24l2.09,-1.96l0.07,-0.5l-1.36,-2.28l1.09,-2.69l-0.32,-0.55l-2.47,-0.33l-0.5,-2.06l1.94,-4.38l-0.06,-0.42l-2.96,-3.4l4.12,-2.88l0.16,-0.4l-0.51,-2.93l0.54,-0.05l1.13,2.25l-0.96,4.35l0.27,0.47l2.68,0.84l0.5,-0.51l-1.02,-2.99l3.79,-1.66l5.01,-0.24l4.53,2.61l0.48,-0.06l0.07,-0.48l-2.18,-3.82l-0.23,-4.67l3.98,-0.9l5.97,0.21l5.49,-0.64l0.27,-0.65l-1.83,-2.31l2.56,-2.9l2.87,-0.17l4.8,-2.47l6.54,-0.67l1.03,-1.42l6.25,-0.45l2.32,1.11l5.53,-2.7l4.5,0.08l0.39,-0.28l0.66,-2.15l2.26,-2.12l5.69,-2.11l3.21,1.29l-2.46,0.94l-0.25,0.42l0.34,0.35l5.41,0.77l0.61,2.33l0.58,0.25l2.2,-1.22l7.13,0.07l5.51,2.47l1.79,1.72l-0.53,2.24l-9.16,4.15l-1.97,1.52l0.16,0.71l6.77,1.91l2.16,-0.78l1.13,2.74l0.67,0.11l1.01,-1.15l3.81,-0.73l7.7,0.77l0.54,1.99l0.36,0.29l10.47,0.71l0.43,-0.38l0.13,-3.23l4.87,0.78l3.95,-0.02l3.83,2.4l1.03,2.71l-1.35,1.79l0.02,0.5l3.15,3.64l4.07,1.96l0.53,-0.18l2.23,-4.47l3.95,1.93l4.16,-1.21l4.73,1.39l2.05,-1.26l3.94,0.62l0.43,-0.55l-1.68,-4.02l2.89,-1.8l22.31,3.03l2.16,2.75l6.55,3.51l10.29,-0.81l4.82,0.73l1.85,1.66l-0.29,3.08l0.25,0.41l3.08,1.26l3.56,-0.88l4.35,-0.11l4.8,0.87l4.57,-0.47l4.23,3.79l0.43,0.07l3.1,-1.4l0.16,-0.6l-1.88,-2.62l0.85,-1.52l7.71,1.21l5.22,-0.26l7.09,2.09l9.59,5.22l6.35,4.11l-0.2,2.38l1.88,1.41l0.6,-0.42l-0.48,-2.53l6.15,0.57l4.4,3.51l-1.97,1.43l-4.0,0.41l-0.36,0.39l-0.06,3.79l-0.74,0.62l-2.07,-0.11l-1.91,-1.39l-3.14,-1.11l-0.78,-1.85l-2.72,-0.68l-2.63,0.49l-1.04,-1.1l0.46,-1.31l-0.5,-0.51l-3.0,0.98l-0.22,0.58l0.99,1.7l-1.21,1.48l-3.04,1.68l-3.12,-0.28l-0.4,0.23l0.09,0.46l2.2,2.09l1.46,3.2l1.15,1.1l0.24,1.33l-0.42,0.67l-4.63,-0.77l-6.96,2.9l-2.19,0.44l-7.6,5.06l-0.84,1.45l-3.61,-2.37l-6.24,2.82l-0.94,-1.15l-0.53,-0.08l-2.28,1.52l-3.2,-0.49l-0.44,0.27l-0.78,2.37l-3.05,3.78l0.09,1.47l0.29,0.36l2.54,0.72l-0.29,4.53l-1.97,0.11l-0.35,0.26l-1.07,2.94l0.8,1.45l-3.91,1.58l-1.05,3.95l-3.48,0.77l-0.3,0.3l-0.72,3.29l-3.09,2.65l-0.7,-1.74l-2.44,-12.44l1.16,-4.71l2.04,-2.06l0.22,-1.64l3.8,-0.86l4.46,-4.61l4.28,-3.81l4.48,-3.01l2.17,-5.63l-0.42,-0.54l-3.04,0.33l-1.77,3.31l-5.86,3.86l-1.86,-4.25l-0.45,-0.23l-6.46,1.3l-6.47,6.44l-0.01,0.55l1.58,1.74l-8.24,1.17l0.15,-2.2l-0.34,-0.42l-3.89,-0.56l-3.25,1.81l-7.62,-0.62l-8.45,1.19l-17.71,15.41l0.22,0.7l3.74,0.41l1.36,2.17l2.43,0.76l1.88,-1.68l2.4,0.2l3.4,3.54l0.08,2.6l-1.95,3.42l-0.21,3.9l-1.1,5.06l-3.71,4.54l-0.87,2.21l-8.29,8.89l-3.19,1.7l-1.32,0.03l-1.45,-1.36l-0.49,-0.04l-2.27,1.5l0.41,-3.65l-0.59,-2.47l1.75,-0.89l2.91,0.53l0.42,-0.2l1.68,-3.03l0.87,-3.46l0.97,-1.18l1.32,-2.88l-0.45,-0.56l-4.14,0.95l-2.19,1.25l-3.41,-0.0l-1.06,-2.93l-2.97,-2.3l-4.28,-1.06l-1.75,-5.07l-2.66,-5.01l-2.29,-1.29l-3.75,-1.01l-3.44,0.08l-3.18,0.62l-2.24,1.77l0.05,0.66l1.18,0.69l0.02,1.43l-1.33,1.05l-2.26,3.51l-0.04,1.43l-3.16,1.84l-2.82,-1.16l-3.01,0.23l-1.35,-1.07l-1.5,-0.35l-3.9,2.31l-3.22,0.52l-2.27,0.79l-3.05,-0.51l-2.21,0.03l-1.48,-1.6l-2.6,-1.63l-2.63,-0.43l-5.46,1.01l-3.23,-1.25l-0.72,-2.57l-5.2,-1.24l-2.75,-1.36l-0.5,0.12l-2.59,3.45l0.84,2.1l-2.06,1.93l-3.41,-0.77l-2.42,-0.12l-1.83,-1.54l-2.53,-0.05l-2.42,-0.98l-3.86,1.57l-4.72,2.78l-3.3,0.75l-1.55,-1.92l-3.0,0.41l-1.11,-1.33l-1.62,-0.59l-1.31,-1.94l-1.38,-0.6l-3.7,0.79l-3.31,-1.83l-0.51,0.11l-0.99,1.29l-5.29,-8.05l-2.96,-2.48l0.65,-0.77l0.01,-0.51l-0.5,-0.11l-6.2,3.21l-1.84,0.15l0.15,-1.39l-0.26,-0.42l-3.22,-1.17l-2.46,0.7l-0.69,-3.16l-0.32,-0.31l-4.5,-0.75l-2.47,1.47l-6.19,1.27l-1.29,0.86l-9.51,1.3l-1.15,1.17l-0.03,0.53l1.47,1.9l-1.89,0.69l-0.22,0.56l0.31,0.6l-2.11,1.44l0.03,0.68l3.75,2.12l-0.39,0.98l-3.23,-0.13l-0.86,0.86l-3.09,-1.59l-3.97,0.07l-2.66,1.35l-8.32,-3.56l-4.07,0.06l-5.39,3.68l-0.39,2.0l-2.03,-1.5l-0.59,0.13l-2.0,3.59l0.57,0.93l-1.28,2.16l0.06,0.48l2.13,2.17l1.95,0.04l1.37,1.82l-0.23,1.46l0.25,0.43l0.83,0.33l-0.8,1.31l-2.49,0.62l-2.49,3.2l0.0,0.49l2.17,2.78l-0.15,2.18l2.5,3.24l-1.58,1.59l-0.7,-0.13l-1.63,-1.72l-2.29,-0.84l-0.94,-1.31l-2.34,-0.63l-1.48,0.4l-0.43,-0.47l-3.51,-1.48l-5.76,-1.01l-0.45,0.19l-2.89,-2.34l-2.9,-1.2l-1.53,-1.29l1.29,-0.43l2.08,-2.61l-0.05,-0.55l-0.89,-0.79l3.05,-1.06l0.27,-0.42l-0.07,-0.69l-0.49,-0.35l-1.73,0.39l0.04,-0.68l1.04,-0.72l2.66,-0.48l0.4,-1.32l-0.5,-1.6l0.92,-1.54l0.03,-1.17l-0.29,-0.37l-3.69,-1.06l-1.41,0.02l-1.42,-1.41l-2.19,0.38l-2.77,-1.01l-0.03,-0.59l-0.89,-1.43l-2.0,-0.32l-0.11,-0.54l0.49,-0.53l0.01,-0.53l-1.6,-1.9l-3.58,0.02l-0.88,0.73l-0.46,-0.07l-1.0,-2.79l2.22,-0.02l0.97,-0.74l0.07,-0.57l-0.9,-1.04l-1.35,-0.48l-0.11,-0.7l-0.95,-0.58l-1.38,-1.99l0.46,-0.98l-0.51,-1.96l-2.45,-0.84l-1.21,0.3l-0.46,-0.76l-2.46,-0.83l-0.72,-1.87l-0.21,-1.69l-0.99,-0.85l0.85,-1.17l-0.7,-3.21l1.66,-1.97l-0.16,-0.79ZM749.2,170.72l-0.6,0.4l-0.13,0.16l-0.01,-0.51l0.74,-0.05ZM874.85,67.94l-5.63,0.48l-0.26,-0.84l3.15,-1.89l1.94,0.01l3.19,1.16l-2.39,1.09ZM797.39,48.49l-2.0,1.36l-3.8,-0.42l-4.25,-1.8l0.35,-0.97l9.69,1.83ZM783.67,46.12l-1.63,3.09l-8.98,-0.13l-4.09,1.14l-4.54,-2.97l1.16,-3.01l3.05,-0.89l6.5,0.22l8.54,2.56ZM778.2,134.98l-0.56,-0.9l0.27,-0.12l0.29,1.01ZM778.34,135.48l0.94,3.53l-0.05,3.38l1.05,3.39l2.18,5.0l-2.89,-0.83l-0.49,0.26l-1.54,4.65l2.42,3.5l-0.04,1.13l-1.24,-1.24l-0.61,0.06l-1.09,1.61l-0.28,-1.61l0.27,-3.1l-0.28,-3.4l0.58,-2.47l0.11,-4.39l-1.46,-3.36l0.21,-4.32l2.15,-1.46l0.07,-0.34ZM771.95,56.61l1.76,-1.42l2.89,-0.42l3.28,1.71l0.14,0.6l-3.27,0.03l-4.81,-0.5ZM683.76,31.09l-13.01,1.93l4.03,-6.35l1.82,-0.56l1.73,0.34l5.99,2.98l-0.56,1.66ZM670.85,27.93l-5.08,0.64l-6.86,-1.57l-3.99,-2.05l-2.1,-4.16l-2.6,-0.87l5.72,-3.5l5.2,-1.28l4.69,2.85l5.59,5.4l-0.56,4.53ZM564.15,68.94l-0.64,0.17l-7.85,-0.57l-0.86,-2.04l-4.28,-1.17l-0.28,-1.94l2.27,-0.89l0.25,-0.39l-0.08,-2.38l4.81,-3.97l-0.15,-0.7l-1.47,-0.38l5.3,-3.81l0.15,-0.44l-0.58,-1.94l5.28,-2.51l8.21,-3.27l8.28,-0.96l4.35,-1.94l4.6,-0.64l1.36,1.61l-1.34,1.28l-16.43,4.94l-7.97,4.88l-7.74,9.63l0.66,4.14l4.16,3.27ZM548.81,18.48l-5.5,1.18l-0.58,1.02l-2.59,0.84l-2.13,-1.07l1.12,-1.42l-0.3,-0.65l-2.33,-0.07l1.68,-0.36l3.47,-0.06l0.42,1.29l0.66,0.16l1.38,-1.34l2.15,-0.88l2.94,1.01l-0.39,0.36ZM477.37,133.15l-4.08,0.05l-2.56,-0.32l0.33,-0.87l3.17,-1.03l3.24,0.96l-0.09,1.23Z",name:"Russia"},RW:{path:"M497.0,288.25l0.71,1.01l-0.11,1.09l-1.63,0.03l-1.04,1.39l-0.83,-0.11l0.51,-1.2l0.08,-1.34l0.42,-0.41l0.7,0.14l1.19,-0.61Z",name:"Rwanda"},RS:{path:"M469.4,163.99l0.42,-0.5l-0.01,-0.52l-1.15,-1.63l1.43,-0.62l1.33,0.12l1.17,1.06l0.46,1.13l1.34,0.64l0.35,1.35l1.46,0.9l0.76,-0.29l0.2,0.69l-0.48,0.78l0.22,1.12l1.05,1.22l-0.77,0.8l-0.37,1.52l-1.21,0.08l0.24,-0.64l-0.39,-0.54l-2.08,-1.64l-0.9,0.05l-0.48,0.94l-2.12,-1.37l0.53,-1.6l-1.11,-1.37l0.51,-1.1l-0.41,-0.57Z",name:"Serbia"},LT:{path:"M486.93,129.3l0.17,1.12l-1.81,0.98l-0.72,2.02l-2.47,1.18l-2.1,-0.02l-0.73,-1.05l-1.06,-0.3l-0.09,-1.87l-3.56,-1.13l-0.43,-2.36l2.48,-0.94l4.12,0.22l2.25,-0.31l0.52,0.69l1.24,0.21l2.19,1.56Z",name:"Lithuania"},LU:{path:"M436.08,149.45l-0.48,-0.07l0.3,-1.28l0.27,0.4l-0.09,0.96Z",name:"Luxembourg"},LR:{path:"M399.36,265.97l0.18,1.54l-0.48,0.99l0.08,0.47l2.47,1.8l-0.33,2.8l-2.65,-1.13l-5.78,-4.61l0.58,-1.32l2.1,-2.33l0.86,-0.22l0.77,1.14l-0.14,0.85l0.59,0.87l1.0,0.14l0.76,-0.99Z",name:"Liberia"},RO:{path:"M487.53,154.23l0.6,0.24l2.87,3.98l-0.17,2.69l0.45,1.42l1.32,0.81l1.35,-0.42l0.76,0.36l0.02,0.31l-0.83,0.45l-0.59,-0.22l-0.54,0.3l-0.62,3.3l-1.0,-0.22l-2.07,-1.13l-2.95,0.71l-1.25,0.76l-3.51,-0.15l-1.89,-0.47l-0.87,0.16l-0.82,-1.3l0.29,-0.26l-0.06,-0.64l-1.09,-0.34l-0.56,0.5l-1.05,-0.64l-0.39,-1.39l-1.36,-0.65l-0.35,-1.0l-0.83,-0.75l1.54,-0.54l2.66,-4.21l2.4,-1.24l2.96,0.34l1.48,0.73l0.79,-0.45l1.78,-0.3l0.75,-0.74l0.79,0.0Z",name:"Romania"},GW:{path:"M386.23,253.6l-0.29,0.84l0.15,0.6l-2.21,0.59l-0.86,0.96l-1.04,-0.83l-1.09,-0.23l-0.54,-1.06l-0.66,-0.49l2.41,-0.48l4.13,0.1Z",name:"Guinea-Bissau"},GT:{path:"M195.08,249.77l-2.48,-0.37l-1.03,-0.45l-1.14,-0.89l0.3,-0.99l-0.24,-0.68l0.96,-1.66l2.98,-0.01l0.4,-0.37l-0.19,-1.28l-1.67,-1.4l0.51,-0.4l0.0,-1.05l3.85,0.02l-0.21,4.53l0.4,0.43l1.46,0.38l-1.48,0.98l-0.35,0.7l0.12,0.57l-2.2,1.96Z",name:"Guatemala"},GR:{path:"M487.07,174.59l-0.59,1.43l-0.37,0.21l-2.84,-0.35l-3.03,0.77l-0.18,0.68l1.28,1.23l-0.61,0.23l-1.14,0.0l-1.2,-1.39l-0.63,0.03l-0.53,1.01l0.56,1.76l1.03,1.19l-0.56,0.38l-0.05,0.62l2.52,2.12l0.02,0.87l-1.78,-0.59l-0.48,0.56l0.5,1.0l-1.07,0.2l-0.3,0.53l0.75,2.01l-0.98,0.02l-1.84,-1.12l-1.37,-4.2l-2.21,-2.95l-0.11,-0.56l1.04,-1.28l0.2,-0.95l0.85,-0.66l0.03,-0.46l1.32,-0.21l1.01,-0.64l1.22,0.05l0.65,-0.56l2.26,-0.0l1.82,-0.75l1.85,1.0l2.28,-0.28l0.35,-0.39l0.01,-0.77l0.34,0.22ZM480.49,192.16l0.58,0.4l-0.68,-0.12l0.11,-0.28ZM482.52,192.82l2.51,0.06l0.24,0.32l-1.99,0.13l-0.77,-0.51Z",name:"Greece"},GQ:{path:"M448.79,279.62l0.02,2.22l-4.09,0.0l0.69,-2.27l3.38,0.05Z",name:"Eq. Guinea"},GY:{path:"M277.42,270.07l-0.32,1.83l-1.32,0.57l-0.23,0.46l-0.28,2.0l1.11,1.82l0.83,0.19l0.32,1.25l1.13,1.62l-1.21,-0.19l-1.08,0.71l-1.77,0.5l-0.44,0.46l-0.86,-0.09l-1.32,-1.01l-0.77,-2.27l0.36,-1.9l0.68,-1.23l-0.57,-1.17l-0.74,-0.43l0.12,-1.16l-0.9,-0.69l-1.1,0.09l-1.31,-1.48l0.53,-0.72l-0.04,-0.84l1.99,-0.86l0.05,-0.59l-0.71,-0.78l0.14,-0.57l1.66,-1.24l1.36,0.77l1.41,1.49l0.06,1.15l0.37,0.38l0.8,0.05l2.06,1.86Z",name:"Guyana"},GE:{path:"M521.71,168.93l5.29,0.89l4.07,2.01l1.41,-0.44l2.07,0.56l0.68,1.1l1.07,0.55l-0.12,0.59l0.98,1.29l-1.01,-0.13l-1.81,-0.83l-0.94,0.47l-3.23,0.43l-2.29,-1.39l-2.33,0.05l0.21,-0.97l-0.76,-2.26l-1.45,-1.12l-1.43,-0.39l-0.41,-0.42Z",name:"Georgia"},GB:{path:"M412.61,118.72l-2.19,3.22l-0.0,0.45l5.13,-0.3l-0.53,2.37l-2.2,3.12l0.29,0.63l2.37,0.21l2.33,4.3l1.76,0.69l2.2,5.12l2.94,0.77l-0.23,1.62l-1.15,0.88l-0.1,0.52l0.82,1.42l-1.86,1.43l-3.3,-0.02l-4.12,0.87l-1.04,-0.58l-0.47,0.06l-1.51,1.41l-2.12,-0.34l-1.86,1.18l-0.6,-0.29l3.19,-3.0l2.16,-0.69l0.28,-0.41l-0.34,-0.36l-3.73,-0.53l-0.4,-0.76l2.2,-0.87l0.17,-0.61l-1.26,-1.67l0.36,-1.7l3.38,0.28l0.43,-0.33l0.37,-1.99l-1.79,-2.49l-3.11,-0.72l-0.38,-0.59l0.79,-1.35l-0.04,-0.46l-0.82,-0.97l-0.61,0.01l-0.68,0.84l-0.1,-2.34l-1.23,-1.88l0.85,-3.47l1.77,-2.68l1.85,0.26l2.17,-0.22ZM406.26,132.86l-1.01,1.77l-1.57,-0.59l-1.16,0.01l0.37,-1.54l-0.39,-1.39l1.45,-0.1l2.3,1.84Z",name:"United Kingdom"},GA:{path:"M453.24,279.52l-0.08,0.98l0.7,1.29l2.36,0.24l-0.98,2.63l1.18,1.79l0.25,1.78l-0.29,1.52l-0.6,0.93l-1.84,-0.09l-1.23,-1.11l-0.66,0.23l-0.15,0.84l-1.42,0.26l-1.02,0.7l-0.11,0.52l0.77,1.35l-1.34,0.97l-3.94,-4.3l-1.44,-2.45l0.06,-0.6l0.54,-0.81l1.05,-3.46l4.17,-0.07l0.4,-0.4l-0.02,-2.66l2.39,0.21l1.25,-0.27Z",name:"Gabon"},GN:{path:"M391.8,254.11l0.47,0.8l1.11,-0.32l0.98,0.7l1.07,0.2l2.26,-1.22l0.64,0.44l1.13,1.56l-0.48,1.4l0.8,0.3l-0.08,0.48l0.46,0.68l-0.35,1.36l1.05,2.61l-1.0,0.69l0.03,1.41l-0.72,-0.06l-1.08,1.0l-0.24,-0.27l0.07,-1.11l-1.05,-1.54l-1.79,0.21l-0.35,-2.01l-1.6,-2.18l-2.0,-0.0l-1.31,0.54l-1.95,2.18l-1.86,-2.19l-1.2,-0.78l-0.3,-1.11l-0.8,-0.85l0.65,-0.72l0.81,-0.03l1.64,-0.8l0.23,-1.87l2.67,0.64l0.89,-0.3l1.21,0.15Z",name:"Guinea"},GM:{path:"M379.31,251.39l0.1,-0.35l2.43,-0.07l0.74,-0.61l0.51,-0.03l0.77,0.49l-1.03,-0.3l-1.87,0.9l-1.65,-0.04ZM384.03,250.91l0.91,0.05l0.75,-0.24l-0.59,0.31l-1.08,-0.13Z",name:"Gambia"},GL:{path:"M353.02,1.2l14.69,4.67l-3.68,1.89l-22.97,0.86l-0.36,0.27l0.12,0.43l1.55,1.18l8.79,-0.66l7.48,2.07l4.86,-1.77l1.66,1.73l-2.53,3.19l-0.01,0.48l0.46,0.15l6.35,-2.2l12.06,-2.31l7.24,1.13l1.09,1.99l-9.79,4.01l-1.44,1.32l-7.87,0.98l-0.35,0.41l0.38,0.38l5.07,0.24l-2.53,3.58l-2.07,3.81l0.08,6.05l2.57,3.11l-3.22,0.2l-4.12,1.66l-0.05,0.72l4.45,2.65l0.51,3.75l-2.3,0.4l-0.25,0.64l2.79,3.69l-4.82,0.31l-0.36,0.29l0.16,0.44l2.62,1.8l-0.59,1.22l-3.3,0.7l-3.45,0.01l-0.29,0.68l3.03,3.12l0.02,1.34l-4.4,-1.73l-1.72,1.35l0.15,0.66l3.31,1.15l3.13,2.71l0.81,3.16l-3.85,0.75l-4.89,-4.26l-0.47,-0.03l-0.17,0.44l0.79,2.86l-2.71,2.21l-0.13,0.44l0.37,0.27l8.73,0.34l-12.32,6.64l-7.24,1.48l-2.94,0.08l-2.69,1.75l-3.43,4.41l-5.24,2.84l-1.73,0.18l-7.12,2.1l-2.15,2.52l-0.13,2.99l-1.19,2.45l-4.01,3.09l-0.14,0.44l0.97,2.9l-2.28,6.48l-3.1,0.2l-3.83,-3.07l-4.86,-0.02l-2.25,-1.93l-1.7,-3.79l-4.3,-4.84l-1.21,-2.49l-0.44,-3.8l-3.32,-3.63l0.84,-2.86l-1.56,-1.7l2.28,-4.6l3.83,-1.74l1.03,-1.96l0.52,-3.47l-0.59,-0.41l-4.17,2.21l-2.07,0.58l-2.72,-1.28l-0.15,-2.71l0.85,-2.09l2.01,-0.06l5.06,1.2l0.46,-0.23l-0.14,-0.49l-6.54,-4.47l-2.67,0.55l-1.58,-0.86l2.56,-4.01l-0.03,-0.48l-1.5,-1.74l-4.98,-8.5l-3.13,-1.96l0.03,-1.88l-0.24,-0.37l-6.85,-3.02l-5.36,-0.38l-12.7,0.58l-2.78,-1.57l-3.66,-2.77l5.73,-1.45l5.0,-0.28l0.38,-0.38l-0.35,-0.41l-10.67,-1.38l-5.3,-2.06l0.25,-1.54l18.41,-5.26l1.22,-2.27l-0.25,-0.55l-6.14,-1.86l1.68,-1.77l8.55,-4.03l3.59,-0.63l0.3,-0.54l-0.88,-2.27l5.47,-1.47l7.65,-0.95l7.55,-0.05l3.04,1.85l6.48,-3.27l5.81,2.22l3.56,0.5l5.16,1.94l0.5,-0.21l-0.17,-0.52l-5.71,-3.13l0.28,-2.13l8.12,-3.6l8.7,0.28l3.35,-2.34l8.71,-0.6l19.93,0.8Z",name:"Greenland"},KW:{path:"M540.81,207.91l0.37,0.86l-0.17,0.76l0.6,1.53l-0.95,0.04l-0.82,-1.28l-1.57,-0.18l1.31,-1.88l1.22,0.17Z",name:"Kuwait"},GH:{path:"M420.53,257.51l-0.01,0.72l0.96,1.2l0.24,3.73l0.59,0.95l-0.51,2.1l0.19,1.41l1.02,2.21l-6.97,2.84l-1.8,-0.57l0.04,-0.89l-1.02,-2.04l0.61,-2.65l1.07,-2.32l-0.96,-6.47l5.01,0.07l0.94,-0.39l0.61,0.11Z",name:"Ghana"},OM:{path:"M568.09,230.93l-0.91,1.67l-1.22,0.04l-0.6,0.76l-0.41,1.51l0.27,1.58l-1.16,0.05l-1.56,0.97l-0.76,1.74l-1.62,0.05l-0.98,0.65l-0.17,1.15l-0.89,0.52l-1.49,-0.18l-2.4,0.94l-2.47,-5.4l7.35,-2.71l1.67,-5.23l-1.12,-2.09l0.05,-0.83l0.67,-1.0l0.07,-1.05l0.9,-0.42l-0.05,-2.07l0.7,-0.01l1.0,1.62l1.51,1.08l3.3,0.84l1.73,2.29l0.81,0.37l-1.23,2.35l-0.99,0.79Z",name:"Oman"},_1:{path:"M531.15,258.94l1.51,0.12l5.13,-0.95l5.3,-1.48l-0.01,4.4l-2.67,3.39l-1.85,0.01l-8.04,-2.94l-2.55,-3.17l1.12,-1.71l2.04,2.34Z",name:"Somaliland"},_0:{path:"M472.77,172.64l-1.08,-1.29l0.96,-0.77l0.29,-0.83l1.98,1.64l-0.36,0.67l-1.79,0.58Z",name:"Kosovo"},JO:{path:"M518.64,201.38l-5.14,1.56l-0.19,0.65l2.16,2.39l-0.89,1.14l-1.71,0.34l-1.71,1.8l-2.34,-0.37l1.21,-4.32l0.56,-4.07l2.8,0.94l4.46,-2.71l0.79,2.66Z",name:"Jordan"},HR:{path:"M455.59,162.84l1.09,0.07l-0.82,0.94l-0.27,-1.01ZM456.96,162.92l0.62,-0.41l1.73,0.45l0.42,-0.4l-0.01,-0.59l0.86,-0.52l0.2,-1.05l1.63,-0.68l2.57,1.68l2.07,0.6l0.87,-0.31l1.05,1.57l-0.52,0.63l-1.05,-0.56l-1.68,0.04l-2.1,-0.5l-1.29,0.06l-0.57,0.49l-0.59,-0.47l-0.62,0.16l-0.46,1.7l1.79,2.42l2.79,2.75l-1.18,-0.87l-2.21,-0.87l-1.67,-1.78l0.13,-0.63l-1.05,-1.19l-0.32,-1.27l-1.42,-0.43Z",name:"Croatia"},HT:{path:"M237.05,238.38l-1.16,0.43l-0.91,-0.55l0.05,-0.2l2.02,0.31ZM237.53,238.43l1.06,0.12l-0.05,0.01l-1.01,-0.12ZM239.25,238.45l0.79,-0.51l0.06,-0.62l-1.02,-1.0l0.02,-0.82l-0.3,-0.4l-0.93,-0.32l3.16,0.45l0.02,1.84l-0.48,0.34l-0.08,0.58l0.54,0.72l-1.78,-0.26Z",name:"Haiti"},HU:{path:"M462.08,157.89l0.65,-1.59l-0.09,-0.44l0.64,-0.0l0.39,-0.34l0.1,-0.69l1.75,0.87l2.32,-0.37l0.43,-0.66l3.49,-0.78l0.69,-0.78l0.57,-0.14l2.57,0.93l0.67,-0.23l1.03,0.65l0.08,0.37l-1.42,0.71l-2.59,4.14l-1.8,0.53l-1.68,-0.1l-2.74,1.23l-1.85,-0.54l-2.54,-1.66l-0.66,-1.1Z",name:"Hungary"},HN:{path:"M199.6,249.52l-1.7,-1.21l0.06,-0.94l3.04,-2.14l2.37,0.28l1.27,-0.09l1.1,-0.52l1.3,0.28l1.14,-0.25l1.38,0.37l2.23,1.37l-2.36,0.93l-1.23,-0.39l-0.88,1.3l-1.28,0.99l-0.98,-0.22l-0.42,0.52l-0.96,0.05l-0.36,0.41l0.04,0.88l-0.52,0.6l-0.3,0.04l-0.3,-0.55l-0.66,-0.31l0.11,-0.67l-0.48,-0.65l-0.87,-0.26l-0.73,0.2Z",name:"Honduras"},PR:{path:"M256.17,238.73l-0.26,0.27l-2.83,0.05l-0.07,-0.55l1.95,-0.1l1.22,0.33Z",name:"Puerto Rico"},PS:{path:"M509.21,203.07l0.1,-0.06l-0.02,0.03l-0.09,0.03ZM509.36,202.91l-0.02,-0.63l-0.33,-0.16l0.31,-1.09l0.24,0.1l-0.2,1.78Z",name:"Palestine"},PT:{path:"M401.84,187.38l-0.64,0.47l-1.13,-0.35l-0.91,0.17l0.28,-1.78l-0.24,-1.78l-1.25,-0.56l-0.45,-0.84l0.17,-1.66l1.01,-1.18l0.69,-2.92l-0.04,-1.39l-0.59,-1.9l1.3,-0.85l0.84,1.35l3.1,-0.3l0.46,0.99l-1.05,0.94l-0.03,2.16l-0.41,0.57l-0.08,1.1l-0.79,0.18l-0.26,0.59l0.91,1.6l-0.63,1.75l0.76,1.09l-1.1,1.52l0.07,1.05Z",name:"Portugal"},PY:{path:"M274.9,336.12l0.74,1.52l-0.16,3.45l0.32,0.41l2.64,0.5l1.11,-0.47l1.4,0.59l0.36,0.6l0.53,3.42l1.27,0.4l0.98,-0.38l0.51,0.27l-0.0,1.18l-1.21,5.32l-2.09,1.9l-1.8,0.4l-4.71,-0.98l2.2,-3.63l-0.32,-1.5l-2.78,-1.28l-3.03,-1.94l-2.07,-0.44l-4.34,-4.06l0.91,-2.9l0.08,-1.42l1.07,-2.04l4.13,-0.72l2.18,0.03l2.05,1.17l0.03,0.59Z",name:"Paraguay"},PA:{path:"M213.8,263.68l0.26,-1.52l-0.36,-0.26l-0.01,-0.49l0.44,-0.1l0.93,1.4l1.26,0.03l0.77,0.49l1.38,-0.23l2.51,-1.11l0.86,-0.72l3.45,0.85l1.4,1.18l0.41,1.74l-0.21,0.34l-0.53,-0.12l-0.47,0.29l-0.16,0.6l-0.68,-1.28l0.45,-0.49l-0.19,-0.66l-0.47,-0.13l-0.54,-0.84l-1.5,-0.75l-1.1,0.16l-0.75,0.99l-1.62,0.84l-0.18,0.96l0.85,0.97l-0.58,0.45l-0.69,0.08l-0.34,-1.18l-1.27,0.03l-0.71,-1.05l-2.59,-0.46Z",name:"Panama"},PG:{path:"M808.58,298.86l2.54,2.56l-0.13,0.26l-0.33,0.12l-0.87,-0.78l-1.22,-2.16ZM801.41,293.04l0.5,0.29l0.26,0.27l-0.49,-0.35l-0.27,-0.21ZM803.17,294.58l0.59,0.5l0.08,1.06l-0.29,-0.91l-0.38,-0.65ZM796.68,298.41l0.52,0.75l1.43,-0.19l2.27,-1.81l-0.01,-1.43l1.12,0.16l-0.04,1.1l-0.7,1.28l-1.12,0.18l-0.62,0.79l-2.46,1.11l-1.17,-0.0l-3.08,-1.25l3.41,0.0l0.45,-0.68ZM789.15,303.55l2.31,1.8l1.59,2.61l1.34,0.13l-0.06,0.66l0.31,0.43l1.06,0.24l0.06,0.65l2.25,1.05l-1.22,0.13l-0.72,-0.63l-4.56,-0.65l-3.22,-2.87l-1.49,-2.34l-3.27,-1.1l-2.38,0.72l-1.59,0.86l-0.2,0.42l0.27,1.55l-1.55,0.68l-1.36,-0.4l-2.21,-0.09l-0.08,-15.41l8.39,2.93l2.95,2.4l0.6,1.64l4.02,1.49l0.31,0.68l-1.76,0.21l-0.33,0.52l0.55,1.68Z",name:"Papua New Guinea"},PE:{path:"M244.96,295.21l-1.26,-0.07l-0.57,0.42l-1.93,0.45l-2.98,1.75l-0.36,1.36l-0.58,0.8l0.12,1.37l-1.24,0.59l-0.22,1.22l-0.62,0.84l1.04,2.27l1.28,1.44l-0.41,0.84l0.32,0.57l1.48,0.13l1.16,1.37l2.21,0.07l1.63,-1.08l-0.13,3.02l0.3,0.4l1.14,0.29l1.31,-0.34l1.9,3.59l-0.48,0.85l-0.17,3.85l-0.94,1.59l0.35,0.75l-0.47,1.07l0.98,1.97l-2.1,3.82l-0.98,0.5l-2.17,-1.28l-0.39,-1.16l-4.95,-2.58l-4.46,-2.79l-1.84,-1.51l-0.91,-1.84l0.3,-0.96l-2.11,-3.33l-4.82,-9.68l-1.04,-1.2l-0.87,-1.94l-3.4,-2.48l0.58,-1.18l-1.13,-2.23l0.66,-1.49l1.45,-1.15l-0.6,0.98l0.07,0.92l0.47,0.36l1.74,0.03l0.97,1.17l0.54,0.07l1.42,-1.03l0.6,-1.84l1.42,-2.02l3.04,-1.04l2.73,-2.62l0.86,-1.74l-0.1,-1.87l1.44,1.02l0.9,1.25l1.06,0.59l1.7,2.73l1.86,0.31l1.45,-0.61l0.96,0.39l1.36,-0.19l1.45,0.89l-1.4,2.21l0.31,0.61l0.59,0.05l0.47,0.5Z",name:"Peru"},PK:{path:"M615.09,192.34l-1.83,1.81l-2.6,0.39l-3.73,-0.68l-1.58,1.33l-0.09,0.42l1.77,4.39l1.7,1.23l-1.69,1.27l-0.12,2.14l-2.33,2.64l-1.6,2.8l-2.46,2.67l-3.03,-0.07l-2.76,2.83l0.05,0.6l1.5,1.11l0.26,1.9l1.44,1.5l0.37,1.68l-5.01,-0.01l-1.78,1.7l-1.42,-0.52l-0.76,-1.87l-2.27,-2.15l-11.61,0.86l0.71,-2.34l3.43,-1.32l0.25,-0.44l-0.21,-1.24l-1.2,-0.65l-0.28,-2.46l-2.29,-1.14l-1.28,-1.94l2.82,0.94l2.62,-0.38l1.42,0.33l0.76,-0.56l1.71,0.19l3.25,-1.14l0.27,-0.36l0.08,-2.19l1.18,-1.32l1.68,0.0l0.58,-0.82l1.6,-0.3l1.19,0.16l0.98,-0.78l0.02,-1.88l0.93,-1.47l1.48,-0.66l0.19,-0.55l-0.66,-1.25l2.04,-0.11l0.69,-1.01l-0.02,-1.16l1.11,-1.06l-0.17,-1.78l-0.49,-1.03l1.15,-0.98l5.42,-0.91l2.6,-0.82l1.6,1.16l0.97,2.34l3.45,0.97Z",name:"Pakistan"},PH:{path:"M737.01,263.84l0.39,2.97l-0.44,1.18l-0.55,-1.53l-0.67,-0.14l-1.17,1.28l0.65,2.09l-0.42,0.69l-2.48,-1.23l-0.57,-1.49l0.65,-1.03l-0.1,-0.54l-1.59,-1.19l-0.56,0.08l-0.65,0.87l-1.23,0.0l-1.58,0.97l0.83,-1.8l2.56,-1.42l0.65,0.84l0.45,0.13l1.9,-0.69l0.56,-1.11l1.5,-0.06l0.38,-0.43l-0.09,-1.19l1.21,0.71l0.36,2.02ZM733.59,256.58l0.05,0.75l0.08,0.26l-0.8,-0.42l-0.18,-0.71l0.85,0.12ZM734.08,256.1l-0.12,-1.12l-1.0,-1.27l1.36,0.03l0.53,0.73l0.51,2.04l-1.27,-0.4ZM733.76,257.68l0.38,0.98l-0.32,0.15l-0.07,-1.13ZM724.65,238.43l1.46,0.7l0.72,-0.31l-0.32,1.17l0.79,1.71l-0.57,1.84l-1.53,1.04l-0.39,2.25l0.56,2.04l1.63,0.57l1.16,-0.27l2.71,1.23l-0.19,1.08l0.76,0.84l-0.08,0.36l-1.4,-0.9l-0.88,-1.27l-0.66,0.0l-0.38,0.55l-1.6,-1.31l-2.15,0.36l-0.87,-0.39l0.07,-0.61l0.66,-0.55l-0.01,-0.62l-0.75,-0.59l-0.72,0.44l-0.74,-0.87l-0.39,-2.49l0.32,0.27l0.66,-0.28l0.26,-3.97l0.7,-2.02l1.14,0.0ZM731.03,258.87l-0.88,0.85l-1.19,1.94l-1.05,-1.19l0.93,-1.1l0.32,-1.47l0.52,-0.06l-0.27,1.15l0.22,0.45l0.49,-0.12l1.0,-1.32l-0.08,0.85ZM726.83,255.78l0.83,0.38l1.17,-0.0l-0.02,0.48l-2.0,1.4l0.03,-2.26ZM724.81,252.09l-0.38,1.27l-1.42,-1.95l1.2,0.05l0.6,0.63ZM716.55,261.82l1.1,-0.95l0.03,-0.03l-0.28,0.36l-0.85,0.61ZM719.22,259.06l0.04,-0.06l0.8,-1.53l0.16,0.75l-1.0,0.84Z",name:"Philippines"},PL:{path:"M468.44,149.42l-1.11,-1.54l-1.86,-0.33l-0.48,-1.05l-1.72,-0.37l-0.65,0.69l-0.72,-0.36l0.11,-0.61l-0.33,-0.46l-1.75,-0.27l-1.04,-0.93l-0.94,-1.94l0.16,-1.22l-0.62,-1.8l-0.78,-1.07l0.57,-1.04l-0.48,-1.43l1.41,-0.83l6.91,-2.71l2.14,0.5l0.52,0.91l5.51,0.44l4.55,-0.05l1.07,0.31l0.48,0.84l0.15,1.58l0.65,1.2l-0.01,0.99l-1.27,0.58l-0.19,0.54l0.73,1.48l0.08,1.55l1.2,2.76l-0.17,0.58l-1.23,0.44l-2.27,2.72l0.18,0.95l-1.97,-1.03l-1.98,0.4l-1.36,-0.28l-1.24,0.58l-1.07,-0.97l-1.16,0.24Z",name:"Poland"},"-99":{path:"M504.91,192.87l0.34,0.01l0.27,-0.07l-0.29,0.26l-0.31,-0.2Z",name:"N. Cyprus"},ZM:{path:"M481.47,313.3l0.39,0.31l2.52,0.14l0.99,1.17l2.01,0.35l1.4,-0.64l0.69,1.17l1.78,0.33l1.84,2.35l2.23,0.18l0.4,-0.43l-0.21,-2.74l-0.62,-0.3l-0.48,0.32l-1.98,-1.17l0.72,-5.29l-0.51,-1.18l0.57,-1.3l3.68,-0.62l0.26,0.63l1.21,0.63l0.9,-0.22l2.16,0.67l1.33,0.71l1.07,1.02l0.56,1.87l-0.88,2.7l0.43,2.09l-0.73,0.87l-0.76,2.37l0.59,0.68l-6.6,1.83l-0.29,0.44l0.19,1.45l-1.68,0.35l-1.43,1.02l-0.38,0.87l-0.87,0.26l-3.48,3.69l-4.16,-0.53l-1.52,-1.0l-1.77,-0.13l-1.83,0.52l-3.04,-3.4l0.11,-7.59l4.82,0.03l0.39,-0.49l-0.18,-0.76l0.33,-0.83l-0.4,-1.36l0.24,-1.05Z",name:"Zambia"},EH:{path:"M384.42,230.28l0.25,-0.79l1.06,-1.29l0.8,-3.51l3.38,-2.78l0.7,-1.81l0.06,4.84l-1.98,0.2l-0.94,1.59l0.39,3.56l-3.7,-0.01ZM392.01,218.1l0.7,-1.8l1.77,-0.24l2.09,0.34l0.95,-0.62l1.28,-0.07l-0.0,2.51l-6.79,-0.12Z",name:"W. Sahara"},EE:{path:"M485.71,115.04l2.64,0.6l2.56,0.11l-1.6,1.91l0.61,3.54l-0.81,0.87l-1.78,-0.01l-3.22,-1.76l-1.8,0.45l0.21,-1.53l-0.58,-0.41l-0.69,0.34l-1.26,-1.03l-0.17,-1.63l2.83,-0.92l3.05,-0.52Z",name:"Estonia"},EG:{path:"M492.06,205.03l1.46,0.42l2.95,-1.64l2.04,-0.21l1.53,0.3l0.59,1.19l0.69,0.04l0.41,-0.64l1.81,0.58l1.95,0.16l1.04,-0.51l1.42,4.08l-2.03,4.54l-1.66,-1.77l-1.76,-3.85l-0.64,-0.12l-0.36,0.67l1.04,2.88l3.44,6.95l1.78,3.04l2.03,2.65l-0.36,0.53l0.23,2.01l2.7,2.19l-28.41,0.0l0.0,-18.96l-0.73,-2.2l0.59,-1.56l-0.32,-1.26l0.68,-0.99l3.06,-0.04l4.82,1.52Z",name:"Egypt"},ZA:{path:"M467.14,373.21l-0.13,-1.96l-0.68,-1.56l0.7,-0.68l-0.13,-2.33l-4.56,-8.19l0.77,-0.86l0.6,0.45l0.69,1.31l2.83,0.72l1.5,-0.26l2.24,-1.39l0.19,-9.55l1.35,2.3l-0.21,1.5l0.61,1.2l0.4,0.19l1.79,-0.27l2.6,-2.07l0.69,-1.32l0.96,-0.48l2.19,1.04l2.04,0.13l1.77,-0.65l0.85,-2.12l1.38,-0.33l1.59,-2.76l2.15,-1.89l3.41,-1.87l2.0,0.45l1.02,-0.28l0.99,0.2l1.75,5.29l-0.38,3.25l-0.81,-0.23l-1.0,0.46l-0.87,1.68l-0.05,1.16l1.97,1.84l1.47,-0.29l0.69,-1.18l1.09,0.01l-0.76,3.69l-0.58,1.09l-2.2,1.79l-3.17,4.76l-2.8,2.83l-3.57,2.88l-2.53,1.05l-1.22,0.14l-0.51,0.7l-1.18,-0.32l-1.39,0.5l-2.59,-0.52l-1.61,0.33l-1.18,-0.11l-2.55,1.1l-2.1,0.44l-1.6,1.07l-0.85,0.05l-0.93,-0.89l-0.93,-0.15l-0.97,-1.13l-0.25,0.05ZM491.45,364.19l0.62,-0.93l1.48,-0.59l1.18,-2.19l-0.07,-0.49l-1.99,-1.69l-1.66,0.56l-1.43,1.14l-1.34,1.73l0.02,0.51l1.88,2.11l1.31,-0.16Z",name:"South Africa"},EC:{path:"M231.86,285.53l0.29,1.59l-0.69,1.45l-2.61,2.51l-3.13,1.11l-1.53,2.18l-0.49,1.68l-1.0,0.73l-1.02,-1.11l-1.78,-0.16l0.67,-1.15l-0.24,-0.86l1.25,-2.13l-0.54,-1.09l-0.67,-0.08l-0.72,0.87l-0.87,-0.64l0.35,-0.69l-0.36,-1.96l0.81,-0.51l0.45,-1.51l0.92,-1.57l-0.07,-0.97l2.65,-1.33l2.75,1.35l0.77,1.05l2.12,0.35l0.76,-0.32l1.96,1.21Z",name:"Ecuador"},AL:{path:"M470.32,171.8l0.74,0.03l0.92,0.89l-0.17,1.95l0.36,1.28l1.01,0.82l-1.82,2.83l-0.19,-0.61l-1.25,-0.89l-0.18,-1.2l0.53,-2.82l-0.54,-1.47l0.6,-0.83Z",name:"Albania"},AO:{path:"M461.55,300.03l1.26,3.15l1.94,2.36l2.47,-0.53l1.25,0.32l0.44,-0.18l0.93,-1.92l1.31,-0.08l0.41,-0.44l0.47,-0.0l-0.1,0.41l0.39,0.49l2.65,-0.02l0.03,1.19l0.48,1.01l-0.34,1.52l0.18,1.55l0.83,1.04l-0.13,2.85l0.54,0.39l3.96,-0.41l-0.1,1.79l0.39,1.05l-0.24,1.43l-4.7,-0.03l-0.4,0.39l-0.12,8.13l2.92,3.49l-3.83,0.88l-5.89,-0.36l-1.88,-1.24l-10.47,0.22l-1.3,-1.01l-1.85,-0.16l-2.4,0.77l-0.15,-1.06l0.33,-2.16l1.0,-3.45l1.35,-3.2l2.24,-2.8l0.33,-2.06l-0.13,-1.53l-0.8,-1.08l-1.21,-2.87l0.87,-1.62l-1.27,-4.12l-1.17,-1.53l2.47,-0.63l7.03,0.03ZM451.71,298.87l-0.47,-1.25l1.25,-1.11l0.32,0.3l-0.99,1.03l-0.12,1.03Z",name:"Angola"},KZ:{path:"M552.8,172.89l0.46,-1.27l-0.48,-1.05l-2.96,-1.19l-1.06,-2.58l-1.37,-0.87l-0.03,-0.3l1.95,0.23l0.45,-0.38l0.08,-1.96l1.75,-0.41l2.1,0.45l0.48,-0.33l0.45,-3.04l-0.45,-2.09l-0.41,-0.31l-2.42,0.15l-2.36,-0.73l-2.87,1.37l-2.17,0.61l-0.85,-0.34l0.13,-1.61l-1.6,-2.12l-2.02,-0.08l-1.78,-1.82l1.29,-2.18l-0.57,-0.95l1.62,-2.91l2.21,1.63l0.63,-0.27l0.29,-2.22l4.92,-3.43l3.71,-0.08l8.4,3.6l2.92,-1.36l3.77,-0.06l3.11,1.66l0.51,-0.11l0.6,-0.81l3.31,0.13l0.39,-0.25l0.63,-1.57l-0.17,-0.5l-3.5,-1.98l1.87,-1.27l-0.13,-1.03l1.98,-0.72l0.18,-0.62l-1.59,-2.06l0.81,-0.82l9.23,-1.18l1.33,-0.88l6.18,-1.26l2.26,-1.42l4.08,0.68l0.73,3.33l0.51,0.3l2.48,-0.8l2.79,1.02l-0.17,1.56l0.43,0.44l2.55,-0.24l4.89,-2.53l0.03,0.32l3.15,2.61l5.56,8.47l0.65,0.02l1.12,-1.46l3.15,1.74l3.76,-0.78l1.15,0.49l1.14,1.8l1.84,0.76l0.99,1.29l3.35,-0.25l1.02,1.52l-1.6,1.81l-1.93,0.28l-0.34,0.38l-0.11,3.05l-1.13,1.16l-4.75,-1.0l-0.46,0.27l-1.76,5.47l-1.1,0.59l-4.91,1.23l-0.27,0.54l2.1,4.97l-1.37,0.63l-0.23,0.41l0.13,1.13l-0.88,-0.25l-1.42,-1.13l-7.89,-0.4l-0.92,0.31l-3.73,-1.22l-1.42,0.63l-0.53,1.66l-3.72,-0.94l-1.85,0.43l-0.76,1.4l-4.65,2.62l-1.13,2.08l-0.44,0.01l-0.92,-1.4l-2.87,-0.09l-0.45,-2.14l-0.38,-0.32l-0.8,-0.01l0.0,-2.96l-3.0,-2.22l-7.31,0.58l-2.35,-2.68l-6.71,-3.69l-6.45,1.83l-0.29,0.39l0.1,10.85l-0.7,0.08l-1.62,-2.17l-1.83,-0.96l-3.11,0.59l-0.64,0.51Z",name:"Kazakhstan"},ET:{path:"M516.04,247.79l1.1,0.84l1.63,-0.45l0.68,0.47l1.63,0.03l2.01,0.94l1.73,1.66l1.64,2.07l-1.52,2.04l0.16,1.72l0.39,0.38l2.05,0.0l-0.36,1.03l2.86,3.58l8.32,3.08l1.31,0.02l-6.32,6.75l-3.1,0.11l-2.36,1.77l-1.47,0.04l-0.86,0.79l-1.38,-0.0l-1.32,-0.81l-2.29,1.05l-0.76,0.98l-3.29,-0.41l-3.07,-2.07l-1.8,-0.07l-0.62,-0.6l0.0,-1.24l-0.28,-0.38l-1.15,-0.37l-1.4,-2.59l-1.19,-0.68l-0.47,-1.0l-1.27,-1.23l-1.16,-0.22l0.43,-0.72l1.45,-0.28l0.41,-0.95l-0.03,-2.21l0.68,-2.44l1.05,-0.63l1.43,-3.06l1.57,-1.37l1.02,-2.51l0.35,-1.88l2.52,0.46l0.44,-0.24l0.58,-1.43Z",name:"Ethiopia"},ZW:{path:"M498.91,341.09l-1.11,-0.22l-0.92,0.28l-2.09,-0.44l-1.5,-1.11l-1.89,-0.43l-0.62,-1.4l-0.01,-0.84l-0.3,-0.38l-0.97,-0.25l-2.71,-2.74l-1.92,-3.32l3.83,0.45l3.73,-3.82l1.08,-0.44l0.26,-0.77l1.25,-0.9l1.41,-0.26l0.5,0.89l1.99,-0.05l1.72,1.17l1.11,0.17l1.05,0.66l0.01,2.99l-0.59,3.76l0.38,0.86l-0.23,1.23l-0.39,0.35l-0.63,1.81l-2.43,2.75Z",name:"Zimbabwe"},ES:{path:"M416.0,169.21l1.07,1.17l4.61,1.38l1.06,-0.57l2.6,1.26l2.71,-0.3l0.09,1.12l-2.14,1.8l-3.11,0.61l-0.31,0.31l-0.2,0.89l-1.54,1.69l-0.97,2.4l0.84,1.74l-1.32,1.27l-0.48,1.68l-1.88,0.65l-1.66,2.07l-5.36,-0.01l-1.79,1.08l-0.89,0.98l-0.88,-0.17l-0.79,-0.82l-0.68,-1.59l-2.37,-0.63l-0.11,-0.5l1.21,-1.82l-0.77,-1.13l0.61,-1.68l-0.76,-1.62l0.87,-0.49l0.09,-1.25l0.42,-0.6l0.03,-2.11l0.99,-0.69l0.13,-0.5l-1.03,-1.73l-1.46,-0.11l-0.61,0.38l-1.06,0.0l-0.52,-1.23l-0.53,-0.21l-1.32,0.67l-0.01,-1.49l-0.75,-0.96l3.03,-1.88l2.99,0.53l3.32,-0.02l2.63,0.51l6.01,-0.06Z",name:"Spain"},ER:{path:"M520.38,246.23l3.42,2.43l3.5,3.77l0.84,0.54l-0.95,-0.01l-3.51,-3.89l-2.33,-1.15l-1.73,-0.07l-0.91,-0.51l-1.26,0.51l-1.34,-1.02l-0.61,0.17l-0.66,1.61l-2.35,-0.43l-0.17,-0.67l1.29,-5.29l0.61,-0.61l1.95,-0.53l0.87,-1.01l1.17,2.41l0.68,2.33l1.49,1.43Z",name:"Eritrea"},ME:{path:"M468.91,172.53l-1.22,-1.02l0.47,-1.81l0.89,-0.72l2.26,1.51l-0.5,0.57l-0.75,-0.27l-1.14,1.73Z",name:"Montenegro"},MD:{path:"M488.41,153.73l1.4,-0.27l1.72,0.93l1.07,0.15l0.85,0.65l-0.14,0.84l0.96,0.85l1.12,2.47l-1.15,-0.07l-0.66,-0.41l-0.52,0.25l-0.09,0.86l-1.08,1.89l-0.27,-0.86l0.25,-1.34l-0.16,-1.6l-3.29,-4.34Z",name:"Moldova"},MG:{path:"M545.91,319.14l0.4,3.03l0.62,1.21l-0.21,1.02l-0.57,-0.8l-0.69,-0.01l-0.47,0.76l0.41,2.12l-0.18,0.87l-0.73,0.78l-0.15,2.14l-4.71,15.2l-1.06,2.88l-3.92,1.64l-3.12,-1.49l-0.6,-1.21l-0.19,-2.4l-0.86,-2.05l-0.21,-1.77l0.38,-1.62l1.21,-0.75l0.01,-0.76l1.19,-2.04l0.23,-1.66l-1.06,-2.99l-0.19,-2.21l0.81,-1.33l0.32,-1.46l4.63,-1.22l3.44,-3.0l0.85,-1.4l-0.08,-0.7l0.78,-0.04l1.38,-1.77l0.13,-1.64l0.45,-0.61l1.16,1.69l0.59,1.6Z",name:"Madagascar"},MA:{path:"M378.78,230.02l0.06,-0.59l0.92,-0.73l0.82,-1.37l-0.09,-1.04l0.79,-1.7l1.31,-1.58l0.96,-0.59l0.66,-1.55l0.09,-1.47l0.81,-1.48l1.72,-1.07l1.55,-2.69l1.16,-0.96l2.44,-0.39l1.94,-1.82l1.31,-0.78l2.09,-2.28l-0.51,-3.65l1.24,-3.7l1.5,-1.75l4.46,-2.57l2.37,-4.47l1.44,0.01l1.68,1.21l2.32,-0.19l3.47,0.65l0.8,1.54l0.16,1.71l0.86,2.96l0.56,0.59l-0.26,0.61l-3.05,0.44l-1.26,1.05l-1.33,0.22l-0.33,0.37l-0.09,1.78l-2.68,1.0l-1.07,1.42l-4.47,1.13l-4.04,2.01l-0.54,4.64l-1.15,0.06l-0.92,0.61l-1.96,-0.35l-2.42,0.54l-0.74,1.9l-0.86,0.4l-1.14,3.26l-3.53,3.01l-0.8,3.55l-0.96,1.1l-0.29,0.82l-4.95,0.18Z",name:"Morocco"},UZ:{path:"M598.64,172.75l-1.63,1.52l0.06,0.64l1.85,1.12l1.97,-0.64l2.21,1.17l-2.52,1.68l-2.59,-0.22l-0.18,-0.41l0.46,-1.23l-0.45,-0.53l-3.35,0.69l-2.1,3.51l-1.87,-0.12l-1.03,1.51l0.22,0.55l1.64,0.62l0.46,1.83l-1.19,2.49l-2.66,-0.53l0.05,-1.36l-0.26,-0.39l-3.3,-1.23l-2.56,-1.4l-4.4,-3.34l-1.34,-3.14l-1.08,-0.6l-2.58,0.13l-0.69,-0.44l-0.47,-2.52l-3.37,-1.6l-0.43,0.05l-2.07,1.72l-2.1,1.01l-0.21,0.47l0.28,1.01l-1.91,0.03l-0.09,-10.5l5.99,-1.7l6.19,3.54l2.71,2.84l7.05,-0.67l2.71,2.01l-0.17,2.81l0.39,0.42l0.9,0.02l0.44,2.14l0.38,0.32l2.94,0.09l0.95,1.42l1.28,-0.24l1.05,-2.04l4.43,-2.5Z",name:"Uzbekistan"},MM:{path:"M673.9,230.21l-1.97,1.57l-0.57,0.96l-1.4,0.6l-1.36,1.05l-1.99,0.36l-1.08,2.66l-0.91,0.4l-0.19,0.55l1.21,2.27l2.52,3.43l-0.79,1.91l-0.74,0.41l-0.17,0.52l0.65,1.37l1.61,1.95l0.25,2.58l0.9,2.13l-1.92,3.57l0.68,-2.25l-0.81,-1.74l0.19,-2.65l-1.05,-1.53l-1.24,-6.17l-1.12,-2.26l-0.6,-0.13l-4.34,3.02l-2.39,-0.65l0.77,-2.84l-0.52,-2.61l-1.91,-2.96l0.25,-0.75l-0.29,-0.51l-1.33,-0.3l-1.61,-1.93l-0.1,-1.3l0.82,-0.24l0.04,-1.64l1.02,-0.52l0.21,-0.45l-0.23,-0.95l0.54,-0.96l0.08,-2.22l1.46,0.45l0.47,-0.2l1.12,-2.19l0.16,-1.35l1.33,-2.16l-0.0,-1.52l2.89,-1.66l1.63,0.44l0.5,-0.44l-0.17,-1.4l0.64,-0.36l0.08,-1.04l0.77,-0.11l0.71,1.35l1.06,0.69l-0.03,3.86l-2.38,2.37l-0.3,3.15l0.46,0.43l2.28,-0.38l0.51,2.08l1.47,0.67l-0.6,1.8l0.19,0.48l2.97,1.48l1.64,-0.55l0.02,0.32Z",name:"Myanmar"},ML:{path:"M392.61,254.08l-0.19,-2.37l-0.99,-0.87l-0.44,-1.3l-0.09,-1.28l0.81,-0.58l0.35,-1.24l2.37,0.65l1.31,-0.47l0.86,0.15l0.66,-0.56l9.83,-0.04l0.38,-0.28l0.56,-1.8l-0.44,-0.65l-2.35,-21.95l3.27,-0.04l16.7,11.38l0.74,1.31l2.5,1.09l0.02,1.38l0.44,0.39l2.34,-0.21l0.01,5.38l-1.28,1.61l-0.26,1.49l-5.31,0.57l-1.07,0.92l-2.9,0.1l-0.86,-0.48l-1.38,0.36l-2.4,1.08l-0.6,0.87l-1.85,1.09l-0.43,0.7l-0.79,0.39l-1.44,-0.21l-0.81,0.84l-0.34,1.64l-1.91,2.02l-0.06,1.03l-0.67,1.22l0.13,1.16l-0.97,0.39l-0.23,-0.64l-0.52,-0.24l-1.35,0.4l-0.34,0.55l-2.69,-0.28l-0.37,-0.35l-0.02,-0.9l-0.65,-0.35l0.45,-0.64l-0.03,-0.53l-2.12,-2.44l-0.76,-0.01l-2.0,1.16l-0.78,-0.15l-0.8,-0.67l-1.21,0.23Z",name:"Mali"},MN:{path:"M676.61,146.48l3.81,1.68l5.67,-1.0l2.37,0.41l2.34,1.5l1.79,1.75l2.29,-0.03l3.12,0.52l2.47,-0.81l3.41,-0.59l3.53,-2.21l1.25,0.29l1.53,1.13l2.27,-0.21l-2.66,5.01l0.64,1.68l0.47,0.21l1.32,-0.38l2.38,0.48l2.02,-1.11l1.76,0.89l2.06,2.02l-0.13,0.53l-1.72,-0.29l-3.77,0.46l-1.88,0.99l-1.76,1.99l-3.71,1.17l-2.45,1.6l-3.83,-0.87l-0.41,0.17l-1.31,1.99l1.04,2.24l-1.52,0.9l-1.74,1.57l-2.79,1.02l-3.78,0.13l-4.05,1.05l-2.77,1.52l-1.16,-0.85l-2.94,0.0l-3.62,-1.79l-2.58,-0.49l-3.4,0.41l-5.12,-0.67l-2.63,0.06l-1.31,-1.6l-1.4,-3.0l-1.48,-0.33l-3.13,-1.94l-6.16,-0.93l-0.71,-1.06l0.86,-3.82l-1.93,-2.71l-3.5,-1.18l-1.95,-1.58l-0.5,-1.72l2.34,-0.52l4.75,-2.8l3.62,-1.47l2.18,0.97l2.46,0.05l1.81,1.53l2.46,0.12l3.95,0.71l2.43,-2.28l0.08,-0.48l-0.9,-1.72l2.24,-2.98l2.62,1.27l4.94,1.17l0.43,2.24Z",name:"Mongolia"},MK:{path:"M472.8,173.98l0.49,-0.71l3.57,-0.71l1.0,0.77l0.13,1.45l-0.65,0.53l-1.15,-0.05l-1.12,0.67l-1.39,0.22l-0.79,-0.55l-0.29,-1.03l0.19,-0.6Z",name:"Macedonia"},MW:{path:"M505.5,309.31l0.85,1.95l0.15,2.86l-0.69,1.65l0.71,1.8l0.06,1.28l0.49,0.64l0.07,1.06l0.4,0.55l0.8,-0.23l0.55,0.61l0.69,-0.21l0.34,0.6l0.19,2.94l-1.04,0.62l-0.54,1.25l-1.11,-1.08l-0.16,-1.56l0.51,-1.31l-0.32,-1.3l-0.99,-0.65l-0.82,0.12l-2.36,-1.64l0.63,-1.96l0.82,-1.18l-0.46,-2.01l0.9,-2.86l-0.94,-2.51l0.96,0.18l0.29,0.4Z",name:"Malawi"},MR:{path:"M407.36,220.66l-2.58,0.03l-0.39,0.44l2.42,22.56l0.36,0.43l-0.39,1.24l-9.75,0.04l-0.56,0.53l-0.91,-0.11l-1.27,0.45l-1.61,-0.66l-0.97,0.03l-0.36,0.29l-0.38,1.35l-0.42,0.23l-2.93,-3.4l-2.96,-1.52l-1.62,-0.03l-1.27,0.54l-1.12,-0.2l-0.65,0.4l-0.08,-0.49l0.68,-1.29l0.31,-2.43l-0.57,-3.91l0.23,-1.21l-0.69,-1.5l-1.15,-1.02l0.25,-0.39l9.58,0.02l0.4,-0.45l-0.46,-3.68l0.47,-1.04l2.12,-0.21l0.36,-0.4l-0.08,-6.4l7.81,0.13l0.41,-0.4l0.01,-3.31l7.76,5.35Z",name:"Mauritania"},UG:{path:"M498.55,276.32l0.7,-0.46l1.65,0.5l1.96,-0.57l1.7,0.01l1.45,-0.98l0.91,1.33l1.33,3.95l-2.57,4.03l-1.46,-0.4l-2.54,0.91l-1.37,1.61l-0.01,0.81l-2.42,-0.01l-2.26,1.01l-0.17,-1.59l0.58,-1.04l0.14,-1.94l1.37,-2.28l1.78,-1.58l-0.17,-0.65l-0.72,-0.24l0.13,-2.43Z",name:"Uganda"},MY:{path:"M717.47,273.46l-1.39,0.65l-2.12,-0.41l-2.88,-0.0l-0.38,0.28l-0.84,2.75l-0.99,0.96l-1.21,3.29l-1.73,0.45l-2.45,-0.68l-1.39,0.31l-1.33,1.15l-1.59,-0.14l-1.41,0.44l-1.44,-1.19l-0.18,-0.73l1.34,0.53l1.93,-0.47l0.75,-2.22l4.02,-1.03l2.75,-3.21l0.82,0.94l0.64,-0.05l0.4,-0.65l0.96,0.06l0.42,-0.36l0.24,-2.68l1.81,-1.64l1.21,-1.86l0.63,-0.01l1.07,1.05l0.34,1.28l3.44,1.35l-0.06,0.35l-1.37,0.1l-0.35,0.54l0.32,0.88ZM673.68,269.59l0.17,1.09l0.47,0.33l1.65,-0.3l0.87,-0.94l1.61,1.52l0.98,1.56l-0.12,2.81l0.41,2.29l0.95,0.9l0.88,2.44l-1.27,0.12l-5.1,-3.67l-0.34,-1.29l-1.37,-1.59l-0.33,-1.97l-0.88,-1.4l0.25,-1.68l-0.46,-1.05l1.63,0.84Z",name:"Malaysia"},MX:{path:"M133.12,200.41l0.2,0.47l9.63,3.33l6.96,-0.02l0.4,-0.4l0.0,-0.74l3.77,0.0l3.55,2.93l1.39,2.83l1.52,1.04l2.08,0.82l0.47,-0.14l1.46,-2.0l1.73,-0.04l1.59,0.98l2.05,3.35l1.47,1.56l1.26,3.14l2.18,1.02l2.26,0.58l-1.18,3.72l-0.42,5.04l1.79,4.89l1.62,1.89l0.61,1.52l1.2,1.42l2.55,0.66l1.37,1.1l7.54,-1.89l1.86,-1.3l1.14,-4.3l4.1,-1.21l3.57,-0.11l0.32,0.3l-0.06,0.94l-1.26,1.45l-0.67,1.71l0.38,0.7l-0.72,2.27l-0.49,-0.3l-1.0,0.08l-1.0,1.39l-0.47,-0.11l-0.53,0.47l-4.26,-0.02l-0.4,0.4l-0.0,1.06l-1.1,0.26l0.1,0.44l1.82,1.44l0.56,0.91l-3.19,0.21l-1.21,2.09l0.24,0.72l-0.2,0.44l-2.24,-2.18l-1.45,-0.93l-2.22,-0.69l-1.52,0.22l-3.07,1.16l-10.55,-3.85l-2.86,-1.96l-3.78,-0.92l-1.08,-1.19l-2.62,-1.43l-1.18,-1.54l-0.38,-0.81l0.66,-0.63l-0.18,-0.53l0.52,-0.76l0.01,-0.91l-2.0,-3.82l-2.21,-2.63l-2.53,-2.09l-1.19,-1.62l-2.2,-1.17l-0.3,-0.43l0.34,-1.48l-0.21,-0.45l-1.23,-0.6l-1.36,-1.2l-0.59,-1.78l-1.54,-0.47l-2.44,-2.55l-0.16,-0.9l-1.33,-2.03l-0.84,-1.99l-0.16,-1.33l-1.81,-1.1l-0.97,0.05l-1.31,-0.7l-0.57,0.22l-0.4,1.12l0.72,3.77l3.51,3.89l0.28,0.78l0.53,0.26l0.41,1.43l1.33,1.73l1.58,1.41l0.8,2.39l1.43,2.41l0.13,1.32l0.37,0.36l1.04,0.08l1.67,2.28l-0.85,0.76l-0.66,-1.51l-1.68,-1.54l-2.91,-1.87l0.06,-1.82l-0.54,-1.68l-2.91,-2.03l-0.55,0.09l-1.95,-1.1l-0.88,-0.94l0.68,-0.08l0.93,-1.01l0.08,-1.78l-1.93,-1.94l-1.46,-0.77l-3.75,-7.56l4.88,-0.42Z",name:"Mexico"},VU:{path:"M839.04,322.8l0.22,1.14l-0.44,0.03l-0.2,-1.45l0.42,0.27Z",name:"Vanuatu"},FR:{path:"M444.48,172.62l-0.64,1.78l-0.58,-0.31l-0.49,-1.72l0.4,-0.89l1.0,-0.72l0.3,1.85ZM429.64,147.1l1.78,1.58l1.46,-0.13l2.1,1.42l1.35,0.27l1.23,0.83l3.04,0.5l-1.03,1.85l-0.3,2.12l-0.41,0.32l-0.95,-0.24l-0.5,0.43l0.06,0.61l-1.81,1.92l-0.04,1.42l0.55,0.38l0.88,-0.36l0.61,0.97l-0.03,1.0l0.57,0.91l-0.75,1.09l0.65,2.39l1.27,0.57l-0.18,0.82l-2.01,1.53l-4.77,-0.8l-3.82,1.0l-0.53,1.85l-2.49,0.34l-2.71,-1.31l-1.16,0.57l-4.31,-1.29l-0.72,-0.86l1.19,-1.78l0.39,-6.45l-2.58,-3.3l-1.9,-1.66l-3.72,-1.23l-0.19,-1.72l2.81,-0.61l4.12,0.81l0.47,-0.48l-0.6,-2.77l1.94,0.95l5.83,-2.54l0.92,-2.74l1.6,-0.49l0.24,0.78l1.36,0.33l1.05,1.19ZM289.01,278.39l-0.81,0.8l-0.78,0.12l-0.5,-0.66l-0.56,-0.1l-0.91,0.6l-0.46,-0.22l1.09,-2.96l-0.96,-1.77l-0.17,-1.49l1.07,-1.77l2.32,0.75l2.51,2.01l0.3,0.74l-2.14,3.96Z",name:"France"},FI:{path:"M492.17,76.39l-0.23,3.5l3.52,2.63l-2.08,2.88l-0.02,0.44l2.8,4.56l-1.59,3.31l2.16,3.24l-0.94,2.39l0.14,0.47l3.44,2.51l-0.77,1.62l-7.52,6.95l-4.5,0.31l-4.38,1.37l-3.8,0.74l-1.44,-1.96l-2.17,-1.11l0.5,-3.66l-1.16,-3.33l1.09,-2.08l2.21,-2.42l5.67,-4.32l1.64,-0.83l0.21,-0.42l-0.46,-2.02l-3.38,-1.89l-0.75,-1.43l-0.22,-6.74l-6.79,-4.8l0.8,-0.62l2.54,2.12l3.46,-0.12l3.0,0.96l2.51,-2.11l1.17,-3.08l3.55,-1.38l2.76,1.53l-0.95,2.79Z",name:"Finland"},FJ:{path:"M871.53,326.34l-2.8,1.05l-0.08,-0.23l2.97,-1.21l-0.1,0.39ZM867.58,329.25l0.43,0.37l-0.27,0.88l-1.24,0.28l-1.04,-0.24l-0.14,-0.66l0.63,-0.58l0.92,0.26l0.7,-0.31Z",name:"Fiji"},FK:{path:"M274.36,425.85l1.44,1.08l-0.47,0.73l-3.0,0.89l-0.96,-1.0l-0.52,-0.05l-1.83,1.29l-0.73,-0.88l2.46,-1.64l1.93,0.76l1.67,-1.19Z",name:"Falkland Is."},NI:{path:"M202.33,252.67l0.81,-0.18l1.03,-1.02l-0.04,-0.88l0.68,-0.0l0.63,-0.54l0.97,0.22l1.53,-1.26l0.58,-0.99l1.17,0.34l2.41,-0.94l0.13,1.32l-0.81,1.94l0.1,2.74l-0.36,0.37l-0.11,1.75l-0.47,0.81l0.18,1.14l-1.73,-0.85l-0.71,0.27l-1.47,-0.6l-0.52,0.16l-4.01,-3.81Z",name:"Nicaragua"},NL:{path:"M430.31,143.39l0.6,-0.5l2.13,-4.8l3.2,-1.33l1.74,0.08l0.33,0.8l-0.59,2.92l-0.5,0.99l-1.26,0.0l-0.4,0.45l0.33,2.7l-2.2,-1.78l-2.62,0.58l-0.75,-0.11Z",name:"Netherlands"},NO:{path:"M491.44,67.41l6.8,2.89l-2.29,0.86l-0.15,0.65l2.33,2.38l-4.98,1.79l0.84,-2.45l-0.18,-0.48l-3.55,-1.8l-3.89,1.52l-1.42,3.38l-2.12,1.72l-2.64,-1.0l-3.11,0.21l-2.66,-2.22l-0.5,-0.01l-1.41,1.1l-1.44,0.17l-0.35,0.35l-0.32,2.47l-4.32,-0.64l-0.44,0.29l-0.58,2.11l-2.45,0.2l-4.15,7.68l-3.88,5.76l0.78,1.62l-0.64,1.16l-2.24,-0.06l-0.38,0.24l-1.66,3.89l0.15,5.17l1.57,2.04l-0.78,4.16l-2.02,2.48l-0.85,1.63l-1.3,-1.75l-0.58,-0.07l-4.87,4.19l-3.1,0.79l-3.16,-1.7l-0.85,-3.77l-0.77,-8.55l2.14,-2.31l6.55,-3.27l5.02,-4.17l10.63,-13.84l10.98,-8.7l5.35,-1.91l4.34,0.12l3.69,-3.64l4.49,0.19l4.37,-0.89ZM484.55,20.04l4.26,1.75l-3.1,2.55l-7.1,0.65l-7.08,-0.9l-0.37,-1.31l-0.37,-0.29l-3.44,-0.1l-2.08,-2.0l6.87,-1.44l3.9,1.31l2.39,-1.64l6.13,1.4ZM481.69,33.93l-4.45,1.74l-3.54,-0.99l1.12,-0.9l0.05,-0.58l-1.06,-1.22l4.22,-0.89l1.09,1.97l2.57,0.87ZM466.44,24.04l7.43,3.77l-5.41,1.86l-1.58,4.08l-2.26,1.2l-1.12,4.11l-2.61,0.18l-4.79,-2.86l1.84,-1.54l-0.1,-0.68l-3.69,-1.53l-4.77,-4.51l-1.73,-3.89l6.11,-1.82l1.54,1.92l3.57,-0.08l1.2,-1.96l3.32,-0.18l3.05,1.92Z",name:"Norway"},NA:{path:"M474.26,330.66l-0.97,0.04l-0.38,0.4l-0.07,8.9l-2.09,0.08l-0.39,0.4l-0.0,17.42l-1.98,1.23l-1.17,0.17l-2.44,-0.66l-0.48,-1.13l-0.99,-0.74l-0.54,0.05l-0.9,1.01l-1.53,-1.68l-0.93,-1.88l-1.99,-8.56l-0.06,-3.12l-0.33,-1.52l-2.3,-3.34l-1.91,-4.83l-1.96,-2.43l-0.12,-1.57l2.33,-0.79l1.43,0.07l1.81,1.13l10.23,-0.25l1.84,1.23l5.87,0.35ZM474.66,330.64l6.51,-1.6l1.9,0.39l-1.69,0.4l-1.31,0.83l-1.12,-0.94l-4.29,0.92Z",name:"Namibia"},NC:{path:"M838.78,341.24l-0.33,0.22l-2.9,-1.75l-3.26,-3.37l1.65,0.83l4.85,4.07Z",name:"New Caledonia"},NE:{path:"M454.75,226.53l1.33,1.37l0.48,0.07l1.27,-0.7l0.53,3.52l0.94,0.83l0.17,0.92l0.81,0.69l-0.44,0.95l-0.96,5.26l-0.13,3.22l-3.04,2.31l-1.22,3.57l1.02,1.24l-0.0,1.46l0.39,0.4l1.13,0.04l-0.9,1.25l-1.47,-2.42l-0.86,-0.29l-2.09,1.37l-1.74,-0.67l-1.45,-0.17l-0.85,0.35l-1.36,-0.07l-1.64,1.09l-1.06,0.05l-2.94,-1.28l-1.44,0.59l-1.01,-0.03l-0.97,-0.94l-2.7,-0.98l-2.69,0.3l-0.87,0.64l-0.47,1.6l-0.75,1.16l-0.12,1.53l-1.57,-1.1l-1.31,0.24l0.03,-0.81l-0.32,-0.41l-2.59,-0.52l-0.15,-1.16l-1.35,-1.6l-0.29,-1.0l0.13,-0.84l1.29,-0.08l1.08,-0.92l3.31,-0.22l2.22,-0.41l0.32,-0.34l0.2,-1.47l1.39,-1.88l-0.01,-5.66l3.36,-1.12l7.24,-5.12l8.42,-4.92l3.69,1.06Z",name:"Niger"},NG:{path:"M456.32,253.89l0.64,0.65l-0.28,1.04l-2.11,2.01l-2.03,5.18l-1.37,1.16l-1.15,3.18l-1.33,0.66l-1.46,-0.97l-1.21,0.16l-1.38,1.36l-0.91,0.24l-1.79,4.06l-2.33,0.81l-1.11,-0.07l-0.86,0.5l-1.71,-0.05l-1.19,-1.39l-0.89,-1.89l-1.77,-1.66l-3.95,-0.08l0.07,-5.21l0.42,-1.43l1.95,-2.3l-0.14,-0.91l0.43,-1.18l-0.53,-1.41l0.25,-2.92l0.72,-1.07l0.32,-1.34l0.46,-0.39l2.47,-0.28l2.34,0.89l1.15,1.02l1.28,0.04l1.22,-0.58l3.03,1.27l1.49,-0.14l1.36,-1.0l1.33,0.07l0.82,-0.35l3.45,0.8l1.82,-1.32l1.84,2.67l0.66,0.16Z",name:"Nigeria"},NZ:{path:"M857.8,379.65l1.86,3.12l0.44,0.18l0.3,-0.38l0.03,-1.23l0.38,0.27l0.57,2.31l2.02,0.94l1.81,0.27l1.57,-1.06l0.7,0.18l-1.15,3.59l-1.98,0.11l-0.74,1.2l0.2,1.11l-2.42,3.98l-1.49,0.92l-1.04,-0.85l1.21,-2.05l-0.81,-2.01l-2.63,-1.25l0.04,-0.57l1.82,-1.19l0.43,-2.34l-0.16,-2.03l-0.95,-1.82l-0.06,-0.72l-3.11,-3.64l-0.79,-1.52l1.56,1.45l1.76,0.66l0.65,2.34ZM853.83,393.59l0.57,1.24l0.59,0.16l1.42,-0.97l0.46,0.79l0.0,1.03l-2.47,3.48l-1.26,1.2l-0.06,0.5l0.55,0.87l-1.41,0.07l-2.33,1.38l-2.03,5.02l-3.02,2.16l-2.06,-0.06l-1.71,-1.04l-2.47,-0.2l-0.27,-0.73l1.22,-2.1l3.05,-2.94l1.62,-0.59l4.02,-2.82l1.57,-1.67l1.07,-2.16l0.88,-0.7l0.48,-1.75l1.24,-0.97l0.35,0.79Z",name:"New Zealand"},NP:{path:"M641.14,213.62l0.01,3.19l-1.74,0.04l-4.8,-0.86l-1.58,-1.39l-3.37,-0.34l-7.65,-3.7l0.8,-2.09l2.33,-1.7l1.77,0.75l2.49,1.76l1.38,0.41l0.99,1.35l1.9,0.52l1.99,1.17l5.49,0.9Z",name:"Nepal"},CI:{path:"M407.4,259.27l0.86,0.42l0.56,0.9l1.13,0.53l1.19,-0.61l0.97,-0.08l1.42,0.54l0.6,3.24l-1.03,2.08l-0.65,2.84l1.06,2.33l-0.06,0.53l-2.54,-0.47l-1.66,0.03l-3.06,0.46l-4.11,1.6l0.32,-3.06l-1.18,-1.31l-1.32,-0.66l0.42,-0.85l-0.2,-1.4l0.5,-0.67l0.01,-1.59l0.84,-0.32l0.26,-0.5l-1.15,-3.01l0.12,-0.5l0.51,-0.25l0.66,0.31l1.93,0.02l0.67,-0.71l0.71,-0.14l0.25,0.69l0.57,0.22l1.4,-0.61Z",name:"Côte d'Ivoire"},CH:{path:"M444.62,156.35l-0.29,0.87l0.18,0.53l1.13,0.58l1.0,0.1l-0.1,0.65l-0.79,0.38l-1.72,-0.37l-0.45,0.23l-0.45,1.04l-0.75,0.06l-0.84,-0.4l-1.32,1.0l-0.96,0.12l-0.88,-0.55l-0.81,-1.3l-0.49,-0.16l-0.63,0.26l0.02,-0.65l1.71,-1.66l0.1,-0.56l0.93,0.08l0.58,-0.46l1.99,0.02l0.66,-0.61l2.19,0.79Z",name:"Switzerland"},CO:{path:"M242.07,254.93l-1.7,0.59l-0.59,1.18l-1.7,1.69l-0.38,1.93l-0.67,1.43l0.31,0.57l1.03,0.13l0.25,0.9l0.57,0.64l-0.04,2.34l1.64,1.42l3.16,-0.24l1.26,0.28l1.67,2.06l0.41,0.13l4.09,-0.39l0.45,0.22l-0.92,1.95l-0.2,1.8l0.52,1.83l0.75,1.05l-1.12,1.1l0.07,0.63l0.84,0.51l0.74,1.29l-0.39,-0.45l-0.59,-0.01l-0.71,0.74l-4.71,-0.05l-0.4,0.41l0.03,1.57l0.33,0.39l1.11,0.2l-1.68,0.4l-0.29,0.38l-0.01,1.82l1.16,1.14l0.34,1.25l-1.05,7.05l-1.04,-0.87l1.26,-1.99l-0.13,-0.56l-2.18,-1.23l-1.38,0.2l-1.14,-0.38l-1.27,0.61l-1.55,-0.26l-1.38,-2.46l-1.23,-0.75l-0.85,-1.2l-1.67,-1.19l-0.86,0.13l-2.11,-1.32l-1.01,0.31l-1.8,-0.29l-0.52,-0.91l-3.09,-1.68l0.77,-0.52l-0.1,-1.12l0.41,-0.64l1.34,-0.32l2.0,-2.88l-0.11,-0.57l-0.66,-0.43l0.39,-1.38l-0.52,-2.1l0.49,-0.83l-0.4,-2.13l-0.97,-1.35l0.17,-0.66l0.86,-0.08l0.47,-0.75l-0.46,-1.63l1.41,-0.07l1.8,-1.69l0.93,-0.24l0.3,-0.38l0.45,-2.76l1.22,-1.0l1.44,-0.04l0.45,-0.5l1.91,0.12l2.93,-1.84l1.15,-1.14l0.91,0.46l-0.25,0.45Z",name:"Colombia"},CN:{path:"M740.23,148.97l4.57,1.3l2.8,2.17l0.98,2.9l0.38,0.27l3.8,0.0l2.32,-1.28l3.29,-0.75l-0.96,2.09l-1.02,1.28l-0.85,3.4l-1.52,2.73l-2.76,-0.5l-2.4,1.13l-0.21,0.45l0.64,2.57l-0.32,3.2l-0.94,0.06l-0.37,0.89l-0.91,-1.01l-0.64,0.07l-0.92,1.57l-3.73,1.25l-0.26,0.48l0.26,1.06l-1.5,-0.08l-1.09,-0.86l-0.56,0.06l-1.67,2.06l-2.7,1.56l-2.03,1.88l-3.4,0.83l-1.93,1.4l-1.15,0.34l0.33,-0.7l-0.41,-0.89l1.79,-1.79l0.02,-0.54l-1.32,-1.56l-0.48,-0.1l-2.24,1.09l-2.83,2.06l-1.51,1.83l-2.28,0.13l-1.55,1.49l-0.04,0.5l1.32,1.97l2.0,0.58l0.31,1.35l1.98,0.84l3.0,-1.96l2.0,1.02l1.49,0.11l0.22,0.83l-3.37,0.86l-1.12,1.48l-2.5,1.52l-1.29,1.99l0.14,0.56l2.57,1.48l0.97,2.7l3.17,4.63l-0.03,1.66l-1.35,0.65l-0.2,0.51l0.6,1.47l1.4,0.91l-0.89,3.82l-1.43,0.38l-3.85,6.44l-2.27,3.11l-6.78,4.57l-2.73,0.29l-1.45,1.04l-0.62,-0.61l-0.55,-0.01l-1.36,1.25l-3.39,1.27l-2.61,0.4l-1.1,2.79l-0.81,0.09l-0.49,-1.42l0.5,-0.85l-0.25,-0.59l-3.36,-0.84l-1.3,0.4l-2.31,-0.62l-0.94,-0.84l0.33,-1.28l-0.3,-0.49l-2.19,-0.46l-1.13,-0.93l-0.47,-0.02l-2.06,1.36l-4.29,0.28l-2.76,1.05l-0.28,0.43l0.32,2.53l-0.59,-0.03l-0.19,-1.34l-0.55,-0.34l-1.68,0.7l-2.46,-1.23l0.62,-1.87l-0.26,-0.51l-1.37,-0.44l-0.54,-2.22l-0.45,-0.3l-2.13,0.35l0.24,-2.48l2.39,-2.4l0.03,-4.31l-1.19,-0.92l-0.78,-1.49l-0.41,-0.21l-1.41,0.19l-1.98,-0.3l0.46,-1.07l-1.17,-1.7l-0.55,-0.11l-1.63,1.05l-2.25,-0.57l-2.89,1.73l-2.25,1.98l-1.75,0.29l-1.17,-0.71l-3.31,-0.65l-1.48,0.79l-1.04,1.27l-0.12,-1.17l-0.54,-0.34l-1.44,0.54l-5.55,-0.86l-1.98,-1.16l-1.89,-0.54l-0.99,-1.35l-1.34,-0.37l-2.55,-1.79l-2.01,-0.84l-1.21,0.56l-5.57,-3.45l-0.53,-2.31l1.19,0.25l0.48,-0.37l0.08,-1.42l-0.98,-1.56l0.15,-2.44l-2.69,-3.32l-4.12,-1.23l-0.67,-2.0l-1.92,-1.48l-0.38,-0.7l-0.51,-3.01l-1.52,-0.66l-0.7,0.13l-0.48,-2.05l0.55,-0.51l-0.09,-0.82l2.03,-1.19l1.6,-0.54l2.56,0.38l0.42,-0.22l0.85,-1.7l3.0,-0.33l1.1,-1.26l4.05,-1.77l0.39,-0.91l-0.17,-1.44l1.45,-0.67l0.2,-0.52l-2.07,-4.9l4.51,-1.12l1.37,-0.73l1.89,-5.51l4.98,0.86l1.51,-1.7l0.11,-2.87l1.99,-0.38l1.83,-2.06l0.49,-0.13l0.68,2.08l2.23,1.77l3.44,1.16l1.55,2.29l-0.92,3.49l0.96,1.67l6.54,1.13l2.95,1.87l1.47,0.35l1.06,2.62l1.53,1.91l3.05,0.08l5.14,0.67l3.37,-0.41l2.36,0.43l3.65,1.8l3.06,0.04l1.45,0.88l2.87,-1.59l3.95,-1.02l3.83,-0.14l3.06,-1.14l1.77,-1.6l1.72,-1.01l0.17,-0.49l-1.1,-2.05l1.02,-1.54l4.02,0.8l2.45,-1.61l3.76,-1.19l1.96,-2.13l1.63,-0.83l3.51,-0.4l1.92,0.34l0.46,-0.3l0.17,-1.5l-2.27,-2.22l-2.11,-1.09l-2.18,1.11l-2.32,-0.47l-1.29,0.32l-0.4,-0.82l2.73,-5.16l3.02,1.06l3.53,-2.06l0.18,-1.68l2.16,-3.35l1.49,-1.35l-0.03,-1.85l-1.07,-0.85l1.54,-1.26l2.98,-0.59l3.23,-0.09l3.64,0.99l2.04,1.16l3.29,6.71l0.92,3.19ZM696.92,237.31l-1.87,1.08l-1.63,-0.64l-0.06,-1.79l1.03,-0.98l2.58,-0.69l1.16,0.05l0.3,0.54l-0.98,1.06l-0.53,1.37Z",name:"China"},CM:{path:"M457.92,257.49l1.05,1.91l-1.4,0.16l-1.05,-0.23l-0.45,0.22l-0.54,1.19l0.08,0.45l1.48,1.47l1.05,0.45l1.01,2.46l-1.52,2.99l-0.68,0.68l-0.13,3.69l2.38,3.84l1.09,0.8l0.24,2.48l-3.67,-1.14l-11.27,-0.13l0.23,-1.79l-0.98,-1.66l-1.19,-0.54l-0.44,-0.97l-0.6,-0.42l1.71,-4.27l0.75,-0.13l1.38,-1.36l0.65,-0.03l1.71,0.99l1.93,-1.12l1.14,-3.18l1.38,-1.17l2.0,-5.14l2.17,-2.13l0.3,-1.64l-0.86,-0.88l0.03,-0.33l0.94,1.28l0.07,3.22Z",name:"Cameroon"},CL:{path:"M246.5,429.18l-3.14,1.83l-0.57,3.16l-0.64,0.05l-2.68,-1.06l-2.82,-2.33l-3.04,-1.89l-0.69,-1.85l0.63,-2.14l-1.21,-2.11l-0.31,-5.37l1.01,-2.91l2.57,-2.38l-0.18,-0.68l-3.16,-0.77l2.05,-2.47l0.77,-4.65l2.32,0.9l0.54,-0.29l1.31,-6.31l-0.22,-0.44l-1.68,-0.8l-0.56,0.28l-0.7,3.36l-0.81,-0.22l1.56,-9.41l1.15,-2.24l-0.71,-2.82l-0.18,-2.84l1.01,-0.33l3.26,-9.14l1.07,-4.22l-0.56,-4.21l0.74,-2.34l-0.29,-3.27l1.46,-3.34l2.04,-16.59l-0.66,-7.76l1.03,-0.53l0.54,-0.9l0.79,1.14l0.32,1.78l1.25,1.16l-0.69,2.55l1.33,2.9l0.97,3.59l0.46,0.29l1.5,-0.3l0.11,0.23l-0.76,2.44l-2.57,1.23l-0.23,0.37l0.08,4.33l-0.46,0.77l0.56,1.21l-1.58,1.51l-1.68,2.62l-0.89,2.47l0.2,2.7l-1.48,2.73l1.12,5.09l0.64,0.61l-0.01,2.29l-1.38,2.68l0.01,2.4l-1.89,2.04l0.02,2.75l0.69,2.57l-1.43,1.13l-1.26,5.68l0.39,3.51l-0.97,0.89l0.58,3.5l1.02,1.14l-0.65,1.02l0.15,0.57l1.0,0.53l0.16,0.69l-1.03,0.85l0.26,1.75l-0.89,4.03l-1.31,2.66l0.24,1.75l-0.71,1.83l-1.99,1.7l0.3,3.67l0.88,1.19l1.58,0.01l0.01,2.21l1.04,1.95l5.98,0.63ZM248.69,430.79l0.0,7.33l0.4,0.4l3.52,0.05l-0.44,0.75l-1.94,0.98l-2.49,-0.37l-1.88,-1.06l-2.55,-0.49l-5.59,-3.71l-2.38,-2.63l4.1,2.48l3.32,1.23l0.45,-0.12l1.29,-1.57l0.83,-2.32l2.05,-1.24l1.31,0.29Z",name:"Chile"},CA:{path:"M280.06,145.6l-1.67,2.88l0.07,0.49l0.5,0.04l1.46,-0.98l1.0,0.42l-0.56,0.72l0.17,0.62l2.22,0.89l1.35,-0.71l1.95,0.78l-0.66,2.01l0.5,0.51l1.32,-0.42l0.98,3.17l-0.91,2.41l-0.8,0.08l-1.23,-0.45l0.47,-2.25l-0.89,-0.83l-0.48,0.06l-2.78,2.63l-0.34,-0.02l1.02,-0.85l-0.14,-0.69l-2.4,-0.77l-7.4,0.08l-0.17,-0.41l1.3,-0.94l0.02,-0.64l-0.73,-0.58l1.85,-1.74l2.57,-5.16l1.47,-1.79l1.99,-1.05l0.46,0.06l-1.53,2.45ZM68.32,74.16l4.13,0.95l4.02,2.14l2.61,0.4l2.47,-1.89l2.88,-1.31l3.85,0.48l3.71,-1.94l3.82,-1.04l1.56,1.68l0.49,0.08l1.87,-1.04l0.65,-1.98l1.24,0.35l4.16,3.94l0.54,0.01l2.75,-2.49l0.26,2.59l0.49,0.35l3.08,-0.73l1.04,-1.27l2.73,0.23l3.83,1.86l5.86,1.61l3.47,0.75l2.44,-0.26l2.73,1.78l-2.98,1.81l-0.19,0.41l0.31,0.32l4.53,0.92l6.87,-0.5l2.0,-0.69l2.49,2.39l0.53,0.02l2.72,-2.16l-0.02,-0.64l-2.16,-1.54l1.15,-1.06l4.83,-0.61l1.84,0.95l2.48,2.31l3.01,-0.23l4.55,1.92l3.85,-0.67l3.61,0.1l0.41,-0.44l-0.25,-2.36l1.79,-0.61l3.49,1.32l-0.01,3.77l0.31,0.39l0.45,-0.22l1.48,-3.16l1.74,0.1l0.41,-0.3l1.13,-4.37l-2.78,-3.11l-2.8,-1.74l0.19,-4.64l2.71,-3.07l2.98,0.67l2.41,1.95l3.19,4.8l-1.99,1.97l0.21,0.68l4.33,0.84l-0.01,4.15l0.25,0.37l0.44,-0.09l3.07,-3.15l2.54,2.39l-0.61,3.33l2.42,2.88l0.61,0.0l2.61,-3.08l1.88,-3.82l0.17,-4.58l6.72,0.94l3.13,2.04l0.13,1.82l-1.76,2.19l-0.01,0.49l1.66,2.16l-0.26,1.71l-4.68,2.8l-3.28,0.61l-2.47,-1.2l-0.55,0.23l-0.73,2.04l-2.38,3.43l-0.74,1.77l-2.74,2.57l-3.44,0.25l-2.21,1.78l-0.28,2.53l-2.82,0.55l-3.12,3.22l-2.72,4.31l-1.03,3.17l-0.14,4.31l0.33,0.41l3.44,0.57l2.24,5.95l0.45,0.23l3.4,-0.69l4.52,1.51l2.43,1.31l1.91,1.73l3.1,0.96l2.62,1.46l6.6,0.54l-0.35,2.74l0.81,3.53l1.81,3.78l3.83,3.3l0.45,0.04l2.1,-1.28l1.37,-3.69l-1.31,-5.38l-1.45,-1.58l3.57,-1.47l2.84,-2.46l1.52,-2.8l-0.25,-2.55l-1.7,-3.07l-2.85,-2.61l2.8,-3.95l-1.08,-3.37l-0.79,-5.67l1.36,-0.7l6.76,1.41l2.12,-0.96l5.12,3.36l1.05,1.61l4.08,0.26l-0.06,2.87l0.83,4.7l0.3,0.32l2.16,0.54l1.73,2.06l0.5,0.09l3.63,-2.03l2.52,-4.19l1.26,-1.32l7.6,11.72l-0.92,2.04l0.16,0.51l3.3,1.97l2.22,1.98l4.1,0.98l1.43,0.99l0.95,2.79l2.1,0.68l0.84,1.08l0.17,3.45l-3.37,2.26l-4.22,1.24l-3.06,2.63l-4.06,0.51l-5.35,-0.69l-6.39,0.2l-2.3,2.41l-3.26,1.51l-6.47,7.15l-0.06,0.48l0.44,0.19l2.13,-0.52l4.17,-4.24l5.12,-2.62l3.52,-0.3l1.69,1.21l-2.12,2.21l0.81,3.47l1.02,2.61l3.47,1.6l4.14,-0.45l2.15,-2.8l0.26,1.48l1.14,0.8l-2.56,1.69l-5.5,1.82l-2.54,1.27l-2.74,2.15l-1.4,-0.16l-0.07,-2.01l4.14,-2.44l0.18,-0.45l-0.39,-0.29l-6.63,0.45l-1.39,-1.49l-0.14,-4.43l-1.11,-0.91l-1.82,0.39l-0.66,-0.66l-0.6,0.03l-1.91,2.39l-0.82,2.52l-0.8,1.27l-1.67,0.56l-0.46,0.76l-8.31,0.07l-1.21,0.62l-2.35,1.97l-0.71,-0.14l-1.37,0.96l-1.12,-0.48l-4.74,1.26l-0.9,1.17l0.21,0.62l1.73,0.3l-1.81,0.31l-1.85,0.81l-2.11,-0.13l-2.95,1.78l-0.69,-0.09l1.39,-2.1l1.73,-1.21l0.1,-2.29l1.16,-1.99l0.49,0.53l2.03,0.42l1.2,-1.16l0.02,-0.47l-2.66,-3.51l-2.28,-0.61l-5.64,-0.71l-0.4,-0.57l-0.79,0.13l0.2,-0.41l-0.22,-0.55l-0.68,-0.26l0.19,-1.26l-0.78,-0.73l0.31,-0.64l-0.29,-0.57l-2.6,-0.44l-0.75,-1.63l-0.94,-0.66l-4.31,-0.65l-1.13,1.19l-1.48,0.59l-0.85,1.06l-2.83,-0.76l-2.09,0.39l-2.39,-0.97l-4.24,-0.7l-0.57,-0.4l-0.41,-1.63l-0.4,-0.3l-0.85,0.02l-0.39,0.4l-0.01,0.85l-69.13,-0.01l-6.51,-4.52l-4.5,-1.38l-1.26,-2.66l0.33,-1.93l-0.23,-0.43l-3.01,-1.35l-0.55,-2.77l-2.89,-2.38l-0.04,-1.45l1.39,-1.83l-0.28,-2.55l-4.16,-2.2l-4.07,-6.6l-4.02,-3.22l-1.3,-1.88l-0.5,-0.13l-2.51,1.21l-2.23,1.87l-3.85,-3.88l-2.44,-1.04l-2.22,-0.13l0.03,-37.49ZM260.37,148.65l3.04,0.76l2.26,1.2l-3.78,-0.95l-1.53,-1.01ZM249.4,3.81l6.68,0.49l5.32,0.79l4.26,1.57l-0.07,1.1l-5.85,2.53l-6.02,1.21l-2.39,1.39l-0.18,0.45l0.39,0.29l4.01,-0.02l-4.65,2.82l-4.2,1.74l-4.19,4.59l-5.03,0.92l-1.67,1.15l-7.47,0.59l-0.37,0.37l0.32,0.42l2.41,0.49l-0.81,0.47l-0.12,0.59l1.83,2.41l-2.02,1.59l-3.81,1.51l-1.32,2.16l-3.38,1.53l-0.22,0.48l0.35,1.19l0.4,0.29l3.88,-0.18l0.03,0.61l-6.33,2.95l-6.41,-1.4l-7.43,0.79l-3.72,-0.62l-4.4,-0.25l-0.23,-1.83l4.29,-1.11l0.28,-0.51l-1.1,-3.45l1.0,-0.25l6.58,2.28l0.47,-0.16l-0.05,-0.49l-3.41,-3.45l-3.58,-0.98l1.48,-1.55l4.34,-1.29l0.97,-2.19l-0.16,-0.48l-3.42,-2.13l-0.81,-2.26l6.2,0.22l2.24,0.58l3.91,-2.1l0.2,-0.43l-0.35,-0.32l-5.64,-0.67l-8.73,0.36l-4.26,-1.9l-2.12,-2.4l-2.78,-1.66l-0.41,-1.52l3.31,-1.03l2.93,-0.2l4.91,-0.99l3.7,-2.27l2.87,0.3l2.62,1.67l0.56,-0.14l1.82,-3.2l3.13,-0.94l4.44,-0.69l7.53,-0.26l1.48,0.67l7.19,-1.06l10.8,0.79ZM203.85,57.54l0.01,0.42l1.97,2.97l0.68,-0.02l2.24,-3.72l5.95,-1.86l4.01,4.64l-0.35,2.91l0.5,0.43l4.95,-1.36l2.32,-1.8l5.31,2.28l3.27,2.11l0.3,1.84l0.48,0.33l4.42,-0.99l2.64,2.87l5.97,1.77l2.06,1.72l2.11,3.71l-4.19,1.86l-0.01,0.73l5.9,2.83l3.94,0.94l3.78,3.95l3.46,0.25l-0.63,2.37l-4.11,4.47l-2.76,-1.56l-3.9,-3.94l-3.59,0.41l-0.33,0.34l-0.19,2.72l2.63,2.38l3.42,1.89l0.94,0.97l1.55,3.75l-0.7,2.29l-2.74,-0.92l-6.25,-3.15l-0.51,0.13l0.05,0.52l6.07,5.69l0.18,0.59l-6.09,-1.39l-5.31,-2.24l-2.63,-1.66l0.6,-0.77l-0.12,-0.6l-7.39,-4.01l-0.59,0.37l0.03,0.79l-6.73,0.6l-1.69,-1.1l1.36,-2.46l4.51,-0.07l5.15,-0.52l0.31,-0.6l-0.74,-1.3l0.78,-1.84l3.21,-4.05l-0.67,-2.35l-1.11,-1.6l-3.84,-2.1l-4.35,-1.28l0.91,-0.63l0.06,-0.61l-2.65,-2.75l-2.34,-0.36l-1.89,-1.46l-0.53,0.03l-1.24,1.23l-4.36,0.55l-9.04,-0.99l-9.26,-1.98l-1.6,-1.22l2.22,-1.77l0.13,-0.44l-0.38,-0.27l-3.22,-0.02l-0.72,-4.25l1.83,-4.04l2.42,-1.85l5.5,-1.1l-1.39,2.35ZM261.19,159.33l2.07,0.61l1.44,-0.04l-1.15,0.63l-2.94,-1.23l-0.4,-0.68l0.36,-0.37l0.61,1.07ZM230.83,84.39l-2.37,0.18l-0.49,-1.63l0.93,-2.09l1.94,-0.51l1.62,0.99l0.02,1.52l-1.66,1.54ZM229.43,58.25l0.11,0.65l-4.87,-0.21l-2.72,0.62l-3.1,-2.57l0.08,-1.26l0.86,-0.23l5.57,0.51l4.08,2.5ZM222.0,105.02l-0.72,1.49l-0.63,-0.19l-0.48,-0.84l0.81,-0.99l0.65,0.05l0.37,0.46ZM183.74,38.32l2.9,1.7l4.79,-0.01l1.84,1.46l-0.49,1.68l0.23,0.48l2.82,1.14l1.76,1.26l7.01,0.65l4.1,-1.1l5.03,-0.43l3.93,0.35l2.48,1.77l0.46,1.7l-1.3,1.1l-3.56,1.01l-3.23,-0.59l-7.17,0.76l-5.09,0.09l-3.99,-0.6l-6.42,-1.54l-0.79,-2.51l-0.3,-2.49l-2.64,-2.5l-5.32,-0.72l-2.52,-1.4l0.68,-1.57l4.78,0.31ZM207.38,91.35l0.4,1.56l0.56,0.26l1.06,-0.52l1.32,0.96l5.42,2.57l0.2,1.68l0.46,0.35l1.68,-0.28l1.15,0.85l-1.55,0.87l-3.61,-0.88l-1.32,-1.69l-0.57,-0.06l-2.45,2.1l-3.12,1.79l-0.7,-1.87l-0.42,-0.26l-2.16,0.24l1.39,-1.39l0.32,-3.14l0.76,-3.35l1.18,0.22ZM215.49,102.6l-2.67,1.95l-1.4,-0.07l-0.3,-0.58l1.53,-1.48l2.84,0.18ZM202.7,24.12l2.53,1.59l-2.87,1.4l-4.53,4.05l-4.25,0.38l-5.03,-0.68l-2.45,-2.04l0.03,-1.62l1.82,-1.37l0.14,-0.45l-0.38,-0.27l-4.45,0.04l-2.59,-1.76l-1.41,-2.29l1.57,-2.32l1.62,-1.66l2.44,-0.39l0.25,-0.65l-0.6,-0.74l4.86,-0.25l3.24,3.11l8.16,2.3l1.9,3.61ZM187.47,59.2l-2.76,3.49l-2.38,-0.15l-1.44,-3.84l0.04,-2.2l1.19,-1.88l2.3,-1.23l5.07,0.17l4.11,1.02l-3.24,3.72l-2.88,0.89ZM186.07,48.79l-1.08,1.53l-3.34,-0.34l-2.56,-1.1l1.03,-1.75l3.25,-1.23l1.95,1.58l0.75,1.3ZM185.71,35.32l-5.3,-0.2l-0.32,-0.71l4.31,0.07l1.3,0.84ZM180.68,32.48l-3.34,1.0l-1.79,-1.1l-0.98,-1.87l-0.15,-1.73l4.1,0.53l2.67,1.7l-0.51,1.47ZM180.9,76.31l-1.1,1.08l-3.13,-1.23l-2.12,0.43l-2.71,-1.57l1.72,-1.09l1.55,-1.72l3.81,1.9l1.98,2.2ZM169.74,54.87l2.96,0.97l4.17,-0.57l0.41,0.88l-2.14,2.11l0.09,0.64l3.55,1.92l-0.4,3.72l-3.79,1.65l-2.17,-0.35l-1.72,-1.74l-6.02,-3.5l0.03,-0.85l4.68,0.54l0.4,-0.21l-0.05,-0.45l-2.48,-2.81l2.46,-1.95ZM174.45,40.74l1.37,1.73l0.07,2.44l-1.05,3.45l-3.79,0.47l-2.32,-0.69l0.05,-2.64l-0.44,-0.41l-3.68,0.35l-0.12,-3.1l2.45,0.1l3.67,-1.73l3.41,0.29l0.37,-0.26ZM170.05,31.55l0.67,1.56l-3.33,-0.49l-4.22,-1.77l-4.35,-0.16l1.4,-0.94l-0.06,-0.7l-2.81,-1.23l-0.12,-1.39l4.39,0.68l6.62,1.98l1.81,2.47ZM134.5,58.13l-1.02,1.82l0.45,0.58l5.4,-1.39l3.33,2.29l0.49,-0.03l2.6,-2.23l1.94,1.32l2.0,4.5l0.7,0.06l1.3,-2.29l-1.63,-4.46l1.69,-0.54l2.31,0.71l2.65,1.81l2.49,7.92l8.48,4.27l-0.19,1.35l-3.79,0.33l-0.26,0.67l1.4,1.49l-0.58,1.1l-4.23,-0.64l-4.43,-1.19l-3.0,0.28l-4.66,1.47l-10.52,1.04l-1.43,-2.02l-3.42,-1.2l-2.21,0.43l-2.51,-2.86l4.84,-1.05l3.6,0.19l3.27,-0.78l0.31,-0.39l-0.31,-0.39l-4.84,-1.06l-8.79,0.27l-0.85,-1.07l5.26,-1.66l0.27,-0.45l-0.4,-0.34l-3.8,0.06l-3.81,-1.06l1.81,-3.01l1.66,-1.79l6.48,-2.81l1.97,0.71ZM158.7,56.61l-1.7,2.44l-3.2,-2.75l0.37,-0.3l3.11,-0.18l1.42,0.79ZM149.61,42.73l1.01,1.89l0.5,0.18l2.14,-0.82l2.23,0.19l0.36,2.04l-1.33,2.09l-8.28,0.76l-6.35,2.15l-3.41,0.1l-0.19,-0.96l4.9,-2.08l0.23,-0.46l-0.41,-0.31l-11.25,0.59l-2.89,-0.74l3.04,-4.44l2.14,-1.32l6.81,1.69l4.58,3.06l4.37,0.39l0.36,-0.63l-3.36,-4.6l1.85,-1.53l2.18,0.51l0.77,2.26ZM144.76,34.41l-4.36,1.44l-3.0,-1.4l1.46,-1.24l3.47,-0.52l2.96,0.71l-0.52,1.01ZM145.13,29.83l-1.9,0.66l-3.67,-0.0l2.27,-1.61l3.3,0.95ZM118.92,65.79l-6.03,2.02l-1.33,-1.9l-5.38,-2.28l2.59,-5.05l2.16,-3.14l-0.02,-0.48l-1.97,-2.41l7.64,-0.7l3.6,1.02l6.3,0.27l4.42,2.95l-2.53,0.98l-6.24,3.43l-3.1,3.28l-0.11,2.01ZM129.54,35.53l-0.28,3.37l-1.72,1.62l-2.33,0.28l-4.61,2.19l-3.86,0.76l-2.64,-0.87l3.72,-3.4l5.01,-3.34l3.72,0.07l3.0,-0.67ZM111.09,152.69l-0.67,0.24l-3.85,-1.37l-0.83,-1.17l-2.12,-1.07l-0.66,-1.02l-2.4,-0.55l-0.74,-1.71l6.02,1.45l2.0,2.55l2.52,1.39l0.73,1.27ZM87.8,134.64l0.89,0.29l1.86,-0.21l-0.65,3.34l1.69,2.33l-1.31,-1.33l-0.99,-1.62l-1.17,-0.98l-0.33,-1.82Z",name:"Canada"},CG:{path:"M466.72,276.48l-0.1,1.03l-1.25,2.97l-0.19,3.62l-0.46,1.78l-0.23,0.63l-1.61,1.19l-1.21,1.39l-1.09,2.43l0.04,2.09l-3.25,3.24l-0.5,-0.24l-0.5,-0.83l-1.36,-0.02l-0.98,0.89l-1.68,-0.99l-1.54,1.24l-1.52,-1.96l1.57,-1.14l0.11,-0.52l-0.77,-1.35l2.1,-0.66l0.39,-0.73l1.05,0.82l2.21,0.11l1.12,-1.37l0.37,-1.81l-0.27,-2.09l-1.13,-1.5l1.0,-2.69l-0.13,-0.45l-0.92,-0.58l-1.6,0.17l-0.51,-0.94l0.1,-0.61l2.75,0.09l3.97,1.24l0.51,-0.33l0.17,-1.28l1.24,-2.21l1.28,-1.14l2.76,0.49Z",name:"Congo"},CF:{path:"M461.16,278.2l-0.26,-1.19l-1.09,-0.77l-0.84,-1.17l-0.29,-1.0l-1.04,-1.15l0.08,-3.43l0.58,-0.49l1.16,-2.35l1.85,-0.17l0.61,-0.62l0.97,0.58l3.15,-0.96l2.48,-1.92l0.02,-0.96l2.81,0.02l2.36,-1.17l1.93,-2.85l1.16,-0.93l1.11,-0.3l0.27,0.86l1.34,1.47l-0.39,2.01l0.3,1.01l4.01,2.75l0.17,0.93l2.63,2.31l0.6,1.44l2.08,1.4l-3.84,-0.21l-1.94,0.88l-1.23,-0.49l-2.67,1.2l-1.29,-0.18l-0.51,0.36l-0.6,1.22l-3.35,-0.65l-1.57,-0.91l-2.42,-0.83l-1.45,0.91l-0.97,1.27l-0.26,1.56l-3.22,-0.43l-1.49,1.33l-0.94,1.62Z",name:"Central African Rep."},CD:{path:"M487.01,272.38l2.34,-0.14l1.35,1.84l1.34,0.45l0.86,-0.39l1.21,0.12l1.07,-0.41l0.54,0.89l2.04,1.54l-0.14,2.72l0.7,0.54l-1.38,1.13l-1.53,2.54l-0.17,2.05l-0.59,1.08l-0.02,1.72l-0.72,0.84l-0.66,3.01l0.63,1.32l-0.44,4.26l0.64,1.47l-0.37,1.22l0.86,1.8l1.53,1.41l0.3,1.26l0.44,0.5l-4.08,0.75l-0.92,1.81l0.51,1.34l-0.74,5.43l0.17,0.38l2.45,1.46l0.54,-0.1l0.12,1.62l-1.28,-0.01l-1.85,-2.35l-1.94,-0.45l-0.48,-1.13l-0.55,-0.2l-1.41,0.74l-1.71,-0.3l-1.01,-1.18l-2.49,-0.19l-0.44,-0.77l-1.98,-0.21l-2.88,0.36l0.11,-2.41l-0.85,-1.13l-0.16,-1.36l0.32,-1.73l-0.46,-0.89l-0.04,-1.49l-0.4,-0.39l-2.53,0.02l0.1,-0.41l-0.39,-0.49l-1.28,0.01l-0.43,0.45l-1.62,0.32l-0.83,1.79l-1.09,-0.28l-2.4,0.52l-1.37,-1.91l-1.3,-3.3l-0.38,-0.27l-7.39,-0.03l-2.46,0.42l0.5,-0.45l0.37,-1.47l0.66,-0.38l0.92,0.08l0.73,-0.82l0.87,0.02l0.31,0.68l1.4,0.36l3.59,-3.63l0.01,-2.23l1.02,-2.29l2.69,-2.39l0.43,-0.99l0.49,-1.96l0.17,-3.51l1.25,-2.95l0.36,-3.14l0.86,-1.13l1.1,-0.66l3.57,1.73l3.65,0.73l0.46,-0.21l0.8,-1.46l1.24,0.19l2.61,-1.17l0.81,0.44l1.04,-0.03l0.59,-0.66l0.7,-0.16l1.81,0.25Z",name:"Dem. Rep. Congo"},CZ:{path:"M458.46,144.88l1.22,1.01l1.47,0.23l0.13,0.93l1.36,0.68l0.54,-0.2l0.24,-0.55l1.15,0.25l0.53,1.09l1.68,0.18l0.6,0.84l-1.04,0.73l-0.96,1.28l-1.6,0.17l-0.55,0.56l-1.04,-0.46l-1.05,0.15l-2.12,-0.96l-1.05,0.34l-1.2,1.12l-1.56,-0.87l-2.57,-2.1l-0.53,-1.88l4.7,-2.52l0.71,0.26l0.9,-0.28Z",name:"Czech Rep."},CY:{path:"M504.36,193.47l0.43,0.28l-1.28,0.57l-0.92,-0.28l-0.24,-0.46l2.01,-0.13Z",name:"Cyprus"},CR:{path:"M211.34,258.05l0.48,0.99l1.6,1.6l-0.54,0.45l0.29,1.42l-0.25,1.19l-1.09,-0.59l-0.05,-1.25l-2.46,-1.42l-0.28,-0.77l-0.66,-0.45l-0.45,-0.0l-0.11,1.04l-1.32,-0.95l0.31,-1.3l-0.36,-0.6l0.31,-0.27l1.42,0.58l1.29,-0.14l0.56,0.56l0.74,0.17l0.55,-0.27Z",name:"Costa Rica"},CU:{path:"M221.21,227.25l1.27,1.02l2.19,-0.28l4.43,3.33l2.08,0.43l-0.1,0.38l0.36,0.5l1.75,0.1l1.48,0.84l-3.11,0.51l-4.15,-0.03l0.77,-0.67l-0.04,-0.64l-1.2,-0.74l-1.49,-0.16l-0.7,-0.61l-0.56,-1.4l-0.4,-0.25l-1.34,0.1l-2.2,-0.66l-0.88,-0.58l-3.18,-0.4l-0.27,-0.16l0.58,-0.74l-0.36,-0.29l-2.72,-0.05l-1.7,1.29l-0.91,0.03l-0.61,0.69l-1.01,0.22l1.11,-1.29l1.01,-0.52l3.69,-1.01l3.98,0.21l2.21,0.84Z",name:"Cuba"},SZ:{path:"M500.35,351.36l0.5,2.04l-0.38,0.89l-1.05,0.21l-1.23,-1.2l-0.02,-0.64l0.83,-1.57l1.34,0.27Z",name:"Swaziland"},SY:{path:"M511.0,199.79l0.05,-1.33l0.54,-1.36l1.28,-0.99l0.13,-0.45l-0.41,-1.11l-1.14,-0.36l-0.19,-1.74l0.52,-1.0l1.29,-1.21l0.2,-1.18l0.59,0.23l2.62,-0.76l1.36,0.52l2.06,-0.01l2.95,-1.08l3.25,-0.26l-0.67,0.94l-1.28,0.66l-0.21,0.4l0.23,2.01l-0.88,3.19l-10.15,5.73l-2.15,-0.85Z",name:"Syria"},KG:{path:"M621.35,172.32l-3.87,1.69l-0.96,1.18l-3.04,0.34l-1.13,1.86l-2.36,-0.35l-1.99,0.63l-2.39,1.4l0.06,0.95l-0.4,0.37l-4.52,0.43l-3.02,-0.93l-2.37,0.17l0.11,-0.79l2.32,0.42l1.13,-0.88l1.99,0.2l3.21,-2.14l-0.03,-0.69l-2.97,-1.57l-1.94,0.65l-1.22,-0.74l1.71,-1.58l-0.12,-0.67l-0.36,-0.15l0.32,-0.77l1.36,-0.35l4.02,1.02l0.49,-0.3l0.35,-1.59l1.09,-0.48l3.42,1.22l1.11,-0.31l7.64,0.39l1.16,1.0l1.23,0.39Z",name:"Kyrgyzstan"},KE:{path:"M506.26,284.69l1.87,-2.56l0.93,-2.15l-1.38,-4.08l-1.06,-1.6l2.82,-2.75l0.79,0.26l0.12,1.41l0.86,0.83l1.9,0.11l3.28,2.13l3.57,0.44l1.05,-1.12l1.96,-0.9l0.82,0.68l1.16,0.09l-1.78,2.45l0.03,9.12l1.3,1.94l-1.37,0.78l-0.67,1.03l-1.08,0.46l-0.34,1.67l-0.81,1.07l-0.45,1.55l-0.68,0.56l-3.2,-2.23l-0.35,-1.58l-8.86,-4.98l0.14,-1.6l-0.57,-1.04Z",name:"Kenya"},SS:{path:"M481.71,263.34l1.07,-0.72l1.2,-3.18l1.36,-0.26l1.61,1.99l0.87,0.34l1.1,-0.41l1.5,0.07l0.57,0.53l2.49,0.0l0.44,-0.63l1.07,-0.4l0.45,-0.84l0.59,-0.33l1.9,1.33l1.6,-0.2l2.83,-3.33l-0.32,-2.21l1.59,-0.52l-0.24,1.6l0.3,1.83l1.35,1.18l0.2,1.87l0.35,0.41l0.02,1.53l-0.23,0.47l-1.42,0.25l-0.85,1.44l0.3,0.6l1.4,0.16l1.11,1.08l0.59,1.13l1.03,0.53l1.28,2.36l-4.41,3.98l-1.74,0.01l-1.89,0.55l-1.47,-0.52l-1.15,0.57l-2.96,-2.62l-1.3,0.49l-1.06,-0.15l-0.79,0.39l-0.82,-0.22l-1.8,-2.7l-1.91,-1.1l-0.66,-1.5l-2.62,-2.32l-0.18,-0.94l-2.37,-1.6Z",name:"S. Sudan"},SR:{path:"M283.12,270.19l2.1,0.53l-1.08,1.95l0.2,1.72l0.93,1.49l-0.59,2.03l-0.43,0.71l-1.12,-0.42l-1.32,0.22l-0.93,-0.2l-0.46,0.26l-0.25,0.73l0.33,0.7l-0.89,-0.13l-1.39,-1.97l-0.31,-1.34l-0.97,-0.31l-0.89,-1.47l0.35,-1.61l1.45,-0.82l0.33,-1.87l2.61,0.44l0.57,-0.47l1.75,-0.16Z",name:"Suriname"},KH:{path:"M689.52,249.39l0.49,1.45l-0.28,2.74l-4.0,1.86l-0.16,0.6l0.68,0.95l-2.06,0.17l-2.05,0.97l-1.82,-0.32l-2.12,-3.7l-0.55,-2.85l1.4,-1.85l3.02,-0.45l2.23,0.35l2.01,0.98l0.51,-0.14l0.95,-1.48l1.74,0.74Z",name:"Cambodia"},SV:{path:"M195.8,250.13l1.4,-1.19l2.24,1.45l0.98,-0.27l0.44,0.2l-0.27,1.05l-1.14,-0.03l-3.64,-1.21Z",name:"El Salvador"},SK:{path:"M476.82,151.17l-1.14,1.9l-2.73,-0.92l-0.82,0.2l-0.74,0.8l-3.46,0.73l-0.47,0.69l-1.76,0.33l-1.88,-1.0l-0.18,-0.81l0.38,-0.75l1.87,-0.32l1.74,-1.89l0.83,0.16l0.79,-0.34l1.51,1.04l1.34,-0.63l1.25,0.3l1.65,-0.42l1.81,0.95Z",name:"Slovakia"},KR:{path:"M737.51,185.84l0.98,-0.1l0.87,-1.17l2.69,-0.32l0.33,-0.29l1.76,2.79l0.58,1.76l0.02,3.12l-0.8,1.32l-2.21,0.55l-1.93,1.13l-1.8,0.19l-0.2,-1.1l0.43,-2.28l-0.95,-2.56l1.43,-0.37l0.23,-0.62l-1.43,-2.06Z",name:"Korea"},SI:{path:"M456.18,162.07l-0.51,-1.32l0.18,-1.05l1.69,0.2l1.42,-0.71l2.09,-0.07l0.62,-0.51l0.21,0.47l-1.61,0.67l-0.44,1.34l-0.66,0.24l-0.26,0.82l-1.22,-0.49l-0.84,0.46l-0.69,-0.04Z",name:"Slovenia"},KP:{path:"M736.77,185.16l-0.92,-0.42l-0.88,0.62l-1.21,-0.88l0.96,-1.15l0.59,-2.59l-0.46,-0.74l-2.09,-0.77l1.64,-1.52l2.72,-1.58l1.58,-1.91l1.11,0.78l2.17,0.11l0.41,-0.5l-0.3,-1.22l3.52,-1.18l0.94,-1.4l0.98,1.08l-2.19,2.18l0.01,2.14l-1.06,0.54l-1.41,1.4l-1.7,0.52l-1.25,1.09l-0.14,1.98l0.94,0.45l1.15,1.04l-0.13,0.26l-2.6,0.29l-1.13,1.29l-1.22,0.08Z",name:"Dem. Rep. Korea"},SO:{path:"M525.13,288.48l-1.13,-1.57l-0.03,-8.86l2.66,-3.38l1.67,-0.13l2.13,-1.69l3.41,-0.23l7.08,-7.55l2.91,-3.69l0.08,-4.82l2.98,-0.67l1.24,-0.86l0.45,-0.0l-0.2,3.0l-1.21,3.62l-2.73,5.97l-2.13,3.65l-5.03,6.16l-8.56,6.4l-2.78,3.08l-0.8,1.56Z",name:"Somalia"},SN:{path:"M390.09,248.21l0.12,1.55l0.49,1.46l0.96,0.82l0.05,1.28l-1.26,-0.19l-0.75,0.33l-1.84,-0.61l-5.84,-0.13l-2.54,0.51l-0.22,-1.03l1.77,0.04l2.01,-0.91l1.03,0.48l1.09,0.04l1.29,-0.62l0.14,-0.58l-0.51,-0.74l-1.81,0.25l-1.13,-0.63l-0.79,0.04l-0.72,0.61l-2.31,0.06l-0.92,-1.77l-0.81,-0.64l0.64,-0.35l2.46,-3.74l1.04,0.19l1.38,-0.56l1.19,-0.02l2.72,1.37l3.03,3.48Z",name:"Senegal"},SL:{path:"M394.46,264.11l-1.73,1.98l-0.58,1.33l-2.07,-1.06l-1.22,-1.26l-0.65,-2.39l1.16,-0.96l0.67,-1.17l1.21,-0.52l1.66,0.0l1.03,1.64l0.52,2.41Z",name:"Sierra Leone"},SB:{path:"M826.69,311.6l-0.61,0.09l-0.2,-0.33l0.37,0.15l0.44,0.09ZM824.18,307.38l-0.26,-0.3l-0.31,-0.91l0.03,0.0l0.54,1.21ZM823.04,309.33l-1.66,-0.22l-0.2,-0.52l1.16,0.28l0.69,0.46ZM819.28,304.68l1.14,0.65l0.02,0.03l-0.81,-0.44l-0.35,-0.23Z",name:"Solomon Is."},SA:{path:"M537.53,210.34l2.0,0.24l0.9,1.32l1.49,-0.06l0.87,2.08l1.29,0.76l0.51,0.99l1.56,1.03l-0.1,1.9l0.32,0.9l1.58,2.47l0.76,0.53l0.7,-0.04l1.68,4.23l7.53,1.33l0.51,-0.29l0.77,1.25l-1.55,4.87l-7.29,2.52l-7.3,1.03l-2.34,1.17l-1.88,2.74l-0.76,0.28l-0.82,-0.78l-0.91,0.12l-2.88,-0.51l-3.51,0.25l-0.86,-0.56l-0.57,0.15l-0.66,1.27l0.16,1.11l-0.43,0.32l-0.93,-1.4l-0.33,-1.16l-1.23,-0.88l-1.27,-2.06l-0.78,-2.22l-1.73,-1.79l-1.14,-0.48l-1.54,-2.31l-0.21,-3.41l-1.44,-2.93l-1.27,-1.16l-1.33,-0.57l-1.31,-3.37l-0.77,-0.67l-0.97,-1.97l-2.8,-4.03l-1.06,-0.17l0.37,-1.96l0.2,-0.72l2.74,0.3l1.08,-0.84l0.6,-0.94l1.74,-0.35l0.65,-1.03l0.71,-0.4l0.1,-0.62l-2.06,-2.28l4.39,-1.22l0.48,-0.37l2.77,0.69l3.66,1.9l7.03,5.5l4.87,0.3Z",name:"Saudi Arabia"},SE:{path:"M480.22,89.3l-4.03,1.17l-2.43,2.86l0.26,2.57l-8.77,6.64l-1.78,5.79l1.78,2.68l2.22,1.96l-2.07,3.77l-2.72,1.13l-0.95,6.04l-1.29,3.01l-2.74,-0.31l-0.4,0.22l-1.31,2.59l-2.34,0.13l-0.75,-3.09l-2.08,-4.03l-1.83,-4.96l1.0,-1.93l2.14,-2.7l0.83,-4.45l-1.6,-2.17l-0.15,-4.94l1.48,-3.39l2.58,-0.15l0.87,-1.59l-0.78,-1.57l3.76,-5.59l4.04,-7.48l2.17,0.01l0.39,-0.29l0.57,-2.07l4.37,0.64l0.46,-0.34l0.33,-2.56l1.1,-0.13l6.94,4.87l0.06,6.32l0.66,1.36Z",name:"Sweden"},SD:{path:"M505.98,259.4l-0.34,-0.77l-1.17,-0.9l-0.26,-1.61l0.29,-1.81l-0.34,-0.46l-1.16,-0.17l-0.54,0.59l-1.23,0.11l-0.28,0.65l0.53,0.65l0.17,1.22l-2.44,3.0l-0.96,0.19l-2.39,-1.4l-0.95,0.52l-0.38,0.78l-1.11,0.41l-0.29,0.5l-1.94,0.0l-0.54,-0.52l-1.81,-0.09l-0.95,0.4l-2.45,-2.35l-2.07,0.54l-0.73,1.26l-0.6,2.1l-1.25,0.58l-0.75,-0.62l0.27,-2.65l-1.48,-1.78l-0.22,-1.48l-0.92,-0.96l-0.02,-1.29l-0.57,-1.16l-0.68,-0.16l0.69,-1.29l-0.18,-1.14l0.65,-0.62l0.03,-0.55l-0.36,-0.41l1.55,-2.97l1.91,0.16l0.43,-0.4l-0.1,-10.94l2.49,-0.01l0.4,-0.4l-0.0,-4.82l29.02,0.0l0.64,2.04l-0.49,0.66l0.36,2.69l0.93,3.16l2.12,1.55l-0.89,1.04l-1.72,0.39l-0.98,0.9l-1.43,5.65l0.24,1.15l-0.38,2.06l-0.96,2.38l-1.53,1.31l-1.32,2.91l-1.22,0.86l-0.37,1.34Z",name:"Sudan"},DO:{path:"M241.8,239.2l0.05,-0.65l-0.46,-0.73l0.42,-0.44l0.19,-1.0l-0.09,-1.53l1.66,0.01l1.99,0.63l0.33,0.67l1.28,0.19l0.33,0.76l1.0,0.08l0.8,0.62l-0.45,0.51l-1.13,-0.47l-1.88,-0.01l-1.27,0.59l-0.75,-0.55l-1.01,0.54l-0.79,1.4l-0.23,-0.61Z",name:"Dominican Rep."},DJ:{path:"M528.43,256.18l-0.45,0.66l-0.58,-0.25l-1.51,0.13l-0.18,-1.01l1.45,-1.95l0.83,0.17l0.77,-0.44l0.2,1.0l-1.2,0.51l-0.06,0.7l0.73,0.47Z",name:"Djibouti"},DK:{path:"M452.28,129.07l-1.19,2.24l-2.13,-1.6l-0.23,-0.95l2.98,-0.95l0.57,1.26ZM447.74,126.31l-0.26,0.57l-0.88,-0.07l-1.8,2.53l0.48,1.69l-1.09,0.36l-1.61,-0.39l-0.89,-1.69l-0.07,-3.43l0.96,-1.73l2.02,-0.2l1.09,-1.07l1.33,-0.67l-0.05,1.06l-0.73,1.41l0.3,1.0l1.2,0.64Z",name:"Denmark"},DE:{path:"M453.14,155.55l-0.55,-0.36l-1.2,-0.1l-1.87,0.57l-2.13,-0.13l-0.56,0.63l-0.86,-0.6l-0.96,0.09l-2.57,-0.93l-0.85,0.67l-1.47,-0.02l0.24,-1.75l1.23,-2.14l-0.28,-0.59l-3.52,-0.58l-0.92,-0.66l0.12,-1.2l-0.48,-0.88l0.27,-2.17l-0.37,-3.03l1.41,-0.22l0.63,-1.26l0.66,-3.19l-0.41,-1.18l0.26,-0.39l1.66,-0.15l0.33,0.54l0.62,0.07l1.7,-1.69l-0.54,-3.02l1.37,0.33l1.31,-0.37l0.31,1.18l2.25,0.71l-0.02,0.92l0.5,0.4l2.55,-0.65l1.34,-0.87l2.57,1.24l1.06,0.98l0.48,1.44l-0.57,0.74l-0.0,0.48l0.87,1.15l0.57,1.64l-0.14,1.29l0.82,1.7l-1.5,-0.07l-0.56,0.57l-4.47,2.15l-0.22,0.54l0.68,2.26l2.58,2.16l-0.66,1.11l-0.79,0.36l-0.23,0.43l0.32,1.87Z",name:"Germany"},YE:{path:"M528.27,246.72l0.26,-0.42l-0.22,-1.01l0.19,-1.5l0.92,-0.69l-0.07,-1.35l0.39,-0.75l1.01,0.47l3.34,-0.27l3.76,0.41l0.95,0.81l1.36,-0.58l1.74,-2.62l2.18,-1.09l6.86,-0.94l2.48,5.41l-1.64,0.76l-0.56,1.9l-6.23,2.16l-2.29,1.8l-1.93,0.05l-1.41,1.02l-4.24,0.74l-1.72,1.49l-3.28,0.19l-0.52,-1.18l0.02,-1.51l-1.34,-3.29Z",name:"Yemen"},AT:{path:"M462.89,152.8l0.04,2.25l-1.07,0.0l-0.33,0.63l0.36,0.51l-1.04,2.13l-2.02,0.07l-1.33,0.7l-5.29,-0.99l-0.47,-0.93l-0.44,-0.21l-2.47,0.55l-0.42,0.51l-3.18,-0.81l0.43,-0.91l1.12,0.78l0.6,-0.17l0.25,-0.58l1.93,0.12l1.86,-0.56l1.0,0.08l0.68,0.57l0.62,-0.15l0.26,-0.77l-0.3,-1.78l0.8,-0.44l0.68,-1.15l1.52,0.85l0.47,-0.06l1.34,-1.25l0.64,-0.17l1.81,0.92l1.28,-0.11l0.7,0.37Z",name:"Austria"},DZ:{path:"M441.46,188.44l-0.32,1.07l0.39,2.64l-0.54,2.16l-1.58,1.82l0.37,2.39l1.91,1.55l0.18,0.8l1.42,1.03l1.84,7.23l0.12,1.16l-0.57,5.0l0.2,1.51l-0.87,0.99l-0.02,0.51l1.41,1.86l0.14,1.2l0.89,1.48l0.5,0.16l0.98,-0.41l1.73,1.08l0.82,1.23l-8.22,4.81l-7.23,5.11l-3.43,1.13l-2.3,0.21l-0.28,-1.59l-2.56,-1.09l-0.67,-1.25l-26.12,-17.86l0.01,-3.47l3.77,-1.88l2.44,-0.41l2.12,-0.75l1.08,-1.42l2.81,-1.05l0.35,-2.08l1.33,-0.29l1.04,-0.94l3.47,-0.69l0.46,-1.08l-0.1,-0.45l-0.58,-0.52l-0.82,-2.81l-0.19,-1.83l-0.78,-1.49l2.03,-1.31l2.63,-0.48l1.7,-1.22l2.31,-0.84l8.24,-0.73l1.49,0.38l2.28,-1.1l2.46,-0.02l0.92,0.6l1.35,-0.05Z",name:"Algeria"},US:{path:"M892.72,99.2l1.31,0.53l1.41,-0.37l1.89,0.98l1.89,0.42l-1.32,0.58l-2.9,-1.53l-2.08,0.22l-0.26,-0.15l0.07,-0.67ZM183.22,150.47l0.37,1.47l1.12,0.85l4.23,0.7l2.39,0.98l2.17,-0.38l1.85,0.5l-1.55,0.65l-3.49,2.61l-0.16,0.77l0.5,0.39l2.33,-0.61l1.77,1.02l5.15,-2.4l-0.31,0.65l0.25,0.56l1.36,0.38l1.71,1.16l4.7,-0.88l0.67,0.85l1.31,0.21l0.58,0.58l-1.34,0.17l-2.18,-0.32l-3.6,0.89l-2.71,3.25l0.35,0.9l0.59,-0.0l0.55,-0.6l-1.36,4.65l0.29,3.09l0.67,1.58l0.61,0.45l1.77,-0.44l1.6,-1.96l0.14,-2.21l-0.82,-1.96l0.11,-1.13l1.19,-2.37l0.44,-0.33l0.48,0.75l0.4,-0.29l0.4,-1.37l0.6,-0.47l0.24,-0.8l1.69,0.49l1.65,1.08l-0.03,2.37l-1.27,1.13l-0.0,1.13l0.87,0.36l1.66,-1.29l0.5,0.17l0.5,2.6l-2.49,3.75l0.17,0.61l1.54,0.62l1.48,0.17l1.92,-0.44l4.72,-2.15l2.16,-1.8l-0.05,-1.24l0.75,-0.22l3.92,0.36l2.12,-1.05l0.21,-0.4l-0.28,-1.48l3.27,-2.4l8.32,-0.02l0.56,-0.82l1.9,-0.77l0.93,-1.51l0.74,-2.37l1.58,-1.98l0.92,0.62l1.47,-0.47l0.8,0.66l-0.0,4.09l1.96,2.6l-2.34,1.31l-5.37,2.09l-1.83,2.72l0.02,1.79l0.83,1.59l0.54,0.23l-6.19,0.94l-2.2,0.89l-0.23,0.48l0.45,0.29l2.99,-0.46l-2.19,0.56l-1.13,0.0l-0.15,-0.32l-0.48,0.08l-0.76,0.82l0.22,0.67l0.32,0.06l-0.41,1.62l-1.27,1.58l-1.48,-1.07l-0.49,-0.04l-0.16,0.46l0.52,1.58l0.61,0.59l0.03,0.79l-0.95,1.38l-1.21,-1.22l-0.27,-2.27l-0.35,-0.35l-0.42,0.25l-0.48,1.27l0.33,1.41l-0.97,-0.27l-0.48,0.24l0.18,0.5l1.52,0.83l0.1,2.52l0.79,0.51l0.52,3.42l-1.42,1.88l-2.47,0.8l-1.71,1.66l-1.31,0.25l-1.27,1.03l-0.43,0.99l-2.69,1.78l-2.64,3.03l-0.45,2.12l0.45,2.08l0.85,2.38l1.09,1.9l0.04,1.2l1.16,3.06l-0.18,2.69l-0.55,1.43l-0.47,0.21l-0.89,-0.23l-0.49,-1.18l-0.87,-0.56l-2.75,-5.16l0.48,-1.68l-0.72,-1.78l-2.01,-2.38l-1.12,-0.53l-2.72,1.18l-1.47,-1.35l-1.57,-0.68l-2.99,0.31l-2.17,-0.3l-2.0,0.19l-1.15,0.46l-0.19,0.58l0.39,0.63l0.14,1.34l-0.84,-0.2l-0.84,0.46l-1.58,-0.07l-2.08,-1.44l-2.09,0.33l-1.91,-0.62l-3.73,0.84l-2.39,2.07l-2.54,1.22l-1.45,1.41l-0.61,1.38l0.34,3.71l-0.29,0.02l-3.5,-1.33l-1.25,-3.11l-1.44,-1.5l-2.24,-3.56l-1.76,-1.09l-2.27,-0.01l-1.71,2.07l-1.76,-0.69l-1.16,-0.74l-1.52,-2.98l-3.93,-3.16l-4.34,-0.0l-0.4,0.4l-0.0,0.74l-6.5,0.02l-9.02,-3.14l-0.34,-0.71l-5.7,0.49l-0.43,-1.29l-1.62,-1.61l-1.14,-0.38l-0.55,-0.88l-1.28,-0.13l-1.01,-0.77l-2.22,-0.27l-0.43,-0.3l-0.36,-1.58l-2.4,-2.83l-2.01,-3.85l-0.06,-0.9l-2.92,-3.26l-0.33,-2.29l-1.3,-1.66l0.52,-2.37l-0.09,-2.57l-0.78,-2.3l0.95,-2.82l0.61,-5.68l-0.47,-4.27l-1.46,-4.08l3.19,0.79l1.26,2.83l0.69,0.08l0.69,-1.14l-1.1,-4.79l68.76,-0.0l0.4,-0.4l0.14,-0.86ZM32.44,67.52l1.73,1.97l0.55,0.05l0.99,-0.79l3.65,0.24l-0.09,0.62l0.32,0.45l3.83,0.77l2.61,-0.43l5.19,1.4l4.84,0.43l1.89,0.57l3.42,-0.7l6.14,1.87l-0.03,38.06l0.38,0.4l2.39,0.11l2.31,0.98l3.9,3.99l0.55,0.04l2.4,-2.03l2.16,-1.04l1.2,1.71l3.95,3.14l4.09,6.63l4.2,2.29l0.06,1.83l-1.02,1.23l-1.16,-1.08l-2.04,-1.03l-0.67,-2.89l-3.28,-3.03l-1.65,-3.57l-6.35,-0.32l-2.82,-1.01l-5.26,-3.85l-6.77,-2.04l-3.53,0.3l-4.81,-1.69l-3.25,-1.63l-2.78,0.8l-0.28,0.46l0.44,2.21l-3.91,0.96l-2.26,1.27l-2.3,0.65l-0.27,-1.65l1.05,-3.42l2.49,-1.09l0.16,-0.6l-0.69,-0.96l-0.55,-0.1l-3.19,2.12l-1.78,2.56l-3.55,2.61l-0.04,0.61l1.56,1.52l-2.07,2.29l-5.11,2.57l-0.77,1.66l-3.76,1.77l-0.92,1.73l-2.69,1.38l-1.81,-0.22l-6.95,3.32l-3.97,0.91l4.85,-2.5l2.59,-1.86l3.26,-0.52l1.19,-1.4l3.42,-2.1l2.59,-2.27l0.42,-2.68l1.23,-2.1l-0.04,-0.46l-0.45,-0.11l-2.68,1.03l-0.63,-0.49l-0.53,0.03l-1.05,1.04l-1.36,-1.54l-0.66,0.08l-0.32,0.62l-0.58,-1.14l-0.56,-0.16l-2.41,1.42l-1.07,-0.0l-0.17,-1.75l0.3,-1.71l-1.61,-1.33l-3.41,0.59l-1.96,-1.63l-1.57,-0.84l-0.15,-2.21l-1.7,-1.43l0.82,-1.88l1.99,-2.12l0.88,-1.92l1.71,-0.24l2.04,0.51l1.87,-1.77l1.91,0.25l1.91,-1.23l0.17,-0.43l-0.47,-1.82l-1.07,-0.7l1.39,-1.17l0.12,-0.45l-0.39,-0.26l-1.65,0.07l-2.66,0.88l-0.75,0.78l-1.92,-0.8l-3.46,0.44l-3.44,-0.91l-1.06,-1.61l-2.65,-1.99l2.91,-1.43l5.5,-2.0l1.52,0.0l-0.26,1.62l0.41,0.46l5.29,-0.16l0.3,-0.65l-2.03,-2.59l-3.14,-1.68l-1.79,-2.12l-2.4,-1.83l-3.09,-1.24l1.04,-1.69l4.23,-0.14l3.36,-2.07l0.73,-2.27l2.39,-1.99l2.42,-0.52l4.65,-1.97l2.46,0.23l3.71,-2.35l3.5,0.89ZM37.6,123.41l-2.25,1.23l-0.95,-0.69l-0.29,-1.24l3.21,-1.63l1.42,0.21l0.67,0.7l-1.8,1.42ZM31.06,234.03l0.98,0.47l0.74,0.87l-1.77,1.07l-0.44,-1.53l0.49,-0.89ZM29.34,232.07l0.18,0.05l0.08,0.05l-0.16,0.03l-0.11,-0.14ZM25.16,230.17l0.05,-0.03l0.18,0.22l-0.13,-0.01l-0.1,-0.18ZM5.89,113.26l-1.08,0.41l-2.21,-1.12l1.53,-0.4l1.62,0.28l0.14,0.83Z",name:"United States"},LV:{path:"M489.16,122.85l0.96,0.66l0.22,1.65l0.68,1.76l-3.65,1.7l-2.23,-1.58l-1.29,-0.26l-0.68,-0.77l-2.42,0.34l-4.16,-0.23l-2.47,0.9l0.06,-1.98l1.13,-2.06l1.95,-1.02l2.12,2.58l2.01,-0.07l0.38,-0.33l0.44,-2.52l1.76,-0.53l3.06,1.7l2.15,0.07Z",name:"Latvia"},UY:{path:"M286.85,372.74l-0.92,1.5l-2.59,1.44l-1.69,-0.52l-1.42,0.26l-2.39,-1.19l-1.52,0.08l-1.27,-1.3l0.16,-1.5l0.56,-0.79l-0.02,-2.73l1.21,-4.74l1.19,-0.21l2.37,2.0l1.08,0.03l4.36,3.17l1.22,1.6l-0.96,1.5l0.61,1.4Z",name:"Uruguay"},LB:{path:"M510.37,198.01l-0.88,0.51l1.82,-3.54l0.62,0.08l0.22,0.61l-1.13,0.88l-0.65,1.47Z",name:"Lebanon"},LA:{path:"M689.54,248.53l-1.76,-0.74l-0.49,0.15l-0.94,1.46l-1.32,-0.64l0.62,-0.98l0.11,-2.17l-2.04,-2.42l-0.25,-2.65l-1.9,-2.1l-2.15,-0.31l-0.78,0.91l-1.12,0.06l-1.05,-0.4l-2.06,1.2l-0.04,-1.59l0.61,-2.68l-0.36,-0.49l-1.35,-0.1l-0.11,-1.23l-0.96,-0.88l1.96,-1.89l0.39,0.36l1.33,0.07l0.42,-0.45l-0.34,-2.66l0.7,-0.21l1.28,1.81l1.11,2.35l0.36,0.23l2.82,0.02l0.71,1.67l-1.39,0.65l-0.72,0.93l0.13,0.6l2.91,1.51l3.6,5.25l1.88,1.78l0.56,1.62l-0.35,1.96Z",name:"Lao PDR"},TW:{path:"M724.01,226.68l-0.74,1.48l-0.9,-1.52l-0.25,-1.74l1.38,-2.44l1.73,-1.74l0.64,0.44l-1.85,5.52Z",name:"Taiwan"},TT:{path:"M266.64,259.32l0.28,-1.16l1.13,-0.22l-0.06,1.2l-1.35,0.18Z",name:"Trinidad and Tobago"},TR:{path:"M513.21,175.47l3.64,1.17l3.05,-0.44l2.1,0.26l3.11,-1.56l2.46,-0.13l2.19,1.33l0.33,0.82l-0.22,1.33l0.25,0.44l2.28,1.13l-1.17,0.57l-0.21,0.45l0.75,3.2l-0.41,1.16l1.13,1.92l-0.55,0.22l-0.9,-0.67l-2.91,-0.37l-1.24,0.46l-4.23,0.41l-2.81,1.05l-1.91,0.01l-1.52,-0.53l-2.58,0.75l-0.66,-0.45l-0.62,0.3l-0.12,1.45l-0.89,0.84l-0.47,-0.67l0.79,-1.3l-0.41,-0.2l-1.43,0.23l-2.0,-0.63l-2.02,1.65l-3.51,0.3l-2.13,-1.53l-2.7,-0.1l-0.86,1.24l-1.38,0.27l-2.29,-1.44l-2.71,-0.01l-1.37,-2.65l-1.68,-1.52l1.07,-1.99l-0.09,-0.49l-1.27,-1.12l2.37,-2.41l3.7,-0.11l1.28,-2.24l4.49,0.37l3.21,-1.97l2.81,-0.82l3.99,-0.06l4.29,2.07ZM488.79,176.72l-1.72,1.31l-0.5,-0.88l1.37,-2.57l-0.7,-0.85l1.7,-0.63l1.8,0.34l0.46,1.17l1.76,0.78l-2.87,0.32l-1.3,1.01Z",name:"Turkey"},LK:{path:"M624.16,268.99l-1.82,0.48l-0.99,-1.67l-0.42,-3.46l0.95,-3.43l1.21,0.98l2.26,4.19l-0.34,2.33l-0.85,0.58Z",name:"Sri Lanka"},TN:{path:"M448.1,188.24l-1.0,1.27l-0.02,1.32l0.84,0.88l-0.28,2.09l-1.53,1.32l-0.12,0.42l0.48,1.54l1.42,0.32l0.53,1.11l0.9,0.52l-0.11,1.67l-3.54,2.64l-0.1,2.38l-0.58,0.3l-0.96,-4.45l-1.54,-1.25l-0.16,-0.78l-1.92,-1.56l-0.18,-1.76l1.51,-1.62l0.59,-2.34l-0.38,-2.78l0.42,-1.21l2.45,-1.05l1.29,0.26l-0.06,1.11l0.58,0.38l1.47,-0.73Z",name:"Tunisia"},TL:{path:"M734.55,307.93l-0.1,-0.97l4.5,-0.86l-2.82,1.28l-1.59,0.55Z",name:"Timor-Leste"},TM:{path:"M553.03,173.76l-0.04,0.34l-0.09,-0.22l0.13,-0.12ZM555.87,172.66l0.45,-0.1l1.48,0.74l2.06,2.43l4.07,-0.18l0.38,-0.51l-0.32,-1.19l1.92,-0.94l1.91,-1.59l2.94,1.39l0.43,2.47l1.19,0.67l2.58,-0.13l0.62,0.4l1.32,3.12l4.54,3.44l2.67,1.45l3.06,1.14l-0.04,1.05l-1.33,-0.75l-0.59,0.19l-0.32,0.84l-2.2,0.81l-0.46,2.13l-1.21,0.74l-1.91,0.42l-0.73,1.33l-1.56,0.31l-2.22,-0.94l-0.2,-2.17l-0.38,-0.36l-1.73,-0.09l-2.76,-2.46l-2.14,-0.4l-2.84,-1.48l-1.78,-0.27l-1.24,0.53l-1.57,-0.08l-2.0,1.69l-1.7,0.43l-0.36,-1.58l0.36,-2.98l-0.22,-0.4l-1.65,-0.84l0.54,-1.69l-0.34,-0.52l-1.22,-0.13l0.36,-1.64l2.22,0.59l2.2,-0.95l0.12,-0.65l-1.77,-1.74l-0.66,-1.57Z",name:"Turkmenistan"},TJ:{path:"M597.75,178.82l-2.54,-0.44l-0.47,0.34l-0.24,1.7l0.43,0.45l2.64,-0.22l3.18,0.95l4.39,-0.41l0.56,2.37l0.52,0.29l0.67,-0.24l1.11,0.49l0.21,2.13l-3.76,-0.21l-1.8,1.32l-1.76,0.74l-0.61,-0.58l0.21,-2.23l-0.64,-0.49l-0.07,-0.93l-1.36,-0.66l-0.45,0.07l-1.08,1.01l-0.55,1.48l-1.31,-0.05l-0.95,1.16l-0.9,-0.35l-1.86,0.74l1.26,-2.83l-0.54,-2.17l-1.67,-0.82l0.33,-0.66l2.18,-0.04l1.19,-1.63l0.76,-1.79l2.43,-0.5l-0.26,1.0l0.73,1.05Z",name:"Tajikistan"},LS:{path:"M491.06,363.48l-0.49,0.15l-1.49,-1.67l1.1,-1.43l2.19,-1.44l1.51,1.27l-0.98,1.82l-1.23,0.38l-0.62,0.93Z",name:"Lesotho"},TH:{path:"M670.27,255.86l-1.41,3.87l0.15,2.0l0.38,0.36l1.38,0.07l0.9,2.04l0.55,2.34l1.4,1.44l1.61,0.38l0.96,0.97l-0.5,0.64l-1.1,0.2l-0.34,-1.18l-2.04,-1.1l-0.63,0.23l-0.63,-0.62l-0.48,-1.3l-2.56,-2.63l-0.73,0.41l0.95,-3.89l2.16,-4.22ZM670.67,254.77l-0.92,-2.18l-0.26,-2.61l-2.14,-3.06l0.71,-0.49l0.89,-2.59l-3.61,-5.45l0.87,-0.51l1.05,-2.58l1.74,-0.18l2.6,-1.59l0.76,0.56l0.13,1.39l0.37,0.36l1.23,0.09l-0.51,2.28l0.05,2.42l0.6,0.34l2.43,-1.42l0.77,0.39l1.47,-0.07l0.71,-0.88l1.48,0.14l1.71,1.88l0.25,2.65l1.92,2.11l-0.1,1.89l-0.61,0.86l-2.22,-0.33l-3.5,0.64l-1.6,2.12l0.36,2.58l-1.51,-0.79l-1.84,-0.01l0.28,-1.52l-0.4,-0.47l-2.21,0.01l-0.4,0.37l-0.19,2.74l-0.34,0.93Z",name:"Thailand"},TF:{path:"M596.68,420.38l-3.2,0.18l-0.05,-1.26l0.39,-1.41l1.3,0.78l2.08,0.35l-0.52,1.36Z",name:"Fr. S. Antarctic Lands"},TG:{path:"M422.7,257.63l-0.09,1.23l1.53,1.52l0.08,1.09l0.5,0.65l-0.11,5.62l0.49,1.47l-1.31,0.35l-1.02,-2.13l-0.18,-1.12l0.53,-2.19l-0.63,-1.16l-0.22,-3.68l-1.01,-1.4l0.07,-0.28l1.37,0.03Z",name:"Togo"},TD:{path:"M480.25,235.49l0.12,9.57l-2.1,0.05l-1.14,1.89l-0.69,1.63l0.34,0.73l-0.66,0.91l0.24,0.89l-0.86,1.95l0.45,0.5l0.6,-0.1l0.34,0.64l0.03,1.38l0.9,1.04l-1.45,0.43l-1.27,1.03l-1.83,2.76l-2.16,1.07l-2.31,-0.15l-0.86,0.25l-0.26,0.49l0.17,0.61l-2.11,1.68l-2.85,0.87l-1.09,-0.57l-0.73,0.66l-1.12,0.1l-1.1,-3.12l-1.25,-0.64l-1.22,-1.22l0.29,-0.64l3.01,0.04l0.35,-0.6l-1.3,-2.2l-0.08,-3.31l-0.97,-1.66l0.22,-1.04l-0.38,-0.48l-1.22,-0.04l0.0,-1.25l-0.98,-1.07l0.96,-3.01l3.25,-2.65l0.13,-3.33l0.95,-5.18l0.52,-1.07l-0.1,-0.48l-0.91,-0.78l-0.2,-0.96l-0.8,-0.58l-0.55,-3.65l2.1,-1.2l19.57,9.83Z",name:"Chad"},LY:{path:"M483.48,203.15l-0.75,1.1l0.29,1.39l-0.6,1.83l0.73,2.14l0.0,24.12l-2.48,0.01l-0.41,0.85l-19.41,-9.76l-4.41,2.28l-1.37,-1.33l-3.82,-1.1l-1.14,-1.65l-1.98,-1.23l-1.22,0.32l-0.66,-1.11l-0.17,-1.26l-1.28,-1.69l0.87,-1.19l-0.07,-4.34l0.43,-2.27l-0.86,-3.45l1.13,-0.76l0.22,-1.16l-0.2,-1.03l3.48,-2.61l0.29,-1.94l2.45,0.8l1.18,-0.21l1.98,0.44l3.15,1.18l1.37,2.54l5.72,1.67l2.64,1.35l1.61,-0.72l1.29,-1.34l-0.44,-2.34l0.66,-1.13l1.67,-1.21l1.57,-0.35l3.14,0.53l1.08,1.28l3.99,0.78l0.36,0.54Z",name:"Libya"},AE:{path:"M550.76,223.97l1.88,-0.4l3.84,0.02l4.78,-4.75l0.19,0.36l0.26,1.58l-0.81,0.01l-0.39,0.35l-0.08,2.04l-0.81,0.63l-0.01,0.96l-0.66,0.99l-0.39,1.41l-7.08,-1.25l-0.7,-1.96Z",name:"United Arab Emirates"},VE:{path:"M240.68,256.69l0.53,0.75l-0.02,1.06l-1.07,1.78l0.95,2.0l0.42,0.22l1.4,-0.44l0.56,-1.83l-0.77,-1.17l-0.1,-1.47l2.82,-0.93l0.26,-0.49l-0.28,-0.96l0.3,-0.28l0.66,1.31l1.96,0.26l1.4,1.22l0.08,0.68l0.39,0.35l4.81,-0.22l1.49,1.11l1.92,0.31l1.67,-0.84l0.22,-0.6l3.44,-0.14l-0.17,0.55l0.86,1.19l2.19,0.35l1.67,1.1l0.37,1.86l0.41,0.32l1.55,0.17l-1.66,1.35l-0.22,0.92l0.65,0.97l-1.67,0.54l-0.3,0.4l0.04,0.99l-0.56,0.57l-0.01,0.55l1.85,2.27l-0.66,0.69l-4.47,1.29l-0.72,0.54l-3.69,-0.9l-0.71,0.27l-0.02,0.7l0.91,0.53l-0.08,1.54l0.35,1.58l0.35,0.31l1.66,0.17l-1.3,0.52l-0.48,1.13l-2.68,0.91l-0.6,0.77l-1.57,0.13l-1.17,-1.13l-0.8,-2.52l-1.25,-1.26l1.02,-1.23l-1.29,-2.95l0.18,-1.62l1.0,-2.21l-0.2,-0.49l-1.14,-0.46l-4.02,0.36l-1.82,-2.1l-1.57,-0.33l-2.99,0.22l-1.06,-0.97l0.25,-1.23l-0.2,-1.01l-0.59,-0.69l-0.29,-1.06l-1.08,-0.39l0.78,-2.79l1.9,-2.11Z",name:"Venezuela"},AF:{path:"M600.7,188.88l-1.57,1.3l-0.1,0.48l0.8,2.31l-1.09,1.04l-0.03,1.27l-0.48,0.71l-2.16,-0.08l-0.37,0.59l0.78,1.48l-1.38,0.69l-1.06,1.69l0.06,1.7l-0.65,0.52l-0.91,-0.21l-1.91,0.36l-0.48,0.77l-1.88,0.13l-1.4,1.56l-0.18,2.32l-2.91,1.02l-1.65,-0.23l-0.71,0.55l-1.41,-0.3l-2.41,0.39l-3.52,-1.17l1.96,-2.35l-0.21,-1.78l-0.3,-0.34l-1.63,-0.4l-0.19,-1.58l-0.75,-2.03l0.95,-1.36l-0.19,-0.6l-0.73,-0.28l1.47,-4.8l2.14,0.9l2.12,-0.36l0.74,-1.34l1.77,-0.39l1.54,-0.92l0.63,-2.31l1.87,-0.5l0.49,-0.81l0.94,0.56l2.13,0.11l2.55,0.92l1.95,-0.83l0.65,0.43l0.56,-0.13l0.69,-1.12l1.57,-0.08l0.72,-1.66l0.79,-0.74l0.8,0.39l-0.17,0.56l0.71,0.58l-0.08,2.39l1.11,0.95ZM601.37,188.71l1.73,-0.71l1.43,-1.18l4.03,0.35l-2.23,0.74l-4.95,0.8Z",name:"Afghanistan"},IQ:{path:"M530.82,187.47l0.79,0.66l1.26,-0.28l1.46,3.08l1.63,0.94l0.14,1.23l-1.22,1.05l-0.53,2.52l1.73,2.67l3.12,1.62l1.15,1.88l-0.38,1.85l0.39,0.48l0.41,-0.0l0.02,1.07l0.76,0.94l-2.47,-0.1l-1.71,2.44l-4.31,-0.2l-7.02,-5.48l-3.73,-1.94l-2.88,-0.73l-0.85,-2.87l5.45,-3.02l0.95,-3.43l-0.19,-1.96l1.27,-0.7l1.22,-1.7l0.87,-0.36l2.69,0.34Z",name:"Iraq"},IS:{path:"M384.14,88.06l-0.37,2.61l2.54,2.51l-2.9,2.75l-9.19,3.4l-9.25,-1.66l1.7,-1.22l-0.1,-0.7l-4.05,-1.47l2.96,-0.53l0.33,-0.43l-0.11,-1.2l-0.33,-0.36l-4.67,-0.85l1.28,-2.04l3.45,-0.56l3.77,2.72l0.44,0.02l3.64,-2.16l3.3,1.08l3.98,-2.16l3.58,0.26Z",name:"Iceland"},IR:{path:"M533.43,187.16l-1.27,-2.15l0.42,-0.98l-0.71,-3.04l1.03,-0.5l0.33,0.83l1.26,1.35l2.05,0.51l1.11,-0.16l2.89,-2.11l0.62,-0.14l0.39,0.46l-0.72,1.2l0.06,0.49l1.56,1.53l0.65,0.04l0.67,1.81l2.56,0.83l1.87,1.48l3.69,0.49l3.91,-0.76l0.47,-0.73l2.17,-0.6l1.66,-1.54l1.51,0.08l1.18,-0.53l1.59,0.24l2.83,1.48l1.88,0.3l2.77,2.47l1.77,0.18l0.18,1.99l-1.68,5.49l0.24,0.5l0.61,0.23l-0.82,1.48l0.8,2.18l0.19,1.71l0.3,0.34l1.63,0.4l0.15,1.32l-2.15,2.35l-0.01,0.53l2.21,3.03l2.34,1.24l0.06,2.14l1.24,0.72l0.11,0.69l-3.31,1.27l-1.08,3.03l-9.68,-1.68l-0.99,-3.05l-1.43,-0.73l-2.17,0.46l-2.47,1.26l-2.83,-0.82l-2.46,-2.02l-2.41,-0.8l-3.42,-6.06l-0.48,-0.2l-1.18,0.39l-1.44,-0.82l-0.5,0.08l-0.65,0.74l-0.97,-1.01l-0.02,-1.31l-0.71,-0.39l0.26,-1.81l-1.29,-2.11l-3.13,-1.63l-1.58,-2.43l0.5,-1.9l1.31,-1.26l-0.19,-1.66l-1.74,-1.1l-1.57,-3.3Z",name:"Iran"},AM:{path:"M536.99,182.33l-0.28,0.03l-1.23,-2.13l-0.93,0.01l-0.62,-0.66l-0.69,-0.07l-0.96,-0.81l-1.56,-0.62l0.19,-1.12l-0.26,-0.79l2.72,-0.36l1.09,1.01l-0.17,0.92l1.02,0.78l-0.47,0.62l0.08,0.56l2.04,1.23l0.04,1.4Z",name:"Armenia"},IT:{path:"M451.59,158.63l3.48,0.94l-0.21,1.17l0.3,0.83l-1.49,-0.24l-2.04,1.1l-0.21,0.39l0.13,1.45l-0.25,1.12l0.82,1.57l2.39,1.63l1.31,2.54l2.79,2.43l2.05,0.08l0.21,0.23l-0.39,0.33l0.09,0.67l4.05,1.97l2.17,1.76l-0.16,0.36l-1.17,-1.08l-2.18,-0.49l-0.44,0.2l-1.05,1.91l0.14,0.54l1.57,0.95l-0.19,0.98l-1.06,0.33l-1.25,2.34l-0.37,0.08l0.0,-0.33l1.0,-2.45l-1.73,-3.17l-1.12,-0.51l-0.88,-1.33l-1.51,-0.51l-1.27,-1.25l-1.75,-0.18l-4.12,-3.21l-1.62,-1.65l-1.03,-3.19l-3.53,-1.36l-1.3,0.51l-1.69,1.41l0.16,-0.72l-0.28,-0.47l-1.14,-0.33l-0.53,-1.96l0.72,-0.78l0.04,-0.48l-0.65,-1.17l0.8,0.39l1.4,-0.23l1.11,-0.84l0.52,0.35l1.19,-0.1l0.75,-1.2l1.53,0.33l1.36,-0.56l0.35,-1.14l1.08,0.32l0.68,-0.64l1.98,-0.44l0.42,0.82ZM459.19,184.75l-0.65,1.65l0.32,1.05l-0.31,0.89l-1.5,-0.85l-4.5,-1.67l0.19,-0.82l2.67,0.23l3.78,-0.48ZM443.93,176.05l1.18,1.66l-0.3,3.32l-1.06,-0.01l-0.77,0.73l-0.53,-0.44l-0.1,-3.37l-0.39,-1.22l1.04,0.01l0.92,-0.68Z",name:"Italy"},VN:{path:"M690.56,230.25l-2.7,1.82l-2.09,2.46l-0.63,1.95l4.31,6.45l2.32,1.65l1.43,1.94l1.11,4.59l-0.32,4.24l-1.93,1.54l-2.84,1.61l-2.11,2.15l-2.73,2.06l-0.59,-1.05l0.63,-1.53l-0.13,-0.47l-1.34,-1.04l1.51,-0.71l2.55,-0.18l0.3,-0.63l-0.82,-1.14l4.0,-2.07l0.31,-3.05l-0.57,-1.77l0.42,-2.66l-0.73,-1.97l-1.86,-1.76l-3.63,-5.29l-2.72,-1.46l0.36,-0.47l1.5,-0.64l0.21,-0.52l-0.97,-2.27l-0.37,-0.24l-2.83,-0.02l-2.24,-3.9l0.83,-0.4l4.39,-0.29l2.06,-1.31l1.15,0.89l1.88,0.4l-0.17,1.51l1.35,1.16l1.67,0.45Z",name:"Vietnam"},AR:{path:"M249.29,428.93l-2.33,-0.52l-5.83,-0.43l-0.89,-1.66l0.05,-2.37l-0.45,-0.4l-1.43,0.18l-0.67,-0.91l-0.2,-3.13l1.88,-1.47l0.79,-2.04l-0.25,-1.7l1.3,-2.68l0.91,-4.15l-0.22,-1.69l0.85,-0.45l0.2,-0.44l-0.27,-1.16l-0.98,-0.68l0.59,-0.92l-0.05,-0.5l-1.04,-1.07l-0.52,-3.1l0.97,-0.86l-0.42,-3.58l1.2,-5.43l1.38,-0.98l0.16,-0.43l-0.75,-2.79l-0.01,-2.43l1.78,-1.75l0.06,-2.57l1.43,-2.85l0.01,-2.58l-0.69,-0.74l-1.09,-4.52l1.47,-2.7l-0.18,-2.79l0.85,-2.35l1.59,-2.46l1.73,-1.64l0.05,-0.52l-0.6,-0.84l0.44,-0.85l-0.07,-4.19l2.7,-1.44l0.86,-2.75l-0.21,-0.71l1.76,-2.01l2.9,0.57l1.38,1.78l0.68,-0.08l0.87,-1.87l2.39,0.09l4.95,4.77l2.17,0.49l3.0,1.92l2.47,1.0l0.25,0.82l-2.37,3.93l0.23,0.59l5.39,1.16l2.12,-0.44l2.45,-2.16l0.5,-2.38l0.76,-0.31l0.98,1.2l-0.04,1.8l-3.67,2.51l-2.85,2.66l-3.43,3.88l-1.3,5.07l0.01,2.72l-0.54,0.73l-0.36,3.28l3.14,2.64l-0.16,2.11l1.4,1.11l-0.1,1.09l-2.29,3.52l-3.55,1.49l-4.92,0.6l-2.71,-0.29l-0.43,0.51l0.5,1.65l-0.49,2.1l0.38,1.42l-1.19,0.83l-2.36,0.38l-2.3,-1.04l-1.38,0.83l0.41,3.64l1.69,0.91l1.4,-0.71l0.36,0.76l-2.04,0.86l-2.01,1.89l-0.97,4.63l-2.34,0.1l-2.09,1.78l-0.61,2.75l2.46,2.31l2.17,0.63l-0.7,2.32l-2.83,1.73l-1.73,3.86l-2.17,1.22l-1.16,1.67l0.75,3.76l1.04,1.28ZM256.71,438.88l-2.0,0.15l-1.4,-1.22l-3.82,-0.1l-0.0,-5.83l1.6,3.05l3.26,2.07l3.08,0.78l-0.71,1.1Z",name:"Argentina"},AU:{path:"M705.8,353.26l0.26,0.04l0.17,-0.47l-0.48,-1.42l0.92,1.11l0.45,0.15l0.27,-0.39l-0.1,-1.56l-1.98,-3.63l1.09,-3.31l-0.24,-1.57l0.34,-0.62l0.38,1.06l0.43,-0.19l0.99,-1.7l1.91,-0.83l1.29,-1.15l1.81,-0.91l0.96,-0.17l0.92,0.26l1.92,-0.95l1.47,-0.28l1.03,-0.8l1.43,0.04l2.78,-0.84l1.36,-1.15l0.71,-1.45l1.41,-1.26l0.3,-2.58l1.27,-1.59l0.78,1.65l0.54,0.19l1.07,-0.51l0.15,-0.6l-0.73,-1.0l0.45,-0.71l0.78,0.39l0.58,-0.3l0.28,-1.82l1.87,-2.14l1.12,-0.39l0.28,-0.58l0.62,0.17l0.53,-0.73l1.87,-0.57l1.65,1.05l1.35,1.48l3.39,0.38l0.43,-0.54l-0.46,-1.23l1.05,-1.79l1.04,-0.61l0.14,-0.55l-0.25,-0.41l0.88,-1.17l1.31,-0.77l1.3,0.27l2.1,-0.48l0.31,-0.4l-0.05,-1.3l-0.92,-0.77l1.48,0.56l1.41,1.07l2.11,0.65l0.81,-0.2l1.4,0.7l1.69,-0.66l0.8,0.19l0.64,-0.33l0.71,0.77l-1.33,1.94l-0.71,0.07l-0.35,0.51l0.24,0.86l-1.52,2.35l0.12,1.05l2.15,1.65l1.97,0.85l3.04,2.36l1.97,0.65l0.55,0.88l2.72,0.85l1.84,-1.1l2.07,-5.97l-0.42,-3.59l0.3,-1.73l0.47,-0.87l-0.31,-0.68l1.09,-3.28l0.46,-0.47l0.4,0.71l0.16,1.51l0.65,0.52l0.16,1.04l0.85,1.21l0.12,2.38l0.9,2.0l0.57,0.18l1.3,-0.78l1.69,1.7l-0.2,1.08l0.53,2.2l0.39,1.3l0.68,0.48l0.6,1.95l-0.19,1.48l0.81,1.76l6.01,3.69l-0.11,0.76l1.38,1.58l0.95,2.77l0.58,0.22l0.72,-0.41l0.8,0.9l0.61,0.01l0.46,2.41l4.81,4.71l0.66,2.02l-0.07,3.31l1.14,2.2l-0.13,2.24l-1.1,3.68l0.03,1.64l-0.47,1.89l-1.05,2.4l-1.9,1.47l-1.72,3.51l-2.38,6.09l-0.24,2.82l-1.14,0.8l-2.85,0.15l-2.31,1.19l-2.51,2.25l-3.09,-1.57l0.3,-1.15l-0.54,-0.47l-1.5,0.63l-2.01,1.94l-7.12,-2.18l-1.48,-1.63l-1.14,-3.74l-1.45,-1.26l-1.81,-0.26l0.56,-1.18l-0.61,-2.1l-0.72,-0.1l-1.14,1.82l-0.9,0.21l0.63,-0.82l0.36,-1.55l0.92,-1.31l-0.13,-2.34l-0.7,-0.22l-2.0,2.34l-1.51,0.93l-0.94,2.01l-1.35,-0.81l-0.02,-1.52l-1.57,-2.04l-1.09,-0.88l0.24,-0.33l-0.14,-0.59l-3.21,-1.69l-1.83,-0.12l-2.54,-1.35l-4.58,0.28l-6.02,1.9l-2.53,-0.13l-2.62,1.41l-2.13,0.63l-1.49,2.6l-3.49,0.31l-2.29,-0.5l-3.48,0.43l-1.6,1.47l-0.81,-0.04l-2.37,1.63l-3.26,-0.1l-3.72,-2.21l0.04,-1.05l1.19,-0.46l0.49,-0.89l0.21,-2.97l-0.28,-1.64l-1.34,-2.86l-0.38,-1.47l0.05,-1.72l-0.95,-1.7l-0.18,-0.97l-1.01,-0.99l-0.29,-1.98l-1.13,-1.75ZM784.92,393.44l2.65,1.02l3.23,-0.96l1.09,0.14l0.15,3.06l-0.85,1.13l-0.17,1.63l-0.87,-0.24l-1.57,1.91l-1.68,-0.18l-1.4,-2.36l-0.37,-2.04l-1.39,-2.51l0.04,-0.8l1.15,0.18Z",name:"Australia"},IL:{path:"M507.76,203.05l0.4,-0.78l0.18,0.4l-0.33,1.03l0.52,0.44l0.68,-0.22l-0.86,3.6l-1.16,-3.32l0.59,-0.74l-0.03,-0.41ZM508.73,200.34l0.37,-1.02l0.64,0.0l0.52,-0.51l-0.49,1.53l-0.56,-0.24l-0.48,0.23Z",name:"Israel"},IN:{path:"M623.34,207.03l-1.24,1.04l-0.97,2.55l0.22,0.51l8.04,3.87l3.42,0.37l1.57,1.38l4.92,0.88l2.18,-0.04l0.38,-0.3l0.29,-1.24l-0.32,-1.64l0.14,-0.87l0.82,-0.31l0.45,2.48l2.28,1.02l1.77,-0.38l4.14,0.1l0.38,-0.36l0.18,-1.66l-0.5,-0.65l1.37,-0.29l2.25,-1.99l2.7,-1.62l1.93,0.62l1.8,-0.98l0.79,1.14l-0.68,0.91l0.26,0.63l2.42,0.36l0.09,0.47l-0.83,0.75l0.13,1.07l-1.52,-0.29l-3.24,1.86l-0.13,1.78l-1.32,2.14l-0.18,1.39l-0.93,1.82l-1.64,-0.5l-0.52,0.37l-0.09,2.63l-0.56,1.11l0.19,0.81l-0.53,0.27l-1.18,-3.73l-1.08,-0.27l-0.38,0.31l-0.24,1.0l-0.66,-0.66l0.54,-1.06l1.22,-0.34l1.15,-2.25l-0.24,-0.56l-1.57,-0.47l-4.34,-0.28l-0.18,-1.56l-0.35,-0.35l-1.11,-0.12l-1.91,-1.12l-0.56,0.17l-0.88,1.82l0.11,0.49l1.36,1.07l-1.09,0.69l-0.69,1.11l0.18,0.56l1.24,0.57l-0.32,1.54l0.85,1.94l0.36,2.01l-0.22,0.59l-4.58,0.52l-0.33,0.42l0.13,1.8l-1.17,1.36l-3.65,1.81l-2.79,3.03l-4.32,3.28l-0.18,1.27l-4.65,1.79l-0.77,2.16l0.64,5.3l-1.06,2.49l-0.01,3.94l-1.24,0.28l-1.14,1.93l0.39,0.84l-1.68,0.53l-1.04,1.83l-0.65,0.47l-2.06,-2.05l-2.1,-6.02l-2.2,-3.64l-1.05,-4.75l-2.29,-3.57l-1.76,-8.2l0.01,-3.11l-0.49,-2.53l-0.55,-0.29l-3.53,1.52l-1.53,-0.27l-2.86,-2.77l0.85,-0.67l0.08,-0.55l-0.74,-1.03l-2.67,-2.06l1.24,-1.32l5.34,0.01l0.39,-0.49l-0.5,-2.29l-1.42,-1.46l-0.27,-1.93l-1.43,-1.2l2.31,-2.37l3.05,0.06l2.62,-2.85l1.6,-2.81l2.4,-2.73l0.07,-2.04l1.97,-1.48l-0.02,-0.65l-1.93,-1.31l-0.82,-1.78l-0.8,-2.21l0.9,-0.89l3.59,0.65l2.92,-0.42l2.33,-2.19l2.31,2.85l-0.24,2.13l0.99,1.59l-0.05,0.82l-1.34,-0.28l-0.47,0.48l0.7,3.06l2.62,1.99l2.99,1.65Z",name:"India"},TZ:{path:"M495.56,296.42l2.8,-3.12l-0.02,-0.81l-0.64,-1.3l0.68,-0.52l0.14,-1.47l-0.76,-1.25l0.31,-0.11l2.26,0.03l-0.51,2.76l0.76,1.3l0.5,0.12l1.05,-0.53l1.19,-0.12l0.61,0.24l1.43,-0.62l0.1,-0.67l-0.71,-0.62l1.57,-1.7l8.65,4.86l0.32,1.53l3.34,2.33l-1.05,2.8l0.13,1.61l1.63,1.12l-0.6,1.76l-0.01,2.33l1.89,4.03l0.57,0.43l-1.46,1.08l-2.61,0.94l-1.43,-0.04l-1.06,0.77l-2.29,0.36l-2.87,-0.68l-0.83,0.07l-0.63,-0.75l-0.31,-2.78l-1.32,-1.35l-3.25,-0.77l-3.96,-1.58l-1.18,-2.41l-0.32,-1.75l-1.76,-1.49l0.42,-1.05l-0.44,-0.89l0.08,-0.96l-0.46,-0.58l0.06,-0.56Z",name:"Tanzania"},AZ:{path:"M539.29,175.73l1.33,0.32l1.94,-1.8l2.3,3.34l1.43,0.43l-1.26,0.15l-0.35,0.32l-0.8,3.14l-0.99,0.96l0.05,1.11l-1.26,-1.13l0.7,-1.18l-0.04,-0.47l-0.74,-0.86l-1.48,0.15l-2.34,1.71l-0.03,-1.27l-2.03,-1.35l0.47,-0.62l-0.08,-0.56l-1.03,-0.79l0.29,-0.43l-0.14,-0.58l-1.13,-0.86l1.89,0.68l1.69,0.06l0.37,-0.87l-0.81,-1.37l0.42,0.06l1.63,1.72ZM533.78,180.57l0.61,0.46l0.69,-0.0l0.59,1.15l-0.68,-0.15l-1.21,-1.45Z",name:"Azerbaijan"},IE:{path:"M405.08,135.42l0.35,2.06l-1.75,2.78l-4.22,1.88l-2.84,-0.4l1.73,-3.0l-1.18,-3.53l4.6,-3.74l0.32,1.15l-0.49,1.74l0.4,0.51l1.47,-0.04l1.6,0.6Z",name:"Ireland"},ID:{path:"M756.47,287.89l0.69,4.01l2.79,1.78l0.51,-0.1l2.04,-2.59l2.71,-1.43l2.05,-0.0l3.9,1.73l2.46,0.45l0.08,15.12l-1.75,-1.54l-2.54,-0.51l-0.88,0.71l-2.32,0.06l0.69,-1.33l1.45,-0.64l0.23,-0.46l-0.65,-2.74l-1.24,-2.21l-5.04,-2.29l-2.09,-0.23l-3.68,-2.27l-0.55,0.13l-0.65,1.07l-0.52,0.12l-0.55,-1.89l-1.21,-0.78l1.84,-0.62l1.72,0.05l0.39,-0.52l-0.21,-0.66l-0.38,-0.28l-3.45,-0.0l-1.13,-1.48l-2.1,-0.43l-0.52,-0.6l2.69,-0.48l1.28,-0.78l3.66,0.94l0.3,0.71ZM757.91,300.34l-0.62,0.82l-0.1,-0.8l0.59,-1.12l0.13,1.1ZM747.38,292.98l0.34,0.72l-1.22,-0.57l-4.68,-0.1l0.27,-0.62l2.78,-0.09l2.52,0.67ZM741.05,285.25l-0.67,-2.88l0.64,-2.01l0.41,0.86l1.21,0.18l0.16,0.7l-0.1,1.68l-0.84,-0.16l-0.46,0.3l-0.34,1.34ZM739.05,293.5l-0.5,0.44l-1.34,-0.36l-0.17,-0.37l1.73,-0.08l0.27,0.36ZM721.45,284.51l-0.19,1.97l2.24,2.23l0.54,0.02l1.27,-1.07l2.75,-0.5l-0.9,1.21l-2.11,0.93l-0.16,0.6l2.22,3.01l-0.3,1.07l1.36,1.74l-2.26,0.85l-0.28,-0.31l0.12,-1.19l-1.64,-1.34l0.17,-2.23l-0.56,-0.39l-1.67,0.76l-0.23,0.39l0.3,6.17l-1.1,0.25l-0.69,-0.47l0.64,-2.21l-0.39,-2.42l-0.39,-0.34l-0.8,-0.01l-0.58,-1.29l0.98,-1.6l0.35,-1.96l1.32,-3.87ZM728.59,296.27l0.38,0.49l-0.02,1.28l-0.88,0.49l-0.53,-0.47l1.04,-1.79ZM729.04,286.98l0.27,-0.05l-0.02,0.13l-0.24,-0.08ZM721.68,284.05l0.16,-0.32l1.89,-1.65l1.83,0.68l3.16,0.35l2.94,-0.1l2.39,-1.66l-1.73,2.13l-1.66,0.43l-2.41,-0.48l-4.17,0.13l-2.39,0.51ZM730.55,310.47l1.11,-1.93l2.03,-0.82l0.08,0.62l-1.45,1.67l-1.77,0.46ZM728.12,305.88l-0.1,0.38l-3.46,0.66l-2.91,-0.27l-0.0,-0.25l1.54,-0.41l1.66,0.73l1.67,-0.19l1.61,-0.65ZM722.9,310.24l-0.64,0.03l-2.26,-1.2l1.11,-0.24l1.78,1.41ZM716.26,305.77l0.88,0.51l1.28,-0.17l0.2,0.35l-4.65,0.73l0.39,-0.67l1.15,-0.02l0.75,-0.73ZM711.66,293.84l-0.38,-0.16l-2.54,1.01l-1.12,-1.44l-1.69,-0.13l-1.16,-0.75l-3.04,0.77l-1.1,-1.15l-3.31,-0.11l-0.35,-3.05l-1.35,-0.95l-1.11,-1.98l-0.33,-2.06l0.27,-2.14l0.9,-1.01l0.37,1.15l2.09,1.49l1.53,-0.48l1.82,0.08l1.38,-1.19l1.0,-0.18l2.28,0.67l2.26,-0.53l1.52,-3.64l1.01,-0.99l0.78,-2.57l4.1,0.3l-1.11,1.77l0.02,0.46l1.7,2.2l-0.23,1.39l2.07,1.71l-2.33,0.42l-0.88,1.9l0.1,2.05l-2.4,1.9l-0.06,2.45l-0.7,2.79ZM692.58,302.03l0.35,0.26l4.8,0.25l0.78,-0.97l4.17,1.09l1.13,1.68l3.69,0.45l2.13,1.04l-1.8,0.6l-2.77,-0.99l-4.8,-0.12l-5.24,-1.41l-1.84,-0.25l-1.11,0.3l-4.26,-0.97l-0.7,-1.14l-1.59,-0.13l1.18,-1.65l2.74,0.13l2.87,1.13l0.26,0.68ZM685.53,299.17l-2.22,0.04l-2.06,-2.03l-3.15,-2.01l-2.93,-3.51l-3.11,-5.33l-2.2,-2.12l-1.64,-4.06l-2.32,-1.69l-1.27,-2.07l-1.96,-1.5l-2.51,-2.65l-0.11,-0.66l4.81,0.53l2.15,2.38l3.31,2.74l2.35,2.66l2.7,0.17l1.95,1.59l1.54,2.17l1.59,0.95l-0.84,1.71l0.15,0.52l1.44,0.87l0.79,0.1l0.4,1.58l0.87,1.4l1.96,0.39l1.0,1.31l-0.6,3.01l-0.09,3.5Z",name:"Indonesia"},UA:{path:"M492.5,162.44l1.28,-2.49l1.82,0.19l0.66,-0.23l0.09,-0.71l-0.25,-0.75l-0.79,-0.72l-0.33,-1.21l-0.86,-0.62l-0.02,-1.19l-1.13,-0.86l-1.15,-0.19l-2.04,-1.0l-1.66,0.32l-0.66,0.47l-0.92,-0.0l-0.84,0.78l-2.48,0.7l-1.18,-0.71l-3.07,-0.36l-0.89,0.43l-0.24,-0.55l-1.11,-0.7l0.35,-0.93l1.26,-1.02l-0.54,-1.23l2.04,-2.43l1.4,-0.62l0.25,-1.19l-1.04,-2.39l0.83,-0.13l1.28,-0.84l1.8,-0.07l2.47,0.26l2.86,0.81l1.88,0.06l0.86,0.44l1.04,-0.41l0.77,0.66l2.18,-0.15l0.92,0.3l0.52,-0.34l0.15,-1.53l0.56,-0.54l2.85,-0.05l0.84,-0.72l3.04,-0.18l1.23,1.46l-0.48,0.77l0.21,1.03l0.36,0.32l1.8,0.14l0.93,2.08l3.18,1.15l1.94,-0.45l1.67,1.49l1.4,-0.03l3.35,0.96l0.02,0.54l-0.96,1.59l0.47,1.97l-0.26,0.7l-2.36,0.28l-1.29,0.89l-0.23,1.38l-1.83,0.27l-1.58,0.97l-2.41,0.21l-2.16,1.17l-0.21,0.38l0.34,2.26l1.23,0.75l2.13,-0.08l-0.14,0.31l-2.65,0.53l-3.23,1.69l-0.87,-0.39l0.42,-1.1l-0.25,-0.52l-2.21,-0.73l2.35,-1.06l0.12,-0.65l-0.93,-0.82l-3.62,-0.74l-0.13,-0.89l-0.46,-0.34l-2.61,0.59l-0.91,1.69l-1.71,2.04l-0.86,-0.4l-1.62,0.27Z",name:"Ukraine"},QA:{path:"M549.33,221.64l-0.76,-0.23l-0.14,-1.64l0.84,-1.29l0.47,0.52l0.04,1.34l-0.45,1.3Z",name:"Qatar"},MZ:{path:"M508.58,318.75l-0.34,-2.57l0.51,-2.05l3.55,0.63l2.5,-0.38l1.02,-0.76l1.49,0.01l2.74,-0.98l1.66,-1.2l0.5,9.24l0.41,1.23l-0.68,1.67l-0.93,1.71l-1.5,1.5l-5.16,2.28l-2.78,2.73l-1.02,0.53l-1.71,1.8l-0.98,0.57l-0.35,2.41l1.16,1.94l0.49,2.17l0.43,0.31l-0.06,2.06l-0.39,1.17l0.5,0.72l-0.25,0.73l-0.92,0.83l-5.12,2.39l-1.22,1.36l0.21,1.13l0.58,0.39l-0.11,0.72l-1.22,-0.01l-0.73,-2.97l0.42,-3.09l-1.78,-5.37l2.49,-2.81l0.69,-1.89l0.44,-0.43l0.28,-1.53l-0.39,-0.93l0.59,-3.65l-0.01,-3.26l-1.49,-1.16l-1.2,-0.22l-1.74,-1.17l-1.92,0.01l-0.29,-2.08l7.06,-1.96l1.28,1.09l0.89,-0.1l0.67,0.44l0.1,0.73l-0.51,1.29l0.19,1.81l1.75,1.83l0.65,-0.13l0.71,-1.65l1.17,-0.86l-0.26,-3.47l-1.05,-1.85l-1.04,-0.94Z",name:"Mozambique"}},height:440.70631074413296,projection:{type:"mill",centralMeridian:11.5},width:900}),!function(t,e,i){var n=t.L,r={};
  19. r.version="0.6.4","object"==typeof module&&"object"==typeof module.exports?module.exports=r:"function"==typeof define&&define.amd&&define(r),r.noConflict=function(){return t.L=n,this},t.L=r,r.Util={extend:function(t){var e,i,n,r,o=Array.prototype.slice.call(arguments,1);for(i=0,n=o.length;n>i;i++){r=o[i]||{};for(e in r)r.hasOwnProperty(e)&&(t[e]=r[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,r;if("object"==typeof t){r=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(r));return!0}return!1},limitExecByInterval:function(t,e,i){var n,r;return function o(){var s=arguments;return n?void(r=!0):(n=!0,setTimeout(function(){n=!1,r&&(o.apply(i,s),r=!1)},e),void t.apply(i,s))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return r.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=r.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var r in t)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(t[r]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var r=e[n];if(r===i)throw new Error("No value provided for variable "+t);return"function"==typeof r&&(r=r(e)),r})},isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,r=["webkit","moz","o","ms"];for(i=0;i<r.length&&!n;i++)n=t[r[i]+e];return n}function i(e){var i=+new Date,r=Math.max(0,16-(i-n));return n=i+r,t.setTimeout(e,r)}var n=0,o=t.requestAnimationFrame||e("RequestAnimationFrame")||i,s=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};r.Util.requestAnimFrame=function(e,n,s,a){return e=r.bind(e,n),s&&o===i?void e():o.call(t,e,a)},r.Util.cancelAnimFrame=function(e){e&&s.call(t,e)}}(),r.extend=r.Util.extend,r.bind=r.Util.bind,r.stamp=r.Util.stamp,r.setOptions=r.Util.setOptions,r.Class=function(){},r.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n;for(var o in this)this.hasOwnProperty(o)&&"prototype"!==o&&(e[o]=this[o]);t.statics&&(r.extend(e,t.statics),delete t.statics),t.includes&&(r.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=r.extend({},n.options,t.options)),r.extend(n,t),n._initHooks=[];var s=this;return e.__super__=s.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){s.prototype.callInitHooks&&s.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;e>t;t++)n._initHooks[t].call(this)}},e},r.Class.include=function(t){r.extend(this.prototype,t)},r.Class.mergeOptions=function(t){r.extend(this.prototype.options,t)},r.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var o="_leaflet_events";r.Mixin={},r.Mixin.Events={addEventListener:function(t,e,i){if(r.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,s,a,l,h,c,u,d=this[o]=this[o]||{},p=i&&r.stamp(i);for(t=r.Util.splitWords(t),n=0,s=t.length;s>n;n++)a={action:e,context:i||this},l=t[n],i?(h=l+"_idx",c=h+"_len",u=d[h]=d[h]||{},u[p]||(u[p]=[],d[c]=(d[c]||0)+1),u[p].push(a)):(d[l]=d[l]||[],d[l].push(a));return this},hasEventListeners:function(t){var e=this[o];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[o])return this;if(!t)return this.clearAllEventListeners();if(r.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,s,a,l,h,c,u,d,p,f=this[o],m=i&&r.stamp(i);for(t=r.Util.splitWords(t),n=0,s=t.length;s>n;n++)if(a=t[n],c=a+"_idx",u=c+"_len",d=f[c],e){if(l=i&&d?d[m]:f[a]){for(h=l.length-1;h>=0;h--)l[h].action!==e||i&&l[h].context!==i||(p=l.splice(h,1),p[0].action=r.Util.falseFn);i&&d&&0===l.length&&(delete d[m],f[u]--)}}else delete f[a],delete f[c];return this},clearAllEventListeners:function(){return delete this[o],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,s,a,l,h=r.Util.extend({},e,{type:t,target:this}),c=this[o];if(c[t])for(i=c[t].slice(),n=0,s=i.length;s>n;n++)i[n].action.call(i[n].context||this,h);a=c[t+"_idx"];for(l in a)if(i=a[l].slice())for(n=0,s=i.length;s>n;n++)i[n].action.call(i[n].context||this,h);return this},addOneTimeEventListener:function(t,e,i){if(r.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=r.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},r.Mixin.Events.on=r.Mixin.Events.addEventListener,r.Mixin.Events.off=r.Mixin.Events.removeEventListener,r.Mixin.Events.once=r.Mixin.Events.addOneTimeEventListener,r.Mixin.Events.fire=r.Mixin.Events.fireEvent,function(){var n=!!t.ActiveXObject,o=n&&!t.XMLHttpRequest,s=n&&!e.querySelector,a=n&&!e.addEventListener,l=navigator.userAgent.toLowerCase(),h=-1!==l.indexOf("webkit"),c=-1!==l.indexOf("chrome"),u=-1!==l.indexOf("phantom"),d=-1!==l.indexOf("android"),p=-1!==l.search("android [23]"),f=typeof orientation!=i+"",m=t.navigator&&t.navigator.msPointerEnabled&&t.navigator.msMaxTouchPoints,g="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,v=e.documentElement,y=n&&"transition"in v.style,E="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix,b="MozPerspective"in v.style,_="OTransition"in v.style,T=!t.L_DISABLE_3D&&(y||E||b||_)&&!u,x=!t.L_NO_TOUCH&&!u&&function(){var t="ontouchstart";if(m||t in v)return!0;var i=e.createElement("div"),n=!1;return i.setAttribute?(i.setAttribute(t,"return;"),"function"==typeof i[t]&&(n=!0),i.removeAttribute(t),i=null,n):!1}();r.Browser={ie:n,ie6:o,ie7:s,ielt9:a,webkit:h,android:d,android23:p,chrome:c,ie3d:y,webkit3d:E,gecko3d:b,opera3d:_,any3d:T,mobile:f,mobileWebkit:f&&h,mobileWebkit3d:f&&E,mobileOpera:f&&t.opera,touch:x,msTouch:m,retina:g}}(),r.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},r.Point.prototype={clone:function(){return new r.Point(this.x,this.y)},add:function(t){return this.clone()._add(r.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(r.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=r.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=r.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=r.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+r.Util.formatNum(this.x)+", "+r.Util.formatNum(this.y)+")"}},r.point=function(t,e,n){return t instanceof r.Point?t:r.Util.isArray(t)?new r.Point(t[0],t[1]):t===i||null===t?t:new r.Point(t,e,n)},r.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;r>n;n++)this.extend(i[n])},r.Bounds.prototype={extend:function(t){return t=r.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new r.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new r.Point(this.min.x,this.max.y)},getTopRight:function(){return new r.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof r.Point?r.point(t):r.bounds(t),t instanceof r.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=r.bounds(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,a=o.y>=e.y&&n.y<=i.y;return s&&a},isValid:function(){return!(!this.min||!this.max)}},r.bounds=function(t,e){return!t||t instanceof r.Bounds?t:new r.Bounds(t,e)},r.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},r.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new r.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},r.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var r=e.defaultView.getComputedStyle(t,null);n=r?r[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,o=0,s=t,a=e.body,l=e.documentElement,h=r.Browser.ie7;do{if(n+=s.offsetTop||0,o+=s.offsetLeft||0,n+=parseInt(r.DomUtil.getStyle(s,"borderTopWidth"),10)||0,o+=parseInt(r.DomUtil.getStyle(s,"borderLeftWidth"),10)||0,i=r.DomUtil.getStyle(s,"position"),s.offsetParent===a&&"absolute"===i)break;if("fixed"===i){n+=a.scrollTop||l.scrollTop||0,o+=a.scrollLeft||l.scrollLeft||0;break}if("relative"===i&&!s.offsetLeft){var c=r.DomUtil.getStyle(s,"width"),u=r.DomUtil.getStyle(s,"max-width"),d=s.getBoundingClientRect();("none"!==c||"none"!==u)&&(o+=d.left+s.clientLeft),n+=d.top+(a.scrollTop||l.scrollTop||0);break}s=s.offsetParent}while(s);s=t;do{if(s===a)break;n-=s.scrollTop||0,o-=s.scrollLeft||0,r.DomUtil.documentIsLtr()||!r.Browser.webkit&&!h||(o+=s.scrollWidth-s.clientWidth,h&&"hidden"!==r.DomUtil.getStyle(s,"overflow-y")&&"hidden"!==r.DomUtil.getStyle(s,"overflow")&&(o+=17)),s=s.parentNode}while(s);return new r.Point(o,n)},documentIsLtr:function(){return r.DomUtil._docIsLtrCached||(r.DomUtil._docIsLtrCached=!0,r.DomUtil._docIsLtr="ltr"===r.DomUtil.getStyle(e.body,"direction")),r.DomUtil._docIsLtr},create:function(t,i,n){var r=e.createElement(t);return r.className=i,n&&n.appendChild(r),r},hasClass:function(t,e){return t.className.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)},addClass:function(t,e){r.DomUtil.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(t,e){t.className=r.Util.trim((" "+t.className+" ").replace(" "+e+" "," "))},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(r){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1},getTranslateString:function(t){var e=r.Browser.webkit3d,i="translate"+(e?"3d":"")+"(",n=(e?",0":"")+")";return i+t.x+"px,"+t.y+"px"+n},getScaleString:function(t,e){var i=r.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t))),n=" scale("+t+") ";return i+n},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&r.Browser.any3d?(t.style[r.DomUtil.TRANSFORM]=r.DomUtil.getTranslateString(e),r.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden")):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},r.DomUtil.TRANSFORM=r.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),r.DomUtil.TRANSITION=r.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),r.DomUtil.TRANSITION_END="webkitTransition"===r.DomUtil.TRANSITION||"OTransition"===r.DomUtil.TRANSITION?r.DomUtil.TRANSITION+"End":"transitionend",function(){var i=r.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);r.extend(r.DomUtil,{disableTextSelection:function(){if(r.DomEvent.on(t,"selectstart",r.DomEvent.preventDefault),i){var n=e.documentElement.style;this._userSelect=n[i],n[i]="none"}},enableTextSelection:function(){r.DomEvent.off(t,"selectstart",r.DomEvent.preventDefault),i&&(e.documentElement.style[i]=this._userSelect,delete this._userSelect)},disableImageDrag:function(){r.DomEvent.on(t,"dragstart",r.DomEvent.preventDefault)},enableImageDrag:function(){r.DomEvent.off(t,"dragstart",r.DomEvent.preventDefault)}})}(),r.LatLng=function(t,e){var i=parseFloat(t),n=parseFloat(e);if(isNaN(i)||isNaN(n))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=i,this.lng=n},r.extend(r.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),r.LatLng.prototype={equals:function(t){if(!t)return!1;t=r.latLng(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return e<=r.LatLng.MAX_MARGIN},toString:function(t){return"LatLng("+r.Util.formatNum(this.lat,t)+", "+r.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=r.latLng(t);var e=6378137,i=r.LatLng.DEG_TO_RAD,n=(t.lat-this.lat)*i,o=(t.lng-this.lng)*i,s=this.lat*i,a=t.lat*i,l=Math.sin(n/2),h=Math.sin(o/2),c=l*l+h*h*Math.cos(s)*Math.cos(a);return 2*e*Math.atan2(Math.sqrt(c),Math.sqrt(1-c))},wrap:function(t,e){var i=this.lng;return t=t||-180,e=e||180,i=(i+e)%(e-t)+(t>i||i===e?e:t),new r.LatLng(this.lat,i)}},r.latLng=function(t,e){return t instanceof r.LatLng?t:r.Util.isArray(t)?new r.LatLng(t[0],t[1]):t===i||null===t?t:"object"==typeof t&&"lat"in t?new r.LatLng(t.lat,"lng"in t?t.lng:t.lon):new r.LatLng(t,e)},r.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;r>n;n++)this.extend(i[n])},r.LatLngBounds.prototype={extend:function(t){return t?(t="number"==typeof t[0]||"string"==typeof t[0]||t instanceof r.LatLng?r.latLng(t):r.latLngBounds(t),t instanceof r.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new r.LatLng(t.lat,t.lng),this._northEast=new r.LatLng(t.lat,t.lng)):t instanceof r.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this):this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new r.LatLngBounds(new r.LatLng(e.lat-n,e.lng-o),new r.LatLng(i.lat+n,i.lng+o))},getCenter:function(){return new r.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new r.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new r.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof r.LatLng?r.latLng(t):r.latLngBounds(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof r.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=r.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,a=o.lng>=e.lng&&n.lng<=i.lng;return s&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=r.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},r.latLngBounds=function(t,e){return!t||t instanceof r.LatLngBounds?t:new r.LatLngBounds(t,e)},r.Projection={},r.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=r.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=t.lng*e,s=n*e;return s=Math.log(Math.tan(Math.PI/4+s/2)),new r.Point(o,s)},unproject:function(t){var e=r.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new r.LatLng(n,i)}},r.Projection.LonLat={project:function(t){return new r.Point(t.lng,t.lat)},unproject:function(t){return new r.LatLng(t.y,t.x)}},r.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)}},r.CRS.Simple=r.extend({},r.CRS,{projection:r.Projection.LonLat,transformation:new r.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),r.CRS.EPSG3857=r.extend({},r.CRS,{code:"EPSG:3857",projection:r.Projection.SphericalMercator,transformation:new r.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),r.CRS.EPSG900913=r.extend({},r.CRS.EPSG3857,{code:"EPSG:900913"}),r.CRS.EPSG4326=r.extend({},r.CRS,{code:"EPSG:4326",projection:r.Projection.LonLat,transformation:new r.Transformation(1/360,.5,-1/360,.5)}),r.Map=r.Class.extend({includes:r.Mixin.Events,options:{crs:r.CRS.EPSG3857,fadeAnimation:r.DomUtil.TRANSITION&&!r.Browser.android23,trackResize:!0,markerZoomAnimation:r.DomUtil.TRANSITION&&r.Browser.any3d},initialize:function(t,e){e=r.setOptions(this,e),this._initContainer(t),this._initLayout(),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(r.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return this._resetView(r.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this.setView(this.getCenter(),t,{zoom:e})},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),s=t instanceof r.Point?t:this.latLngToContainerPoint(t),a=s.subtract(o).multiplyBy(1-1/n),l=this.containerPointToLatLng(o.add(a));return this.setView(l,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():r.latLngBounds(t);var i=r.point(e.paddingTopLeft||e.padding||[0,0]),n=r.point(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n)),s=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),o),l=this.project(t.getNorthEast(),o),h=this.unproject(a.add(l).divideBy(2).add(s),o);return this.setView(h,o,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(r.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t,e){if(t=r.latLngBounds(t),this.options.maxBounds=t,!t)return this._boundsMinZoom=null,this.off("moveend",this._panInsideMaxBounds,this),this;var i=this.getBoundsZoom(t,!0);return this._boundsMinZoom=i,this._loaded&&(this._zoom<i?this.setView(t.getCenter(),i,e):this.panInsideBounds(t)),this.on("moveend",this._panInsideMaxBounds,this),this},panInsideBounds:function(t){t=r.latLngBounds(t);var e=this.getPixelBounds(),i=e.getBottomLeft(),n=e.getTopRight(),o=this.project(t.getSouthWest()),s=this.project(t.getNorthEast()),a=0,l=0;return n.y<s.y&&(l=Math.ceil(s.y-n.y)),n.x>s.x&&(a=Math.floor(s.x-n.x)),i.y>o.y&&(l=Math.floor(o.y-i.y)),i.x<o.x&&(a=Math.ceil(o.x-i.x)),a||l?this.panBy([a,l]):this},addLayer:function(t){var e=r.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&r.TileLayer&&t instanceof r.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=r.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&r.TileLayer&&t instanceof r.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):void 0},hasLayer:function(t){return t?r.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){t=r.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();if(this._sizeChanged=!0,this.options.maxBounds&&this.setMaxBounds(this.options.maxBounds),!this._loaded)return this;var i=this.getSize(),n=e.subtract(i).divideBy(2).round();return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r.bind(this.fire,this,"moveend"),200)),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(e){var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this}},remove:function(){return this._loaded&&this.fire("unload"),this._initEvents("off"),delete this._container._leaflet,this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._moved()?this.layerPointToLatLng(this._getCenterLayerPoint()):this._initialCenter},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new r.LatLngBounds(e,i)},getMinZoom:function(){var t=this._layersMinZoom===i?0:this._layersMinZoom,e=this._boundsMinZoom===i?0:this._boundsMinZoom;return this.options.minZoom===i?Math.max(t,e):this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=r.latLngBounds(t);var n,o=this.getMinZoom()-(e?1:0),s=this.getMaxZoom(),a=this.getSize(),l=t.getNorthWest(),h=t.getSouthEast(),c=!0;i=r.point(i||[0,0]);do o++,n=this.project(h,o).subtract(this.project(l,o)).add(i),c=e?n.x<a.x||n.y<a.y:a.contains(n);while(c&&s>=o);return c&&e?null:e?o:o-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new r.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new r.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(r.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(r.point(t),e)},layerPointToLatLng:function(t){var e=r.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(r.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return r.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return r.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(r.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(r.latLng(t)))},mouseEventToContainerPoint:function(t){return r.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=r.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;r.DomUtil.addClass(t,"leaflet-container"+(r.Browser.touch?" leaflet-touch":"")+(r.Browser.retina?" leaflet-retina":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=r.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(r.DomUtil.addClass(t.markerPane,e),r.DomUtil.addClass(t.shadowPane,e),r.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return r.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?r.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var o=this._zoom!==e;n||(this.fire("movestart"),o&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):r.DomUtil.setPosition(this._mapPane,new r.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var s=!this._loaded;this._loaded=!0,s&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("viewreset",{hard:!i}),this.fire("move"),(o||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){r.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-1/0,r=this._getZoomSpan();for(t in this._zoomBoundLayers){var o=this._zoomBoundLayers[t];isNaN(o.options.minZoom)||(e=Math.min(e,o.options.minZoom)),isNaN(o.options.maxZoom)||(n=Math.max(n,o.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),r!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(r.DomEvent){e=e||"on",r.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,o=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=o.length;n>i;i++)r.DomEvent[e](this._container,o[i],this._fireMouseEvent,this);this.options.trackResize&&r.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){r.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=r.Util.requestAnimFrame(this.invalidateSize,this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&this.dragging&&this.dragging.moved()||r.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!r.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&r.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),o=this.layerPointToLatLng(n);this.fire(e,{latlng:o,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return r.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),r.map=function(t,e){return new r.Map(t,e)},r.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=r.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=this.R_MAJOR,s=this.R_MINOR,a=t.lng*e*o,l=n*e,h=s/o,c=Math.sqrt(1-h*h),u=c*Math.sin(l);u=Math.pow((1-u)/(1+u),.5*c);var d=Math.tan(.5*(.5*Math.PI-l))/u;return l=-o*Math.log(d),new r.Point(a,l)},unproject:function(t){for(var e,i=r.LatLng.RAD_TO_DEG,n=this.R_MAJOR,o=this.R_MINOR,s=t.x*i/n,a=o/n,l=Math.sqrt(1-a*a),h=Math.exp(-t.y/n),c=Math.PI/2-2*Math.atan(h),u=15,d=1e-7,p=u,f=.1;Math.abs(f)>d&&--p>0;)e=l*Math.sin(c),f=Math.PI/2-2*Math.atan(h*Math.pow((1-e)/(1+e),.5*l))-c,c+=f;return new r.LatLng(c*i,s)}},r.CRS.EPSG3395=r.extend({},r.CRS,{code:"EPSG:3395",projection:r.Projection.Mercator,transformation:function(){var t=r.Projection.Mercator,e=t.R_MAJOR,i=t.R_MINOR;return new r.Transformation(.5/(Math.PI*e),.5,-.5/(Math.PI*i),.5)}()}),r.TileLayer=r.Class.extend({includes:r.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:r.Browser.mobile,updateWhenIdle:r.Browser.mobile},initialize:function(t,e){e=r.setOptions(this,e),e.detectRetina&&r.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=r.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),this._createTileProto(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=r.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()
  20. },addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,r,o=t.children,s=-e(1/0,-1/0);for(n=0,r=o.length;r>n;n++)o[n]!==this._container&&(i=parseInt(o[n].style.zIndex,10),isNaN(i)||(s=e(s,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(s)?s:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(r.Browser.ielt9)for(t in e)r.DomUtil.setOpacity(e[t],this.options.opacity);else r.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=r.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container leaflet-zoom-animated";this._bgBuffer=r.DomUtil.create("div",e,this._container),this._tileContainer=r.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_update:function(){if(this._map){var t=this._map.getPixelBounds(),e=this._map.getZoom(),i=this.options.tileSize;if(!(e>this.options.maxZoom||e<this.options.minZoom)){var n=r.bounds(t.min.divideBy(i)._floor(),t.max.divideBy(i)._floor());this._addTilesFromCenterOut(n),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(n)}}},_addTilesFromCenterOut:function(t){var i,n,o,s=[],a=t.getCenter();for(i=t.min.y;i<=t.max.y;i++)for(n=t.min.x;n<=t.max.x;n++)o=new r.Point(n,i),this._tileShouldBeLoaded(o)&&s.push(o);var l=s.length;if(0!==l){s.sort(function(t,e){return t.distanceTo(a)-e.distanceTo(a)});var h=e.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=l,n=0;l>n;n++)this._addTile(s[n],h);this._tileContainer.appendChild(h)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i)||t.y<0||t.y>=i)return!1}if(e.bounds){var n=e.tileSize,r=t.multiplyBy(n),o=r.add([n,n]),s=this._map.unproject(r),a=this._map.unproject(o);if(e.continuousWorld||e.noWrap||(s=s.wrap(),a=a.wrap()),!e.bounds.intersects([s,a]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,r;for(r in this._tiles)e=r.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(i<t.min.x||i>t.max.x||n<t.min.y||n>t.max.y)&&this._removeTile(r)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(r.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),r.Browser.android||(e.onload=null,e.src=r.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();r.DomUtil.setPosition(n,i,r.Browser.chrome||r.Browser.android23),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+t.zoomOffset},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this.options.tileSize;return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return r.Util.template(this._url,r.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){return Math.pow(2,this._getZoomForUrl())},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e+e)%e),this.options.tms&&(t.y=e-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_createTileProto:function(){var t=this._tileImg=r.DomUtil.create("img","leaflet-tile");t.style.width=t.style.height=this.options.tileSize+"px",t.galleryimg="no"},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=this._tileImg.cloneNode(!1);return t.onselectstart=t.onmousemove=r.Util.falseFn,r.Browser.ielt9&&this.options.opacity!==i&&r.DomUtil.setOpacity(t,this.options.opacity),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e)},_tileLoaded:function(){this._tilesToLoad--,this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(r.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==r.Util.emptyImageUrl&&(r.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),r.tileLayer=function(t,e){return new r.TileLayer(t,e)},r.TileLayer.WMS=r.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=r.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;i.width=i.height=e.detectRetina&&r.Browser.retina?2*n:n;for(var o in e)this.options.hasOwnProperty(o)||"crs"===o||(i[o]=e[o]);this.wmsParams=i,r.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs;var e=parseFloat(this.wmsParams.version)>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,r.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t,e){var i=this._map,n=this.options.tileSize,o=t.multiplyBy(n),s=o.add([n,n]),a=this._crs.project(i.unproject(o,e)),l=this._crs.project(i.unproject(s,e)),h=[a.x,l.y,l.x,a.y].join(","),c=r.Util.template(this._url,{s:this._getSubdomain(t)});return c+r.Util.getParamString(this.wmsParams,c,!0)+"&BBOX="+h},setParams:function(t,e){return r.extend(this.wmsParams,t),e||this.redraw(),this}}),r.tileLayer.wms=function(t,e){return new r.TileLayer.WMS(t,e)},r.TileLayer.Canvas=r.TileLayer.extend({options:{async:!1},initialize:function(t){r.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTileProto:function(){var t=this._canvasProto=r.DomUtil.create("canvas","leaflet-tile");t.width=t.height=this.options.tileSize},_createTile:function(){var t=this._canvasProto.cloneNode(!1);return t.onselectstart=t.onmousemove=r.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),r.tileLayer.canvas=function(t){return new r.TileLayer.Canvas(t)},r.ImageOverlay=r.Class.extend({includes:r.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=r.latLngBounds(e),r.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&r.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},_initImage:function(){this._image=r.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&r.Browser.any3d?r.DomUtil.addClass(this._image,"leaflet-zoom-animated"):r.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),r.extend(this._image,{galleryimg:"no",onselectstart:r.Util.falseFn,onmousemove:r.Util.falseFn,onload:r.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),o=this._bounds.getNorthWest(),s=this._bounds.getSouthEast(),a=e._latLngToNewLayerPoint(o,t.zoom,t.center),l=e._latLngToNewLayerPoint(s,t.zoom,t.center)._subtract(a),h=a._add(l._multiplyBy(.5*(1-1/n)));i.style[r.DomUtil.TRANSFORM]=r.DomUtil.getTranslateString(h)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);r.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){r.DomUtil.setOpacity(this._image,this.options.opacity)}}),r.imageOverlay=function(t,e,i){return new r.ImageOverlay(t,e,i)},r.Icon=r.Class.extend({options:{className:""},initialize:function(t){r.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,o=r.point(n[e+"Size"]);i=r.point("shadow"===e?n.shadowAnchor||n.iconAnchor:n.iconAnchor),!i&&o&&(i=o.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,i){return r.Browser.ie6?(i||(i=e.createElement("div")),i.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+t+'")'):(i||(i=e.createElement("img")),i.src=t),i},_getIconUrl:function(t){return r.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),r.icon=function(t){return new r.Icon(t)},r.Icon.Default=r.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];r.Browser.retina&&"icon"===t&&(t+="-2x");var i=r.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),r.Icon.Default.imagePath=function(){var t,i,n,r,o,s=e.getElementsByTagName("script"),a=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=s.length;i>t;t++)if(n=s[t].src,r=n.match(a))return o=n.split(a)[0],(o?o+"/":"")+"images"}(),r.Marker=r.Class.extend({includes:r.Mixin.Events,options:{icon:new r.Icon.Default,title:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){r.setOptions(this,e),this._latlng=r.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=r.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",o=t.icon.createIcon(this._icon),s=!1;o!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(o.title=t.title)),r.DomUtil.addClass(o,n),t.keyboard&&(o.tabIndex="0"),this._icon=o,this._initInteraction(),t.riseOnHover&&r.DomEvent.on(o,"mouseover",this._bringToFront,this).on(o,"mouseout",this._resetZIndex,this);var a=t.icon.createShadow(this._shadow),l=!1;a!==this._shadow&&(this._removeShadow(),l=!0),a&&r.DomUtil.addClass(a,n),this._shadow=a,t.opacity<1&&this._updateOpacity();var h=this._map._panes;s&&h.markerPane.appendChild(this._icon),a&&l&&h.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&r.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){r.DomUtil.setPosition(this._icon,t),this._shadow&&r.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];r.DomUtil.addClass(t,"leaflet-clickable"),r.DomEvent.on(t,"click",this._onMouseClick,this),r.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)r.DomEvent.on(t,e[i],this._fireMouseEvent,this);r.Handler.MarkerDrag&&(this.dragging=new r.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&r.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t,latlng:this._latlng})},_onKeyPress:function(t){13===t.keyCode&&this.fire("click",{originalEvent:t,latlng:this._latlng})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t,latlng:this._latlng}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&r.DomEvent.preventDefault(t),"mousedown"!==t.type?r.DomEvent.stopPropagation(t):r.DomEvent.preventDefault(t)},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){r.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&r.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),r.marker=function(t,e){return new r.Marker(t,e)},r.DivIcon=r.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;return i.innerHTML=n.html!==!1?n.html:"",n.bgPos&&(i.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),r.divIcon=function(t){return new r.DivIcon(t)},r.Map.mergeOptions({closePopupOnClick:!0}),r.Popup=r.Class.extend({includes:r.Mixin.Events,options:{minWidth:50,maxWidth:300,maxHeight:null,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(t,e){r.setOptions(this,t),this._source=e,this._animated=r.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._container||this._initLayout(),this._updateContent();var e=t.options.fadeAnimation;e&&r.DomUtil.setOpacity(this._container,0),t._panes.popupPane.appendChild(this._container),t.on(this._getEvents(),this),this._update(),e&&r.DomUtil.setOpacity(this._container,1),this.fire("open"),t.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(t){return t.addLayer(this),this},openOn:function(t){return t.openPopup(this),this},onRemove:function(t){t._panes.popupPane.removeChild(this._container),r.Util.falseFn(this._container.offsetWidth),t.off(this._getEvents(),this),t.options.fadeAnimation&&r.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),t.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},setLatLng:function(t){return this._latlng=r.latLng(t),this._update(),this},setContent:function(t){return this._content=t,this._update(),this},_getEvents:function(){var t={viewreset:this._updatePosition};return this._animated&&(t.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,e="leaflet-popup",i=e+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),n=this._container=r.DomUtil.create("div",i);this.options.closeButton&&(t=this._closeButton=r.DomUtil.create("a",e+"-close-button",n),t.href="#close",t.innerHTML="&#215;",r.DomEvent.disableClickPropagation(t),r.DomEvent.on(t,"click",this._onCloseButtonClick,this));var o=this._wrapper=r.DomUtil.create("div",e+"-content-wrapper",n);r.DomEvent.disableClickPropagation(o),this._contentNode=r.DomUtil.create("div",e+"-content",o),r.DomEvent.on(this._contentNode,"mousewheel",r.DomEvent.stopPropagation),r.DomEvent.on(this._contentNode,"MozMousePixelScroll",r.DomEvent.stopPropagation),r.DomEvent.on(o,"contextmenu",r.DomEvent.stopPropagation),this._tipContainer=r.DomUtil.create("div",e+"-tip-container",n),this._tip=r.DomUtil.create("div",e+"-tip",this._tipContainer)},_update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&n>o?(e.height=o+"px",r.DomUtil.addClass(t,s)):r.DomUtil.removeClass(t,s),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=r.point(this.options.offset);e&&r.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);r.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new r.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(r.DomUtil.getPosition(this._container));var o=t.layerPointToContainerPoint(n),s=r.point(this.options.autoPanPadding),a=t.getSize(),l=0,h=0;o.x+i>a.x&&(l=o.x+i-a.x+s.x),o.x-l<0&&(l=o.x-s.x),o.y+e>a.y&&(h=o.y+e-a.y+s.y),o.y-h<0&&(h=o.y-s.y),(l||h)&&t.fire("autopanstart").panBy([l,h])}},_onCloseButtonClick:function(t){this._close(),r.DomEvent.stop(t)}}),r.popup=function(t,e){return new r.Popup(t,e)},r.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof r.Popup)){var n=t;t=new r.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),r.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=r.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(r.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=r.extend({offset:i},e),this._popup||this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),t instanceof r.Popup?(r.setOptions(t,e),this._popup=t):this._popup=new r.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup).off("remove",this.closePopup).off("move",this._movePopup)),this},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),r.LayerGroup=r.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return r.stamp(t)}}),r.layerGroup=function(t){return new r.LayerGroup(t)},r.FeatureGroup=r.LayerGroup.extend({includes:r.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:(t.on(r.FeatureGroup.EVENTS,this._propagateEvent,this),r.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.off(r.FeatureGroup.EVENTS,this._propagateEvent,this),r.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new r.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof r.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t.layer||(t.layer=t.target),t.target=this,this.fire(t.type,t)}}),r.featureGroup=function(t){return new r.FeatureGroup(t)},r.Path=r.Class.extend({includes:[r.Mixin.Events],statics:{CLIP_PADDING:function(){var e=r.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){r.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,r.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return r.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),r.Map.include({_updatePathViewport:function(){var t=r.Path.CLIP_PADDING,e=this.getSize(),i=r.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),o=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new r.Bounds(n,o)}}),r.Path.SVG_NS="http://www.w3.org/2000/svg",r.Browser.svg=!(!e.createElementNS||!e.createElementNS(r.Path.SVG_NS,"svg").createSVGRect),r.Path=r.Path.extend({statics:{SVG:r.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(r.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray")):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(r.Browser.svg||!r.Browser.vml)&&this._path.setAttribute("class","leaflet-clickable"),r.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e<t.length;e++)r.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),n=e.containerPointToLayerPoint(i),o=e.layerPointToLatLng(n);this.fire(t.type,{latlng:o,layerPoint:n,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&r.DomEvent.preventDefault(t),"mousemove"!==t.type&&r.DomEvent.stopPropagation(t)}}}),r.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=r.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&r.Browser.any3d?(this._pathRoot.setAttribute("class"," leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):this._pathRoot.setAttribute("class"," leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[r.DomUtil.TRANSFORM]=r.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,n=i.x-e.x,o=i.y-e.y,s=this._pathRoot,a=this._panes.overlayPane;r.Browser.mobileWebkit&&a.removeChild(s),r.DomUtil.setPosition(s,e),s.setAttribute("width",n),s.setAttribute("height",o),s.setAttribute("viewBox",[e.x,e.y,n,o].join(" ")),r.Browser.mobileWebkit&&a.appendChild(s)}}}),r.Path.include({bindPopup:function(t,e){return t instanceof r.Popup?this._popup=t:((!this._popup||e)&&(this._popup=new r.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),r.Browser.vml=!r.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),r.Path=r.Browser.svg||!r.Browser.vml?r.Path:r.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");
  21. r.DomUtil.addClass(t,"leaflet-vml-shape"),this.options.clickable&&r.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,t.dashStyle=i.dashArray?i.dashArray instanceof Array?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):""):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),r.Map.include(r.Browser.svg||!r.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),r.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),r.Path=r.Path.SVG&&!t.L_PREFER_CANVAS||!r.Browser.canvas?r.Path:r.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return r.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this._map=null},_requestUpdate:function(){this._map&&!r.Path._updateRequest&&(r.Path._updateRequest=r.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){r.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color)},_drawPath:function(){var t,e,i,n,o,s;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)o=this._parts[t][e],s=(0===e?"move":"line")+"To",this._ctx[s](o.x,o.y);this instanceof r.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill()),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onClick,this))},_onClick:function(t){this._containsPoint(t.layerPoint)&&this.fire("click",t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),r.Map.include(r.Path.SVG&&!t.L_PREFER_CANVAS||!r.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;r.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),r.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,r=typeof Uint8Array!=i+""?Uint8Array:Array,o=new r(n);o[0]=o[n-1]=1,this._simplifyDPStep(t,o,e,0,n-1);var s,a=[];for(s=0;n>s;s++)o[s]&&a.push(t[s]);return a},_simplifyDPStep:function(t,e,i,n,r){var o,s,a,l=0;for(s=n+1;r-1>=s;s++)a=this._sqClosestPointOnSegment(t[s],t[n],t[r],!0),a>l&&(o=s,l=a);l>i&&(e[o]=1,this._simplifyDPStep(t,e,i,n,o),this._simplifyDPStep(t,e,i,o,r))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,r=0,o=t.length;o>n;n++)this._sqDist(t[n],t[r])>e&&(i.push(t[n]),r=n);return o-1>r&&i.push(t[o-1]),i},clipSegment:function(t,e,i,n){var r,o,s,a=n?this._lastCode:this._getBitCode(t,i),l=this._getBitCode(e,i);for(this._lastCode=l;;){if(!(a|l))return[t,e];if(a&l)return!1;r=a||l,o=this._getEdgeIntersection(t,e,r,i),s=this._getBitCode(o,i),r===a?(t=o,a=s):(e=o,l=s)}},_getEdgeIntersection:function(t,e,i,n){var o=e.x-t.x,s=e.y-t.y,a=n.min,l=n.max;return 8&i?new r.Point(t.x+o*(l.y-t.y)/s,l.y):4&i?new r.Point(t.x+o*(a.y-t.y)/s,a.y):2&i?new r.Point(l.x,t.y+s*(l.x-t.x)/o):1&i?new r.Point(a.x,t.y+s*(a.x-t.x)/o):void 0},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var o,s=e.x,a=e.y,l=i.x-s,h=i.y-a,c=l*l+h*h;return c>0&&(o=((t.x-s)*l+(t.y-a)*h)/c,o>1?(s=i.x,a=i.y):o>0&&(s+=l*o,a+=h*o)),l=t.x-s,h=t.y-a,n?l*l+h*h:new r.Point(s,a)}},r.Polyline=r.Path.extend({initialize:function(t,e){r.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(r.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,o=this._parts,s=null,a=0,l=o.length;l>a;a++)for(var h=o[a],c=1,u=h.length;u>c;c++){e=h[c-1],i=h[c];var d=r.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,s=r.LineUtil._sqClosestPointOnSegment(t,e,i))}return s&&(s.distance=Math.sqrt(n)),s},getBounds:function(){return new r.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,o=e?t:[];for(i=0,n=t.length;n>i;i++){if(r.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;o[i]=r.latLng(t[i])}return o},_initEvents:function(){r.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=r.Path.VML,n=0,o=t.length,s="";o>n;n++)e=t[n],i&&e._round(),s+=(n?"L":"M")+e.x+" "+e.y;return s},_clipPoints:function(){var t,e,i,n=this._originalPoints,o=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var s=this._parts,a=this._map._pathViewport,l=r.LineUtil;for(t=0,e=0;o-1>t;t++)i=l.clipSegment(n[t],n[t+1],a,t),i&&(s[e]=s[e]||[],s[e].push(i[0]),(i[1]!==n[t+1]||t===o-2)&&(s[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=r.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),r.Path.prototype._updatePath.call(this))}}),r.polyline=function(t,e){return new r.Polyline(t,e)},r.PolyUtil={},r.PolyUtil.clipPolygon=function(t,e){var i,n,o,s,a,l,h,c,u,d=[1,4,2,8],p=r.LineUtil;for(n=0,h=t.length;h>n;n++)t[n]._code=p._getBitCode(t[n],e);for(s=0;4>s;s++){for(c=d[s],i=[],n=0,h=t.length,o=h-1;h>n;o=n++)a=t[n],l=t[o],a._code&c?l._code&c||(u=p._getEdgeIntersection(l,a,c,e),u._code=p._getBitCode(u,e),i.push(u)):(l._code&c&&(u=p._getEdgeIntersection(l,a,c,e),u._code=p._getBitCode(u,e),i.push(u)),i.push(a));t=i}return t},r.Polygon=r.Polyline.extend({options:{fill:!0},initialize:function(t,e){var i,n,o;if(r.Polyline.prototype.initialize.call(this,t,e),t&&r.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),i=0,n=this._holes.length;n>i;i++)o=this._holes[i]=this._convertLatLngs(this._holes[i]),o[0].equals(o[o.length-1])&&o.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(r.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var o=r.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);o.length&&e.push(o)}this._parts=e}},_getPathPartStr:function(t){var e=r.Polyline.prototype._getPathPartStr.call(this,t);return e+(r.Browser.svg?"z":"x")}}),r.polygon=function(t,e){return new r.Polygon(t,e)},function(){function t(t){return r.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}r.MultiPolyline=t(r.Polyline),r.MultiPolygon=t(r.Polygon),r.multiPolyline=function(t,e){return new r.MultiPolyline(t,e)},r.multiPolygon=function(t,e){return new r.MultiPolygon(t,e)}}(),r.Rectangle=r.Polygon.extend({initialize:function(t,e){r.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=r.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),r.rectangle=function(t,e){return new r.Rectangle(t,e)},r.Circle=r.Path.extend({initialize:function(t,e,i){r.Path.prototype.initialize.call(this,i),this._latlng=r.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=r.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=360*(this._mRadius/40075017),i=this._latlng;return new r.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":r.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return 360*(this._mRadius/40075017)},_getLngRadius:function(){return this._getLatRadius()/Math.cos(r.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),r.circle=function(t,e,i){return new r.Circle(t,e,i)},r.CircleMarker=r.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){r.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){r.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()}}),r.circleMarker=function(t,e){return new r.CircleMarker(t,e)},r.Polyline.include(r.Path.CANVAS?{_containsPoint:function(t,e){var i,n,o,s,a,l,h,c=this.options.weight/2;for(r.Browser.touch&&(c+=10),i=0,s=this._parts.length;s>i;i++)for(h=this._parts[i],n=0,a=h.length,o=a-1;a>n;o=n++)if((e||0!==n)&&(l=r.LineUtil.pointToSegmentDistance(t,h[o],h[n]),c>=l))return!0;return!1}}:{}),r.Polygon.include(r.Path.CANVAS?{_containsPoint:function(t){var e,i,n,o,s,a,l,h,c=!1;if(r.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(o=0,l=this._parts.length;l>o;o++)for(e=this._parts[o],s=0,h=e.length,a=h-1;h>s;a=s++)i=e[s],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(c=!c);return c}}:{}),r.Circle.include(r.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),r.CircleMarker.include(r.Path.CANVAS?{_updateStyle:function(){r.Path.prototype._updateStyle.call(this)}}:{}),r.GeoJSON=r.FeatureGroup.extend({initialize:function(t,e){r.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=r.Util.isArray(t)?t:t.features;if(o){for(e=0,i=o.length;i>e;e++)n=o[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(o[e]);return this}var s=this.options;if(!s.filter||s.filter(t)){var a=r.GeoJSON.geometryToLayer(t,s.pointToLayer,s.coordsToLatLng);return a.feature=r.GeoJSON.asFeature(t),a.defaultOptions=a.options,this.resetStyle(a),s.onEachFeature&&s.onEachFeature(t,a),this.addLayer(a)}},resetStyle:function(t){var e=this.options.style;e&&(r.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),r.extend(r.GeoJSON,{geometryToLayer:function(t,e,i){var n,o,s,a,l,h="Feature"===t.type?t.geometry:t,c=h.coordinates,u=[];switch(i=i||this.coordsToLatLng,h.type){case"Point":return n=i(c),e?e(t,n):new r.Marker(n);case"MultiPoint":for(s=0,a=c.length;a>s;s++)n=i(c[s]),l=e?e(t,n):new r.Marker(n),u.push(l);return new r.FeatureGroup(u);case"LineString":return o=this.coordsToLatLngs(c,0,i),new r.Polyline(o);case"Polygon":return o=this.coordsToLatLngs(c,1,i),new r.Polygon(o);case"MultiLineString":return o=this.coordsToLatLngs(c,1,i),new r.MultiPolyline(o);case"MultiPolygon":return o=this.coordsToLatLngs(c,2,i),new r.MultiPolygon(o);case"GeometryCollection":for(s=0,a=h.geometries.length;a>s;s++)l=this.geometryToLayer({geometry:h.geometries[s],type:"Feature",properties:t.properties},e,i),u.push(l);return new r.FeatureGroup(u);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new r.LatLng(t[1],t[0])},coordsToLatLngs:function(t,e,i){var n,r,o,s=[];for(r=0,o=t.length;o>r;r++)n=e?this.coordsToLatLngs(t[r],e-1,i):(i||this.coordsToLatLng)(t[r]),s.push(n);return s},latLngToCoords:function(t){return[t.lng,t.lat]},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(r.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?r.extend({},t.feature,{geometry:e}):r.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var s={toGeoJSON:function(){return r.GeoJSON.getFeature(this,{type:"Point",coordinates:r.GeoJSON.latLngToCoords(this.getLatLng())})}};r.Marker.include(s),r.Circle.include(s),r.CircleMarker.include(s),r.Polyline.include({toGeoJSON:function(){return r.GeoJSON.getFeature(this,{type:"LineString",coordinates:r.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),r.Polygon.include({toGeoJSON:function(){var t,e,i,n=[r.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=r.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return r.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t,e){t.include({toGeoJSON:function(){var t=[];return this.eachLayer(function(e){t.push(e.toGeoJSON().geometry.coordinates)}),r.GeoJSON.getFeature(this,{type:e,coordinates:t})}})}t(r.MultiPolyline,"MultiLineString"),t(r.MultiPolygon,"MultiPolygon")}(),r.LayerGroup.include({toGeoJSON:function(){var t=[];return this.eachLayer(function(e){e.toGeoJSON&&t.push(r.GeoJSON.asFeature(e.toGeoJSON()))}),{type:"FeatureCollection",features:t}}}),r.geoJson=function(t,e){return new r.GeoJSON(t,e)},r.DomEvent={addListener:function(t,e,i,n){var o,s,a,l=r.stamp(i),h="_leaflet_"+e+l;return t[h]?this:(o=function(e){return i.call(n||t,e||r.DomEvent._getEvent())},r.Browser.msTouch&&0===e.indexOf("touch")?this.addMsTouchListener(t,e,o,l):(r.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,o,l),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",o,!1),t.addEventListener(e,o,!1)):"mouseenter"===e||"mouseleave"===e?(s=o,a="mouseenter"===e?"mouseover":"mouseout",o=function(e){return r.DomEvent._checkMouse(t,e)?s(e):void 0},t.addEventListener(a,o,!1)):"click"===e&&r.Browser.android?(s=o,o=function(t){return r.DomEvent._filterClick(t,s)},t.addEventListener(e,o,!1)):t.addEventListener(e,o,!1):"attachEvent"in t&&t.attachEvent("on"+e,o),t[h]=o,this))},removeListener:function(t,e,i){var n=r.stamp(i),o="_leaflet_"+e+n,s=t[o];return s?(r.Browser.msTouch&&0===e.indexOf("touch")?this.removeMsTouchListener(t,e,n):r.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",s,!1),t.removeEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",s,!1):t.removeEventListener(e,s,!1):"detachEvent"in t&&t.detachEvent("on"+e,s),t[o]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,this},disableClickPropagation:function(t){for(var e=r.DomEvent.stopPropagation,i=r.Draggable.START.length-1;i>=0;i--)r.DomEvent.addListener(t,r.Draggable.START[i],e);return r.DomEvent.addListener(t,"click",r.DomEvent._fakeStop).addListener(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return r.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,i){var n=r.Browser.ie7,o=e.body,s=e.documentElement,a=t.pageX?t.pageX-o.scrollLeft-s.scrollLeft:t.clientX,l=t.pageY?t.pageY-o.scrollTop-s.scrollTop:t.clientY,h=new r.Point(a,l),c=i.getBoundingClientRect(),u=c.left-i.clientLeft,d=c.top-i.clientTop;return r.DomUtil.documentIsLtr()||!r.Browser.webkit&&!n||(u+=i.scrollWidth-i.clientWidth,n&&"hidden"!==r.DomUtil.getStyle(i,"overflow-y")&&"hidden"!==r.DomUtil.getStyle(i,"overflow")&&(u+=17)),h._subtract(new r.Point(u,d))},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){r.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=r.DomEvent._lastClick&&i-r.DomEvent._lastClick;return n&&n>100&&1e3>n||t.target._simulatedClick&&!t._simulated?void r.DomEvent.stop(t):(r.DomEvent._lastClick=i,e(t))}},r.DomEvent.on=r.DomEvent.addListener,r.DomEvent.off=r.DomEvent.removeListener,r.Draggable=r.Class.extend({includes:r.Mixin.Events,statics:{START:r.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=r.Draggable.START.length-1;t>=0;t--)r.DomEvent.on(this._dragStartTarget,r.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=r.Draggable.START.length-1;t>=0;t--)r.DomEvent.off(this._dragStartTarget,r.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(r.DomEvent.stopPropagation(t),!r.Draggable._disabled)){r.DomUtil.disableImageDrag(),r.DomUtil.disableTextSelection();var i=t.touches?t.touches[0]:t,n=i.target;r.Browser.touch&&"a"===n.tagName.toLowerCase()&&r.DomUtil.addClass(n,"leaflet-active"),this._moved=!1,this._moving||(this._startPoint=new r.Point(i.clientX,i.clientY),this._startPos=this._newPos=r.DomUtil.getPosition(this._element),r.DomEvent.on(e,r.Draggable.MOVE[t.type],this._onMove,this).on(e,r.Draggable.END[t.type],this._onUp,this))}},_onMove:function(t){if(!(t.touches&&t.touches.length>1)){var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new r.Point(i.clientX,i.clientY),o=n.subtract(this._startPoint);(o.x||o.y)&&(r.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=r.DomUtil.getPosition(this._element).subtract(o),r.Browser.touch||r.DomUtil.addClass(e.body,"leaflet-dragging")),this._newPos=this._startPos.add(o),this._moving=!0,r.Util.cancelAnimFrame(this._animRequest),this._animRequest=r.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget))}},_updatePosition:function(){this.fire("predrag"),r.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){r.Browser.touch||r.DomUtil.removeClass(e.body,"leaflet-dragging");for(var t in r.Draggable.MOVE)r.DomEvent.off(e,r.Draggable.MOVE[t],this._onMove).off(e,r.Draggable.END[t],this._onUp);r.DomUtil.enableImageDrag(),r.DomUtil.enableTextSelection(),this._moved&&(r.Util.cancelAnimFrame(this._animRequest),this.fire("dragend")),this._moving=!1}}),r.Handler=r.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),r.Map.mergeOptions({dragging:!0,inertia:!r.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:r.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),r.Map.Drag=r.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new r.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),this._onViewReset())}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,r=(n-e+i)%t+e-i,o=(n+e+i)%t-e-i,s=Math.abs(r+i)<Math.abs(o+i)?r:o;this._draggable._newPos.x=s},_onDragEnd:function(){var t=this._map,e=t.options,i=+new Date-this._lastTime,n=!e.inertia||i>e.inertiaThreshold||!this._positions[0];if(t.fire("dragend"),n)t.fire("moveend");else{var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime+i-this._times[0])/1e3,a=e.easeLinearity,l=o.multiplyBy(a/s),h=l.distanceTo([0,0]),c=Math.min(e.inertiaMaxSpeed,h),u=l.multiplyBy(c/h),d=c/(e.inertiaDeceleration*a),p=u.multiplyBy(-d/2).round();p.x&&p.y?r.Util.requestAnimFrame(function(){t.panBy(p,{duration:d,easeLinearity:a,noMoveStart:!0})}):t.fire("moveend")}}}),r.Map.addInitHook("addHandler","dragging",r.Map.Drag),r.Map.mergeOptions({doubleClickZoom:!0}),r.Map.DoubleClickZoom=r.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick)},_onDoubleClick:function(t){this.setZoomAround(t.containerPoint,this._zoom+1)}}),r.Map.addInitHook("addHandler","doubleClickZoom",r.Map.DoubleClickZoom),r.Map.mergeOptions({scrollWheelZoom:!0}),r.Map.ScrollWheelZoom=r.Handler.extend({addHooks:function(){r.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),r.DomEvent.on(this._map._container,"MozMousePixelScroll",r.DomEvent.preventDefault),this._delta=0},removeHooks:function(){r.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),r.DomEvent.off(this._map._container,"MozMousePixelScroll",r.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=r.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(r.bind(this._performZoom,this),i),r.DomEvent.preventDefault(t),r.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&t.setZoomAround(this._lastMousePos,i+e)}}),r.Map.addInitHook("addHandler","scrollWheelZoom",r.Map.ScrollWheelZoom),r.extend(r.DomEvent,{_touchstart:r.Browser.msTouch?"MSPointerDown":"touchstart",_touchend:r.Browser.msTouch?"MSPointerUp":"touchend",addDoubleTapListener:function(t,i,n){function o(t){var e;if(r.Browser.msTouch?(f.push(t.pointerId),e=f.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(a||i);l=t.touches?t.touches[0]:t,h=n>0&&c>=n,a=i}}function s(t){if(r.Browser.msTouch){var e=f.indexOf(t.pointerId);if(-1===e)return;f.splice(e,1)}if(h){if(r.Browser.msTouch){var n,o={};for(var s in l)n=l[s],o[s]="function"==typeof n?n.bind(l):n;l=o}l.type="dblclick",i(l),a=null}}var a,l,h=!1,c=250,u="_leaflet_",d=this._touchstart,p=this._touchend,f=[];t[u+d+n]=o,t[u+p+n]=s;var m=r.Browser.msTouch?e.documentElement:t;return t.addEventListener(d,o,!1),m.addEventListener(p,s,!1),r.Browser.msTouch&&m.addEventListener("MSPointerCancel",s,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(r.Browser.msTouch?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),r.Browser.msTouch&&e.documentElement.removeEventListener("MSPointerCancel",t[n+this._touchend+i],!1),this}}),r.extend(r.DomEvent,{_msTouches:[],_msDocumentListener:!1,addMsTouchListener:function(t,e,i,n){switch(e){case"touchstart":return this.addMsTouchListenerStart(t,e,i,n);case"touchend":return this.addMsTouchListenerEnd(t,e,i,n);case"touchmove":return this.addMsTouchListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addMsTouchListenerStart:function(t,i,n,r){var o="_leaflet_",s=this._msTouches,a=function(t){for(var e=!1,i=0;i<s.length;i++)if(s[i].pointerId===t.pointerId){e=!0;break}e||s.push(t),t.touches=s.slice(),t.changedTouches=[t],n(t)};if(t[o+"touchstart"+r]=a,t.addEventListener("MSPointerDown",a,!1),!this._msDocumentListener){var l=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}};e.documentElement.addEventListener("MSPointerUp",l,!1),e.documentElement.addEventListener("MSPointerCancel",l,!1),this._msDocumentListener=!0}return this},addMsTouchListenerMove:function(t,e,i,n){function r(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE||0!==t.buttons){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s[e]=t;break}t.touches=s.slice(),t.changedTouches=[t],i(t)}}var o="_leaflet_",s=this._msTouches;return t[o+"touchmove"+n]=r,t.addEventListener("MSPointerMove",r,!1),this},addMsTouchListenerEnd:function(t,e,i,n){var r="_leaflet_",o=this._msTouches,s=function(t){for(var e=0;e<o.length;e++)if(o[e].pointerId===t.pointerId){o.splice(e,1);break}t.touches=o.slice(),t.changedTouches=[t],i(t)};return t[r+"touchend"+n]=s,t.addEventListener("MSPointerUp",s,!1),t.addEventListener("MSPointerCancel",s,!1),this},removeMsTouchListener:function(t,e,i){var n="_leaflet_",r=t[n+e+i];switch(e){case"touchstart":t.removeEventListener("MSPointerDown",r,!1);break;case"touchmove":t.removeEventListener("MSPointerMove",r,!1);break;case"touchend":t.removeEventListener("MSPointerUp",r,!1),t.removeEventListener("MSPointerCancel",r,!1)}return this}}),r.Map.mergeOptions({touchZoom:r.Browser.touch&&!r.Browser.android23}),r.Map.TouchZoom=r.Handler.extend({addHooks:function(){r.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){r.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToLayerPoint(t.touches[0]),o=i.mouseEventToLayerPoint(t.touches[1]),s=i._getCenterLayerPoint();this._startCenter=n.add(o)._divideBy(2),this._startDist=n.distanceTo(o),this._moved=!1,this._zooming=!0,this._centerOffset=s.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),r.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),r.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(this._moved||(r.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),r.Util.cancelAnimFrame(this._animRequest),this._animRequest=r.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),r.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,r.DomUtil.removeClass(t._mapPane,"leaflet-touching"),r.Util.cancelAnimFrame(this._animRequest),r.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),o=t.getZoom(),s=t.getScaleZoom(this._scale)-o,a=s>0?Math.ceil(s):Math.floor(s),l=t._limitZoom(o+a),h=t.getZoomScale(l)/this._scale;t._animateZoom(n,l,i,h)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),r.Map.addInitHook("addHandler","touchZoom",r.Map.TouchZoom),r.Map.mergeOptions({tap:!0,tapTolerance:15}),r.Map.Tap=r.Handler.extend({addHooks:function(){r.DomEvent.on(this._map._container,"touchstart",this._onDown,this)
  22. },removeHooks:function(){r.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(r.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new r.Point(i.clientX,i.clientY),"a"===n.tagName.toLowerCase()&&r.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(r.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),r.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),r.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;"a"===n.tagName.toLowerCase()&&r.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new r.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var r=e.createEvent("MouseEvents");r._simulated=!0,n.target._simulatedClick=!0,r.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(r)}}),r.Browser.touch&&!r.Browser.msTouch&&r.Map.addInitHook("addHandler","tap",r.Map.Tap),r.Map.mergeOptions({boxZoom:!0}),r.Map.BoxZoom=r.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){r.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){r.DomEvent.off(this._container,"mousedown",this._onMouseDown)},_onMouseDown:function(t){return!t.shiftKey||1!==t.which&&1!==t.button?!1:(r.DomUtil.disableTextSelection(),r.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),this._box=r.DomUtil.create("div","leaflet-zoom-box",this._pane),r.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",r.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this),void this._map.fire("boxzoomstart"))},_onMouseMove:function(t){var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),o=n.subtract(e),s=new r.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));r.DomUtil.setPosition(i,s),i.style.width=Math.max(0,Math.abs(o.x)-4)+"px",i.style.height=Math.max(0,Math.abs(o.y)-4)+"px"},_finish:function(){this._pane.removeChild(this._box),this._container.style.cursor="",r.DomUtil.enableTextSelection(),r.DomUtil.enableImageDrag(),r.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new r.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),r.Map.addInitHook("addHandler","boxZoom",r.Map.BoxZoom),r.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),r.Map.Keyboard=r.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),r.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;r.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,r=i.scrollTop||n.scrollTop,o=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(o,r)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},r=this.keyCodes;for(e=0,i=r.left.length;i>e;e++)n[r.left[e]]=[-1*t,0];for(e=0,i=r.right.length;i>e;e++)n[r.right[e]]=[t,0];for(e=0,i=r.down.length;i>e;e++)n[r.down[e]]=[0,t];for(e=0,i=r.up.length;i>e;e++)n[r.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},r=this.keyCodes;for(e=0,i=r.zoomIn.length;i>e;e++)n[r.zoomIn[e]]=t;for(e=0,i=r.zoomOut.length;i>e;e++)n[r.zoomOut[e]]=-t},_addHooks:function(){r.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){r.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}r.DomEvent.stop(t)}}),r.Map.addInitHook("addHandler","keyboard",r.Map.Keyboard),r.Handler.MarkerDrag=r.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new r.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable()},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=r.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&r.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(){this._marker.fire("moveend").fire("dragend")}}),r.Control=r.Class.extend({options:{position:"topright"},initialize:function(t){r.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return r.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this}}),r.control=function(t){return new r.Control(t)},r.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,o){var s=i+t+" "+i+o;e[t+o]=r.DomUtil.create("div",s,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=r.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),r.Control.Zoom=r.Control.extend({options:{position:"topleft"},onAdd:function(t){var e="leaflet-control-zoom",i=r.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton("+","Zoom in",e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton("-","Zoom out",e+"-out",i,this._zoomOut,this),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,o,s){var a=r.DomUtil.create("a",i,n);a.innerHTML=t,a.href="#",a.title=e;var l=r.DomEvent.stopPropagation;return r.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",r.DomEvent.preventDefault).on(a,"click",o,s),a},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";r.DomUtil.removeClass(this._zoomInButton,e),r.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&r.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&r.DomUtil.addClass(this._zoomInButton,e)}}),r.Map.mergeOptions({zoomControl:!0}),r.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new r.Control.Zoom,this.addControl(this.zoomControl))}),r.control.zoom=function(t){return new r.Control.Zoom(t)},r.Control.Attribution=r.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){r.setOptions(this,t),this._attributions={}},onAdd:function(t){return this._container=r.DomUtil.create("div","leaflet-control-attribution"),r.DomEvent.disableClickPropagation(this._container),t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),r.Map.mergeOptions({attributionControl:!0}),r.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new r.Control.Attribution).addTo(this))}),r.control.attribution=function(t){return new r.Control.Attribution(t)},r.Control.Scale=r.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=r.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=r.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=r.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,r=this._map.getSize(),o=this.options,s=0;r.x>0&&(s=n*(o.maxWidth/r.x)),this._updateScales(o,s)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,r=3.2808399*t,o=this._iScale;r>5280?(e=r/5280,i=this._getRoundNum(e),o.style.width=this._getScaleWidth(i/e)+"px",o.innerHTML=i+" mi"):(n=this._getRoundNum(r),o.style.width=this._getScaleWidth(n/r)+"px",o.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),r.control.scale=function(t){return new r.Control.Scale(t)},r.Control.Layers=r.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){r.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange).off("layerremove",this._onLayerChange)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=r.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=r.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),r.Browser.touch?r.DomEvent.on(e,"click",r.DomEvent.stopPropagation):(r.DomEvent.disableClickPropagation(e),r.DomEvent.on(e,"mousewheel",r.DomEvent.stopPropagation));var i=this._form=r.DomUtil.create("form",t+"-list");if(this.options.collapsed){r.Browser.android||r.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=r.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",r.Browser.touch?r.DomEvent.on(n,"click",r.DomEvent.stop).on(n,"click",this._expand,this):r.DomEvent.on(n,"focus",this._expand,this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=r.DomUtil.create("div",t+"-base",i),this._separator=r.DomUtil.create("div",t+"-separator",i),this._overlaysList=r.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=r.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[r.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"';i&&(n+=' checked="checked"'),n+="/>";var r=e.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(t){var i,n=e.createElement("label"),o=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=o):i=this._createRadioElement("leaflet-base-layers",o),i.layerId=r.stamp(t.layer),r.DomEvent.on(i,"click",this._onInputClick,this);var s=e.createElement("span");s.innerHTML=" "+t.name,n.appendChild(i),n.appendChild(s);var a=t.overlay?this._overlaysList:this._baseLayersList;return a.appendChild(n),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),r=n.length;for(this._handlingClick=!0,t=0;r>t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1},_expand:function(){r.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),r.control.layers=function(t,e,i){return new r.Control.Layers(t,e,i)},r.PosAnimation=r.Class.extend({includes:r.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[r.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",r.DomEvent.on(t,r.DomUtil.TRANSITION_END,this._onTransitionEnd,this),r.DomUtil.setPosition(t,e),r.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(r.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(r.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),r.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,o=this._el,s=t.getComputedStyle(o);if(r.Browser.any3d){if(n=s[r.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(s.left),i=parseFloat(s.top);return new r.Point(e,i,!0)},_onTransitionEnd:function(){r.DomEvent.off(this._el,r.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[r.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),r.Map.include({setView:function(t,e,n){if(e=this._limitZoom(e),t=r.latLng(t),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=r.extend({animate:n.animate},n.zoom),n.pan=r.extend({animate:n.animate},n.pan));var o=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(o)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=r.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new r.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){r.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){r.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),r.PosAnimation=r.DomUtil.TRANSITION?r.PosAnimation:r.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=r.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=r.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));r.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){r.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),r.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),r.DomUtil.TRANSITION&&r.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&r.DomUtil.TRANSITION&&r.Browser.any3d&&!r.Browser.android23&&!r.Browser.mobileOpera,this._zoomAnimated&&r.DomEvent.on(this._mapPane,r.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),r.Map.include(r.DomUtil.TRANSITION?{_catchTransitionEnd:function(){this._animatingZoom&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),r=this._getCenterOffset(t)._divideBy(1-1/n),o=this._getCenterLayerPoint()._add(r);return i.animate===!0||this.getSize().contains(r)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,o,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,o,s){this._animatingZoom=!0,r.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,r.Draggable&&(r.Draggable._disabled=!0),this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:o,backwards:s})},_onZoomTransitionEnd:function(){this._animatingZoom=!1,r.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),r.Draggable&&(r.Draggable._disabled=!1)}}:{}),r.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=r.DomUtil.TRANSFORM,n=t.delta?r.DomUtil.getTranslateString(t.delta):e.style[i],o=r.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?o+" "+n:n+" "+o},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),r.Util.falseFn(e.offsetWidth),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[r.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),n=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[r.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),r=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&r++;return r/i},_stopLoadingImages:function(t){var e,i,n,o=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=o.length;i>e;e++)n=o[e],n.complete||(n.onload=r.Util.falseFn,n.onerror=r.Util.falseFn,n.src=r.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),r.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=r.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=r.bind(this._handleGeolocationResponse,this),i=r.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new r.LatLng(e,i),o=180*t.coords.accuracy/40075017,s=o/Math.cos(r.LatLng.DEG_TO_RAD*e),a=r.latLngBounds([e-o,i-s],[e+o,i+s]),l=this._locateOptions;if(l.setView){var h=Math.min(this.getBoundsZoom(a),l.maxZoom);this.setView(n,h)}var c={latlng:n,bounds:a};for(var u in t.coords)"number"==typeof t.coords[u]&&(c[u]=t.coords[u]);this.fire("locationfound",c)}})}(window,document);var THREE={REVISION:"69"};"object"==typeof module&&(module.exports=THREE),void 0===Math.sign&&(Math.sign=function(t){return 0>t?-1:t>0?1:0}),THREE.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},THREE.CullFaceNone=0,THREE.CullFaceBack=1,THREE.CullFaceFront=2,THREE.CullFaceFrontBack=3,THREE.FrontFaceDirectionCW=0,THREE.FrontFaceDirectionCCW=1,THREE.BasicShadowMap=0,THREE.PCFShadowMap=1,THREE.PCFSoftShadowMap=2,THREE.FrontSide=0,THREE.BackSide=1,THREE.DoubleSide=2,THREE.NoShading=0,THREE.FlatShading=1,THREE.SmoothShading=2,THREE.NoColors=0,THREE.FaceColors=1,THREE.VertexColors=2,THREE.NoBlending=0,THREE.NormalBlending=1,THREE.AdditiveBlending=2,THREE.SubtractiveBlending=3,THREE.MultiplyBlending=4,THREE.CustomBlending=5,THREE.AddEquation=100,THREE.SubtractEquation=101,THREE.ReverseSubtractEquation=102,THREE.MinEquation=103,THREE.MaxEquation=104,THREE.ZeroFactor=200,THREE.OneFactor=201,THREE.SrcColorFactor=202,THREE.OneMinusSrcColorFactor=203,THREE.SrcAlphaFactor=204,THREE.OneMinusSrcAlphaFactor=205,THREE.DstAlphaFactor=206,THREE.OneMinusDstAlphaFactor=207,THREE.DstColorFactor=208,THREE.OneMinusDstColorFactor=209,THREE.SrcAlphaSaturateFactor=210,THREE.MultiplyOperation=0,THREE.MixOperation=1,THREE.AddOperation=2,THREE.UVMapping=function(){},THREE.CubeReflectionMapping=function(){},THREE.CubeRefractionMapping=function(){},THREE.SphericalReflectionMapping=function(){},THREE.SphericalRefractionMapping=function(){},THREE.RepeatWrapping=1e3,THREE.ClampToEdgeWrapping=1001,THREE.MirroredRepeatWrapping=1002,THREE.NearestFilter=1003,THREE.NearestMipMapNearestFilter=1004,THREE.NearestMipMapLinearFilter=1005,THREE.LinearFilter=1006,THREE.LinearMipMapNearestFilter=1007,THREE.LinearMipMapLinearFilter=1008,THREE.UnsignedByteType=1009,THREE.ByteType=1010,THREE.ShortType=1011,THREE.UnsignedShortType=1012,THREE.IntType=1013,THREE.UnsignedIntType=1014,THREE.FloatType=1015,THREE.UnsignedShort4444Type=1016,THREE.UnsignedShort5551Type=1017,THREE.UnsignedShort565Type=1018,THREE.AlphaFormat=1019,THREE.RGBFormat=1020,THREE.RGBAFormat=1021,THREE.LuminanceFormat=1022,THREE.LuminanceAlphaFormat=1023,THREE.RGB_S3TC_DXT1_Format=2001,THREE.RGBA_S3TC_DXT1_Format=2002,THREE.RGBA_S3TC_DXT3_Format=2003,THREE.RGBA_S3TC_DXT5_Format=2004,THREE.RGB_PVRTC_4BPPV1_Format=2100,THREE.RGB_PVRTC_2BPPV1_Format=2101,THREE.RGBA_PVRTC_4BPPV1_Format=2102,THREE.RGBA_PVRTC_2BPPV1_Format=2103,THREE.Color=function(t){return 3===arguments.length?this.setRGB(arguments[0],arguments[1],arguments[2]):this.set(t)},THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,set:function(t){return t instanceof THREE.Color?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(t,e,i){if(0===e)this.r=this.g=this.b=i;else{var n=function(t,e,i){return 0>i&&(i+=1),i>1&&(i-=1),1/6>i?t+6*(e-t)*i:.5>i?e:2/3>i?t+6*(e-t)*(2/3-i):t};e=.5>=i?i*(1+e):i+e-i*e,i=2*i-e,this.r=n(i,e,t+1/3),this.g=n(i,e,t),this.b=n(i,e,t-1/3)}return this},setStyle:function(t){return/^rgb\((\d+), ?(\d+), ?(\d+)\)$/i.test(t)?(t=/^rgb\((\d+), ?(\d+), ?(\d+)\)$/i.exec(t),this.r=Math.min(255,parseInt(t[1],10))/255,this.g=Math.min(255,parseInt(t[2],10))/255,this.b=Math.min(255,parseInt(t[3],10))/255,this):/^rgb\((\d+)\%, ?(\d+)\%, ?(\d+)\%\)$/i.test(t)?(t=/^rgb\((\d+)\%, ?(\d+)\%, ?(\d+)\%\)$/i.exec(t),this.r=Math.min(100,parseInt(t[1],10))/100,this.g=Math.min(100,parseInt(t[2],10))/100,this.b=Math.min(100,parseInt(t[3],10))/100,this):/^\#([0-9a-f]{6})$/i.test(t)?(t=/^\#([0-9a-f]{6})$/i.exec(t),this.setHex(parseInt(t[1],16)),this):/^\#([0-9a-f])([0-9a-f])([0-9a-f])$/i.test(t)?(t=/^\#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(t),this.setHex(parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3],16)),this):/^(\w+)$/i.test(t)?(this.setHex(THREE.ColorKeywords[t]),this):void 0},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t){return this.r=t.r*t.r,this.g=t.g*t.g,this.b=t.b*t.b,this},copyLinearToGamma:function(t){return this.r=Math.sqrt(t.r),this.g=Math.sqrt(t.g),this.b=Math.sqrt(t.b),this},convertGammaToLinear:function(){var t=this.r,e=this.g,i=this.b;return this.r=t*t,this.g=e*e,this.b=i*i,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){t=t||{h:0,s:0,l:0};var e,i=this.r,n=this.g,r=this.b,o=Math.max(i,n,r),s=Math.min(i,n,r),a=(s+o)/2;if(s===o)s=e=0;else{var l=o-s,s=.5>=a?l/(o+s):l/(2-o-s);switch(o){case i:e=(n-r)/l+(r>n?6:0);break;case n:e=(r-i)/l+2;break;case r:e=(i-n)/l+4}e/=6}return t.h=e,t.s=s,t.l=a,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(t,e,i){var n=this.getHSL();return n.h+=t,n.s+=e,n.l+=i,this.setHSL(n.h,n.s,n.l),this},add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t){return this.r=t[0],this.g=t[1],this.b=t[2],this},toArray:function(){return[this.r,this.g,this.b]},clone:function(){return(new THREE.Color).setRGB(this.r,this.g,this.b)}},THREE.ColorKeywords={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},THREE.Quaternion=function(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=void 0!==n?n:1
  23. },THREE.Quaternion.prototype={constructor:THREE.Quaternion,_x:0,_y:0,_z:0,_w:0,get x(){return this._x},set x(t){this._x=t,this.onChangeCallback()},get y(){return this._y},set y(t){this._y=t,this.onChangeCallback()},get z(){return this._z},set z(t){this._z=t,this.onChangeCallback()},get w(){return this._w},set w(t){this._w=t,this.onChangeCallback()},set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this.onChangeCallback(),this},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!1==t instanceof THREE.Euler)throw Error("THREE.Quaternion: .setFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var i=Math.cos(t._x/2),n=Math.cos(t._y/2),r=Math.cos(t._z/2),o=Math.sin(t._x/2),s=Math.sin(t._y/2),a=Math.sin(t._z/2);return"XYZ"===t.order?(this._x=o*n*r+i*s*a,this._y=i*s*r-o*n*a,this._z=i*n*a+o*s*r,this._w=i*n*r-o*s*a):"YXZ"===t.order?(this._x=o*n*r+i*s*a,this._y=i*s*r-o*n*a,this._z=i*n*a-o*s*r,this._w=i*n*r+o*s*a):"ZXY"===t.order?(this._x=o*n*r-i*s*a,this._y=i*s*r+o*n*a,this._z=i*n*a+o*s*r,this._w=i*n*r-o*s*a):"ZYX"===t.order?(this._x=o*n*r-i*s*a,this._y=i*s*r+o*n*a,this._z=i*n*a-o*s*r,this._w=i*n*r+o*s*a):"YZX"===t.order?(this._x=o*n*r+i*s*a,this._y=i*s*r+o*n*a,this._z=i*n*a-o*s*r,this._w=i*n*r-o*s*a):"XZY"===t.order&&(this._x=o*n*r-i*s*a,this._y=i*s*r-o*n*a,this._z=i*n*a+o*s*r,this._w=i*n*r+o*s*a),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var i=e/2,n=Math.sin(i);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(i),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e=t.elements,i=e[0];t=e[4];var n=e[8],r=e[1],o=e[5],s=e[9],a=e[2],l=e[6],e=e[10],h=i+o+e;return h>0?(i=.5/Math.sqrt(h+1),this._w=.25/i,this._x=(l-s)*i,this._y=(n-a)*i,this._z=(r-t)*i):i>o&&i>e?(i=2*Math.sqrt(1+i-o-e),this._w=(l-s)/i,this._x=.25*i,this._y=(t+r)/i,this._z=(n+a)/i):o>e?(i=2*Math.sqrt(1+o-i-e),this._w=(n-a)/i,this._x=(t+r)/i,this._y=.25*i,this._z=(s+l)/i):(i=2*Math.sqrt(1+e-i-o),this._w=(r-t)/i,this._x=(n+a)/i,this._y=(s+l)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e;return function(i,n){return void 0===t&&(t=new THREE.Vector3),e=i.dot(n)+1,1e-6>e?(e=0,Math.abs(i.x)>Math.abs(i.z)?t.set(-i.y,i.x,0):t.set(0,-i.z,i.y)):t.crossVectors(i,n),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize(),this}}(),inverse:function(){return this.conjugate().normalize(),this},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return 0===t?(this._z=this._y=this._x=0,this._w=1):(t=1/t,this._x*=t,this._y*=t,this._z*=t,this._w*=t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},multiplyQuaternions:function(t,e){var i=t._x,n=t._y,r=t._z,o=t._w,s=e._x,a=e._y,l=e._z,h=e._w;return this._x=i*h+o*s+n*l-r*a,this._y=n*h+o*a+r*s-i*l,this._z=r*h+o*l+i*a-n*s,this._w=o*h-i*s-n*a-r*l,this.onChangeCallback(),this},multiplyVector3:function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var i=this._x,n=this._y,r=this._z,o=this._w,s=o*t._w+i*t._x+n*t._y+r*t._z;if(0>s?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),s>=1)return this._w=o,this._x=i,this._y=n,this._z=r,this;var a=Math.acos(s),l=Math.sqrt(1-s*s);return.001>Math.abs(l)?(this._w=.5*(o+this._w),this._x=.5*(i+this._x),this._y=.5*(n+this._y),this._z=.5*(r+this._z),this):(s=Math.sin((1-e)*a)/l,a=Math.sin(e*a)/l,this._w=o*s+this._w*a,this._x=i*s+this._x*a,this._y=n*s+this._y*a,this._z=r*s+this._z*a,this.onChangeCallback(),this)},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){},clone:function(){return new THREE.Quaternion(this._x,this._y,this._z,this._w)}},THREE.Quaternion.slerp=function(t,e,i,n){return i.copy(t).slerp(e,n)},THREE.Vector2=function(t,e){this.x=t||0,this.y=e||0},THREE.Vector2.prototype={constructor:THREE.Vector2,set:function(t,e){return this.x=t,this.y=e,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+t)}},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScalar:function(t){return this.x+=t,this.y+=t,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return 0!==t?(t=1/t,this.x*=t,this.y*=t):this.y=this.x=0,this},min:function(t){return this.x>t.x&&(this.x=t.x),this.y>t.y&&(this.y=t.y),this},max:function(t){return this.x<t.x&&(this.x=t.x),this.y<t.y&&(this.y=t.y),this},clamp:function(t,e){return this.x<t.x?this.x=t.x:this.x>e.x&&(this.x=e.x),this.y<t.y?this.y=t.y:this.y>e.y&&(this.y=e.y),this},clampScalar:function(){var t,e;return function(i,n){return void 0===t&&(t=new THREE.Vector2,e=new THREE.Vector2),t.set(i,i),e.set(n,n),this.clamp(t,e)}}(),floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},normalize:function(){return this.divideScalar(this.length())},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x;return t=this.y-t.y,e*e+t*t},setLength:function(t){var e=this.length();return 0!==e&&t!==e&&this.multiplyScalar(t/e),this},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},clone:function(){return new THREE.Vector2(this.x,this.y)}},THREE.Vector3=function(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0},THREE.Vector3.prototype={constructor:THREE.Vector3,set:function(t,e,i){return this.x=t,this.y=e,this.z=i,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+t)}},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t;return function(e){return!1==e instanceof THREE.Euler&&console.error("THREE.Vector3: .applyEuler() now expects a Euler rotation rather than a Vector3 and order."),void 0===t&&(t=new THREE.Quaternion),this.applyQuaternion(t.setFromEuler(e)),this}}(),applyAxisAngle:function(){var t;return function(e,i){return void 0===t&&(t=new THREE.Quaternion),this.applyQuaternion(t.setFromAxisAngle(e,i)),this}}(),applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[3]*i+t[6]*n,this.y=t[1]*e+t[4]*i+t[7]*n,this.z=t[2]*e+t[5]*i+t[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n+t[12],this.y=t[1]*e+t[5]*i+t[9]*n+t[13],this.z=t[2]*e+t[6]*i+t[10]*n+t[14],this},applyProjection:function(t){var e=this.x,i=this.y,n=this.z;t=t.elements;var r=1/(t[3]*e+t[7]*i+t[11]*n+t[15]);return this.x=(t[0]*e+t[4]*i+t[8]*n+t[12])*r,this.y=(t[1]*e+t[5]*i+t[9]*n+t[13])*r,this.z=(t[2]*e+t[6]*i+t[10]*n+t[14])*r,this},applyQuaternion:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,o=t.y,s=t.z;t=t.w;var a=t*e+o*n-s*i,l=t*i+s*e-r*n,h=t*n+r*i-o*e,e=-r*e-o*i-s*n;return this.x=a*t+e*-r+l*-s-h*-o,this.y=l*t+e*-o+h*-r-a*-s,this.z=h*t+e*-s+a*-o-l*-r,this},project:function(){var t;return function(e){return void 0===t&&(t=new THREE.Matrix4),t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyProjection(t)}}(),unproject:function(){var t;return function(e){return void 0===t&&(t=new THREE.Matrix4),t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyProjection(t)}}(),transformDirection:function(t){var e=this.x,i=this.y,n=this.z;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n,this.y=t[1]*e+t[5]*i+t[9]*n,this.z=t[2]*e+t[6]*i+t[10]*n,this.normalize(),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return 0!==t?(t=1/t,this.x*=t,this.y*=t,this.z*=t):this.z=this.y=this.x=0,this},min:function(t){return this.x>t.x&&(this.x=t.x),this.y>t.y&&(this.y=t.y),this.z>t.z&&(this.z=t.z),this},max:function(t){return this.x<t.x&&(this.x=t.x),this.y<t.y&&(this.y=t.y),this.z<t.z&&(this.z=t.z),this},clamp:function(t,e){return this.x<t.x?this.x=t.x:this.x>e.x&&(this.x=e.x),this.y<t.y?this.y=t.y:this.y>e.y&&(this.y=e.y),this.z<t.z?this.z=t.z:this.z>e.z&&(this.z=e.z),this},clampScalar:function(){var t,e;return function(i,n){return void 0===t&&(t=new THREE.Vector3,e=new THREE.Vector3),t.set(i,i,i),e.set(n,n,n),this.clamp(t,e)}}(),floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(t){var e=this.length();return 0!==e&&t!==e&&this.multiplyScalar(t/e),this},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},cross:function(t,e){if(void 0!==e)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e);var i=this.x,n=this.y,r=this.z;return this.x=n*t.z-r*t.y,this.y=r*t.x-i*t.z,this.z=i*t.y-n*t.x,this},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,o=e.x,s=e.y,a=e.z;return this.x=n*a-r*s,this.y=r*o-i*a,this.z=i*s-n*o,this},projectOnVector:function(){var t,e;return function(i){return void 0===t&&(t=new THREE.Vector3),t.copy(i).normalize(),e=this.dot(t),this.copy(t).multiplyScalar(e)}}(),projectOnPlane:function(){var t;return function(e){return void 0===t&&(t=new THREE.Vector3),t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t;return function(e){return void 0===t&&(t=new THREE.Vector3),this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){return t=this.dot(t)/(this.length()*t.length()),Math.acos(THREE.Math.clamp(t,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y;return t=this.z-t.z,e*e+i*i+t*t},setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},setFromMatrixPosition:function(t){return this.x=t.elements[12],this.y=t.elements[13],this.z=t.elements[14],this},setFromMatrixScale:function(t){var e=this.set(t.elements[0],t.elements[1],t.elements[2]).length(),i=this.set(t.elements[4],t.elements[5],t.elements[6]).length();return t=this.set(t.elements[8],t.elements[9],t.elements[10]).length(),this.x=e,this.y=i,this.z=t,this},setFromMatrixColumn:function(t,e){var i=4*t,n=e.elements;return this.x=n[i],this.y=n[i+1],this.z=n[i+2],this},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},clone:function(){return new THREE.Vector3(this.x,this.y,this.z)}},THREE.Vector4=function(t,e,i,n){this.x=t||0,this.y=e||0,this.z=i||0,this.w=void 0!==n?n:1},THREE.Vector4.prototype={constructor:THREE.Vector4,set:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+t)}},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=this.w;return t=t.elements,this.x=t[0]*e+t[4]*i+t[8]*n+t[12]*r,this.y=t[1]*e+t[5]*i+t[9]*n+t[13]*r,this.z=t[2]*e+t[6]*i+t[10]*n+t[14]*r,this.w=t[3]*e+t[7]*i+t[11]*n+t[15]*r,this},divideScalar:function(t){return 0!==t?(t=1/t,this.x*=t,this.y*=t,this.z*=t,this.w*=t):(this.z=this.y=this.x=0,this.w=1),this},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return 1e-4>e?(this.x=1,this.z=this.y=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,i,n;t=t.elements;var r=t[0];n=t[4];var o=t[8],s=t[1],a=t[5],l=t[9];i=t[2],e=t[6];var h=t[10];return.01>Math.abs(n-s)&&.01>Math.abs(o-i)&&.01>Math.abs(l-e)?.1>Math.abs(n+s)&&.1>Math.abs(o+i)&&.1>Math.abs(l+e)&&.1>Math.abs(r+a+h-3)?(this.set(1,0,0,0),this):(t=Math.PI,r=(r+1)/2,a=(a+1)/2,h=(h+1)/2,n=(n+s)/4,o=(o+i)/4,l=(l+e)/4,r>a&&r>h?.01>r?(e=0,n=i=.707106781):(e=Math.sqrt(r),i=n/e,n=o/e):a>h?.01>a?(e=.707106781,i=0,n=.707106781):(i=Math.sqrt(a),e=n/i,n=l/i):.01>h?(i=e=.707106781,n=0):(n=Math.sqrt(h),e=o/n,i=l/n),this.set(e,i,n,t),this):(t=Math.sqrt((e-l)*(e-l)+(o-i)*(o-i)+(s-n)*(s-n)),.001>Math.abs(t)&&(t=1),this.x=(e-l)/t,this.y=(o-i)/t,this.z=(s-n)/t,this.w=Math.acos((r+a+h-1)/2),this)},min:function(t){return this.x>t.x&&(this.x=t.x),this.y>t.y&&(this.y=t.y),this.z>t.z&&(this.z=t.z),this.w>t.w&&(this.w=t.w),this},max:function(t){return this.x<t.x&&(this.x=t.x),this.y<t.y&&(this.y=t.y),this.z<t.z&&(this.z=t.z),this.w<t.w&&(this.w=t.w),this},clamp:function(t,e){return this.x<t.x?this.x=t.x:this.x>e.x&&(this.x=e.x),this.y<t.y?this.y=t.y:this.y>e.y&&(this.y=e.y),this.z<t.z?this.z=t.z:this.z>e.z&&(this.z=e.z),this.w<t.w?this.w=t.w:this.w>e.w&&(this.w=e.w),this},clampScalar:function(){var t,e;return function(i,n){return void 0===t&&(t=new THREE.Vector4,e=new THREE.Vector4),t.set(i,i,i,i),e.set(n,n,n,n),this.clamp(t,e)}}(),floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x),this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y),this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z),this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length())},setLength:function(t){var e=this.length();return 0!==e&&t!==e&&this.multiplyScalar(t/e),this},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},clone:function(){return new THREE.Vector4(this.x,this.y,this.z,this.w)}},THREE.Euler=function(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||THREE.Euler.DefaultOrder},THREE.Euler.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),THREE.Euler.DefaultOrder="XYZ",THREE.Euler.prototype={constructor:THREE.Euler,_x:0,_y:0,_z:0,_order:THREE.Euler.DefaultOrder,get x(){return this._x},set x(t){this._x=t,this.onChangeCallback()},get y(){return this._y},set y(t){this._y=t,this.onChangeCallback()},get z(){return this._z},set z(t){this._z=t,this.onChangeCallback()},get order(){return this._order},set order(t){this._order=t,this.onChangeCallback()},set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._order=n||this._order,this.onChangeCallback(),this},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e){var i=THREE.Math.clamp,n=t.elements,r=n[0],o=n[4],s=n[8],a=n[1],l=n[5],h=n[9],c=n[2],u=n[6],n=n[10];return e=e||this._order,"XYZ"===e?(this._y=Math.asin(i(s,-1,1)),.99999>Math.abs(s)?(this._x=Math.atan2(-h,n),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(u,l),this._z=0)):"YXZ"===e?(this._x=Math.asin(-i(h,-1,1)),.99999>Math.abs(h)?(this._y=Math.atan2(s,n),this._z=Math.atan2(a,l)):(this._y=Math.atan2(-c,r),this._z=0)):"ZXY"===e?(this._x=Math.asin(i(u,-1,1)),.99999>Math.abs(u)?(this._y=Math.atan2(-c,n),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(a,r))):"ZYX"===e?(this._y=Math.asin(-i(c,-1,1)),.99999>Math.abs(c)?(this._x=Math.atan2(u,n),this._z=Math.atan2(a,r)):(this._x=0,this._z=Math.atan2(-o,l))):"YZX"===e?(this._z=Math.asin(i(a,-1,1)),.99999>Math.abs(a)?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-c,r)):(this._x=0,this._y=Math.atan2(s,n))):"XZY"===e?(this._z=Math.asin(-i(o,-1,1)),.99999>Math.abs(o)?(this._x=Math.atan2(u,l),this._y=Math.atan2(s,r)):(this._x=Math.atan2(-h,n),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,this.onChangeCallback(),this},setFromQuaternion:function(t,e,i){var n=THREE.Math.clamp,r=t.x*t.x,o=t.y*t.y,s=t.z*t.z,a=t.w*t.w;return e=e||this._order,"XYZ"===e?(this._x=Math.atan2(2*(t.x*t.w-t.y*t.z),a-r-o+s),this._y=Math.asin(n(2*(t.x*t.z+t.y*t.w),-1,1)),this._z=Math.atan2(2*(t.z*t.w-t.x*t.y),a+r-o-s)):"YXZ"===e?(this._x=Math.asin(n(2*(t.x*t.w-t.y*t.z),-1,1)),this._y=Math.atan2(2*(t.x*t.z+t.y*t.w),a-r-o+s),this._z=Math.atan2(2*(t.x*t.y+t.z*t.w),a-r+o-s)):"ZXY"===e?(this._x=Math.asin(n(2*(t.x*t.w+t.y*t.z),-1,1)),this._y=Math.atan2(2*(t.y*t.w-t.z*t.x),a-r-o+s),this._z=Math.atan2(2*(t.z*t.w-t.x*t.y),a-r+o-s)):"ZYX"===e?(this._x=Math.atan2(2*(t.x*t.w+t.z*t.y),a-r-o+s),this._y=Math.asin(n(2*(t.y*t.w-t.x*t.z),-1,1)),this._z=Math.atan2(2*(t.x*t.y+t.z*t.w),a+r-o-s)):"YZX"===e?(this._x=Math.atan2(2*(t.x*t.w-t.z*t.y),a-r+o-s),this._y=Math.atan2(2*(t.y*t.w-t.x*t.z),a+r-o-s),this._z=Math.asin(n(2*(t.x*t.y+t.z*t.w),-1,1))):"XZY"===e?(this._x=Math.atan2(2*(t.x*t.w+t.y*t.z),a-r+o-s),this._y=Math.atan2(2*(t.x*t.z+t.y*t.w),a+r-o-s),this._z=Math.asin(n(2*(t.z*t.w-t.x*t.y),-1,1))):console.warn("THREE.Euler: .setFromQuaternion() given unsupported order: "+e),this._order=e,!1!==i&&this.onChangeCallback(),this},reorder:function(){var t=new THREE.Quaternion;return function(e){t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(){return[this._x,this._y,this._z,this._order]},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){},clone:function(){return new THREE.Euler(this._x,this._y,this._z,this._order)}},THREE.Line3=function(t,e){this.start=void 0!==t?t:new THREE.Vector3,this.end=void 0!==e?e:new THREE.Vector3},THREE.Line3.prototype={constructor:THREE.Line3,set:function(t,e){return this.start.copy(t),this.end.copy(e),this},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},center:function(t){return(t||new THREE.Vector3).addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return(t||new THREE.Vector3).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){var i=e||new THREE.Vector3;return this.delta(i).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new THREE.Vector3,e=new THREE.Vector3;return function(i,n){t.subVectors(i,this.start),e.subVectors(this.end,this.start);var r=e.dot(e),r=e.dot(t)/r;return n&&(r=THREE.Math.clamp(r,0,1)),r}}(),closestPointToPoint:function(t,e,i){return t=this.closestPointToPointParameter(t,e),i=i||new THREE.Vector3,this.delta(i).multiplyScalar(t).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)},clone:function(){return(new THREE.Line3).copy(this)}},THREE.Box2=function(t,e){this.min=void 0!==t?t:new THREE.Vector2(1/0,1/0),this.max=void 0!==e?e:new THREE.Vector2(-1/0,-1/0)},THREE.Box2.prototype={constructor:THREE.Box2,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;i>e;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new THREE.Vector2;return function(e,i){var n=t.copy(i).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}}(),copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},empty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},center:function(t){return(t||new THREE.Vector2).addVectors(this.min,this.max).multiplyScalar(.5)},size:function(t){return(t||new THREE.Vector2).subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y?!1:!0},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y?!0:!1},getParameter:function(t,e){return(e||new THREE.Vector2).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},isIntersectionBox:function(t){return t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y?!1:!0},clampPoint:function(t,e){return(e||new THREE.Vector2).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new THREE.Vector2;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)},clone:function(){return(new THREE.Box2).copy(this)}},THREE.Box3=function(t,e){this.min=void 0!==t?t:new THREE.Vector3(1/0,1/0,1/0),this.max=void 0!==e?e:new THREE.Vector3(-1/0,-1/0,-1/0)},THREE.Box3.prototype={constructor:THREE.Box3,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;i>e;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new THREE.Vector3;return function(e,i){var n=t.copy(i).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}}(),setFromObject:function(){var t=new THREE.Vector3;return function(e){var i=this;return e.updateMatrixWorld(!0),this.makeEmpty(),e.traverse(function(e){var n=e.geometry;if(void 0!==n)if(n instanceof THREE.Geometry)for(var r=n.vertices,n=0,o=r.length;o>n;n++)t.copy(r[n]),t.applyMatrix4(e.matrixWorld),i.expandByPoint(t);else if(n instanceof THREE.BufferGeometry&&void 0!==n.attributes.position)for(r=n.attributes.position.array,n=0,o=r.length;o>n;n+=3)t.set(r[n],r[n+1],r[n+2]),t.applyMatrix4(e.matrixWorld),i.expandByPoint(t)}),this}}(),copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},empty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},center:function(t){return(t||new THREE.Vector3).addVectors(this.min,this.max).multiplyScalar(.5)},size:function(t){return(t||new THREE.Vector3).subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z?!1:!0},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z?!0:!1},getParameter:function(t,e){return(e||new THREE.Vector3).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},isIntersectionBox:function(t){return t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z?!1:!0},clampPoint:function(t,e){return(e||new THREE.Vector3).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new THREE.Vector3;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new THREE.Vector3;return function(e){return e=e||new THREE.Sphere,e.center=this.center(),e.radius=.5*this.size(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];return function(e){return t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.makeEmpty(),this.setFromPoints(t),this
  24. }}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)},clone:function(){return(new THREE.Box3).copy(this)}},THREE.Matrix3=function(){this.elements=new Float32Array([1,0,0,0,1,0,0,0,1]),0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")},THREE.Matrix3.prototype={constructor:THREE.Matrix3,set:function(t,e,i,n,r,o,s,a,l){var h=this.elements;return h[0]=t,h[3]=e,h[6]=i,h[1]=n,h[4]=r,h[7]=o,h[2]=s,h[5]=a,h[8]=l,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},copy:function(t){return t=t.elements,this.set(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8]),this},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(t){return console.warn("THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(t)},applyToVector3Array:function(){var t=new THREE.Vector3;return function(e,i,n){void 0===i&&(i=0),void 0===n&&(n=e.length);for(var r=0;n>r;r+=3,i+=3)t.x=e[i],t.y=e[i+1],t.z=e[i+2],t.applyMatrix3(this),e[i]=t.x,e[i+1]=t.y,e[i+2]=t.z;return e}}(),multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],o=t[4],s=t[5],a=t[6],l=t[7],t=t[8];return e*o*t-e*s*l-i*r*t+i*s*a+n*r*l-n*o*a},getInverse:function(t,e){var i=t.elements,n=this.elements;if(n[0]=i[10]*i[5]-i[6]*i[9],n[1]=-i[10]*i[1]+i[2]*i[9],n[2]=i[6]*i[1]-i[2]*i[5],n[3]=-i[10]*i[4]+i[6]*i[8],n[4]=i[10]*i[0]-i[2]*i[8],n[5]=-i[6]*i[0]+i[2]*i[4],n[6]=i[9]*i[4]-i[5]*i[8],n[7]=-i[9]*i[0]+i[1]*i[8],n[8]=i[5]*i[0]-i[1]*i[4],i=i[0]*n[0]+i[1]*n[3]+i[2]*n[6],0===i){if(e)throw Error("Matrix3.getInverse(): can't invert matrix, determinant is 0");return console.warn("Matrix3.getInverse(): can't invert matrix, determinant is 0"),this.identity(),this}return this.multiplyScalar(1/i),this},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},flattenToArrayOffset:function(t,e){var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t},getNormalMatrix:function(t){return this.getInverse(t).transpose(),this},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},fromArray:function(t){return this.elements.set(t),this},toArray:function(){var t=this.elements;return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},clone:function(){return(new THREE.Matrix3).fromArray(this.elements)}},THREE.Matrix4=function(){this.elements=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")},THREE.Matrix4.prototype={constructor:THREE.Matrix4,set:function(t,e,i,n,r,o,s,a,l,h,c,u,d,p,f,m){var g=this.elements;return g[0]=t,g[4]=e,g[8]=i,g[12]=n,g[1]=r,g[5]=o,g[9]=s,g[13]=a,g[2]=l,g[6]=h,g[10]=c,g[14]=u,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},copy:function(t){return this.elements.set(t.elements),this},extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},copyPosition:function(t){var e=this.elements;return t=t.elements,e[12]=t[12],e[13]=t[13],e[14]=t[14],this},extractRotation:function(){var t=new THREE.Vector3;return function(e){var i=this.elements;e=e.elements;var n=1/t.set(e[0],e[1],e[2]).length(),r=1/t.set(e[4],e[5],e[6]).length(),o=1/t.set(e[8],e[9],e[10]).length();return i[0]=e[0]*n,i[1]=e[1]*n,i[2]=e[2]*n,i[4]=e[4]*r,i[5]=e[5]*r,i[6]=e[6]*r,i[8]=e[8]*o,i[9]=e[9]*o,i[10]=e[10]*o,this}}(),makeRotationFromEuler:function(t){!1==t instanceof THREE.Euler&&console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,i=t.x,n=t.y,r=t.z,o=Math.cos(i),i=Math.sin(i),s=Math.cos(n),n=Math.sin(n),a=Math.cos(r),r=Math.sin(r);if("XYZ"===t.order){t=o*a;var l=o*r,h=i*a,c=i*r;e[0]=s*a,e[4]=-s*r,e[8]=n,e[1]=l+h*n,e[5]=t-c*n,e[9]=-i*s,e[2]=c-t*n,e[6]=h+l*n,e[10]=o*s}else"YXZ"===t.order?(t=s*a,l=s*r,h=n*a,c=n*r,e[0]=t+c*i,e[4]=h*i-l,e[8]=o*n,e[1]=o*r,e[5]=o*a,e[9]=-i,e[2]=l*i-h,e[6]=c+t*i,e[10]=o*s):"ZXY"===t.order?(t=s*a,l=s*r,h=n*a,c=n*r,e[0]=t-c*i,e[4]=-o*r,e[8]=h+l*i,e[1]=l+h*i,e[5]=o*a,e[9]=c-t*i,e[2]=-o*n,e[6]=i,e[10]=o*s):"ZYX"===t.order?(t=o*a,l=o*r,h=i*a,c=i*r,e[0]=s*a,e[4]=h*n-l,e[8]=t*n+c,e[1]=s*r,e[5]=c*n+t,e[9]=l*n-h,e[2]=-n,e[6]=i*s,e[10]=o*s):"YZX"===t.order?(t=o*s,l=o*n,h=i*s,c=i*n,e[0]=s*a,e[4]=c-t*r,e[8]=h*r+l,e[1]=r,e[5]=o*a,e[9]=-i*a,e[2]=-n*a,e[6]=l*r+h,e[10]=t-c*r):"XZY"===t.order&&(t=o*s,l=o*n,h=i*s,c=i*n,e[0]=s*a,e[4]=-r,e[8]=n*a,e[1]=t*r+c,e[5]=o*a,e[9]=l*r-h,e[2]=h*r-l,e[6]=i*a,e[10]=c*r+t);return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},makeRotationFromQuaternion:function(t){var e=this.elements,i=t.x,n=t.y,r=t.z,o=t.w,s=i+i,a=n+n,l=r+r;t=i*s;var h=i*a,i=i*l,c=n*a,n=n*l,r=r*l,s=o*s,a=o*a,o=o*l;return e[0]=1-(c+r),e[4]=h-o,e[8]=i+a,e[1]=h+o,e[5]=1-(t+r),e[9]=n-s,e[2]=i-a,e[6]=n+s,e[10]=1-(t+c),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:function(){var t=new THREE.Vector3,e=new THREE.Vector3,i=new THREE.Vector3;return function(n,r,o){var s=this.elements;return i.subVectors(n,r).normalize(),0===i.length()&&(i.z=1),t.crossVectors(o,i).normalize(),0===t.length()&&(i.x+=1e-4,t.crossVectors(o,i).normalize()),e.crossVectors(i,t),s[0]=t.x,s[4]=e.x,s[8]=i.x,s[1]=t.y,s[5]=e.y,s[9]=i.y,s[2]=t.z,s[6]=e.z,s[10]=i.z,this}}(),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements,r=this.elements,o=i[0],s=i[4],a=i[8],l=i[12],h=i[1],c=i[5],u=i[9],d=i[13],p=i[2],f=i[6],m=i[10],g=i[14],v=i[3],y=i[7],E=i[11],i=i[15],b=n[0],_=n[4],T=n[8],x=n[12],w=n[1],R=n[5],S=n[9],M=n[13],C=n[2],H=n[6],D=n[10],P=n[14],k=n[3],A=n[7],L=n[11],n=n[15];return r[0]=o*b+s*w+a*C+l*k,r[4]=o*_+s*R+a*H+l*A,r[8]=o*T+s*S+a*D+l*L,r[12]=o*x+s*M+a*P+l*n,r[1]=h*b+c*w+u*C+d*k,r[5]=h*_+c*R+u*H+d*A,r[9]=h*T+c*S+u*D+d*L,r[13]=h*x+c*M+u*P+d*n,r[2]=p*b+f*w+m*C+g*k,r[6]=p*_+f*R+m*H+g*A,r[10]=p*T+f*S+m*D+g*L,r[14]=p*x+f*M+m*P+g*n,r[3]=v*b+y*w+E*C+i*k,r[7]=v*_+y*R+E*H+i*A,r[11]=v*T+y*S+E*D+i*L,r[15]=v*x+y*M+E*P+i*n,this},multiplyToArray:function(t,e,i){var n=this.elements;return this.multiplyMatrices(t,e),i[0]=n[0],i[1]=n[1],i[2]=n[2],i[3]=n[3],i[4]=n[4],i[5]=n[5],i[6]=n[6],i[7]=n[7],i[8]=n[8],i[9]=n[9],i[10]=n[10],i[11]=n[11],i[12]=n[12],i[13]=n[13],i[14]=n[14],i[15]=n[15],this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead."),t.applyProjection(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(t){return console.warn("THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead."),this.applyToVector3Array(t)},applyToVector3Array:function(){var t=new THREE.Vector3;return function(e,i,n){void 0===i&&(i=0),void 0===n&&(n=e.length);for(var r=0;n>r;r+=3,i+=3)t.x=e[i],t.y=e[i+1],t.z=e[i+2],t.applyMatrix4(this),e[i]=t.x,e[i+1]=t.y,e[i+2]=t.z;return e}}(),rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},determinant:function(){var t=this.elements,e=t[0],i=t[4],n=t[8],r=t[12],o=t[1],s=t[5],a=t[9],l=t[13],h=t[2],c=t[6],u=t[10],d=t[14];return t[3]*(+r*a*c-n*l*c-r*s*u+i*l*u+n*s*d-i*a*d)+t[7]*(+e*a*d-e*l*u+r*o*u-n*o*d+n*l*h-r*a*h)+t[11]*(+e*l*c-e*s*d-r*o*c+i*o*d+r*s*h-i*l*h)+t[15]*(-n*s*h-e*a*c+e*s*u+n*o*c-i*o*u+i*a*h)},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},flattenToArrayOffset:function(t,e){var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t},getPosition:function(){var t=new THREE.Vector3;return function(){console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");var e=this.elements;return t.set(e[12],e[13],e[14])}}(),setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var i=this.elements,n=t.elements,r=n[0],o=n[4],s=n[8],a=n[12],l=n[1],h=n[5],c=n[9],u=n[13],d=n[2],p=n[6],f=n[10],m=n[14],g=n[3],v=n[7],y=n[11],n=n[15];if(i[0]=c*m*v-u*f*v+u*p*y-h*m*y-c*p*n+h*f*n,i[4]=a*f*v-s*m*v-a*p*y+o*m*y+s*p*n-o*f*n,i[8]=s*u*v-a*c*v+a*h*y-o*u*y-s*h*n+o*c*n,i[12]=a*c*p-s*u*p-a*h*f+o*u*f+s*h*m-o*c*m,i[1]=u*f*g-c*m*g-u*d*y+l*m*y+c*d*n-l*f*n,i[5]=s*m*g-a*f*g+a*d*y-r*m*y-s*d*n+r*f*n,i[9]=a*c*g-s*u*g-a*l*y+r*u*y+s*l*n-r*c*n,i[13]=s*u*d-a*c*d+a*l*f-r*u*f-s*l*m+r*c*m,i[2]=h*m*g-u*p*g+u*d*v-l*m*v-h*d*n+l*p*n,i[6]=a*p*g-o*m*g-a*d*v+r*m*v+o*d*n-r*p*n,i[10]=o*u*g-a*h*g+a*l*v-r*u*v-o*l*n+r*h*n,i[14]=a*h*d-o*u*d-a*l*p+r*u*p+o*l*m-r*h*m,i[3]=c*p*g-h*f*g-c*d*v+l*f*v+h*d*y-l*p*y,i[7]=o*f*g-s*p*g+s*d*v-r*f*v-o*d*y+r*p*y,i[11]=s*h*g-o*c*g-s*l*v+r*c*v+o*l*y-r*h*y,i[15]=o*c*d-s*h*d+s*l*p-r*c*p-o*l*f+r*h*f,i=r*i[0]+l*i[4]+d*i[8]+g*i[12],0==i){if(e)throw Error("Matrix4.getInverse(): can't invert matrix, determinant is 0");return console.warn("Matrix4.getInverse(): can't invert matrix, determinant is 0"),this.identity(),this}return this.multiplyScalar(1/i),this},translate:function(){console.warn("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.warn("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.warn("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.warn("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.warn("THREE.Matrix4: .rotateByAxis() has been removed.")},scale:function(t){var e=this.elements,i=t.x,n=t.y;return t=t.z,e[0]*=i,e[4]*=n,e[8]*=t,e[1]*=i,e[5]*=n,e[9]*=t,e[2]*=i,e[6]*=n,e[10]*=t,e[3]*=i,e[7]*=n,e[11]*=t,this},getMaxScaleOnAxis:function(){var t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],Math.max(t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10])))},makeTranslation:function(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(1,0,0,0,0,e,-t,0,0,t,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,0,t,0,0,1,0,0,-t,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t);return t=Math.sin(t),this.set(e,-t,0,0,t,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,o=t.x,s=t.y,a=t.z,l=r*o,h=r*s;return this.set(l*o+i,l*s-n*a,l*a+n*s,0,l*s+n*a,h*s+i,h*a-n*o,0,l*a-n*s,h*a+n*o,r*a*a+i,0,0,0,0,1),this},makeScale:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this},compose:function(t,e,i){return this.makeRotationFromQuaternion(e),this.scale(i),this.setPosition(t),this},decompose:function(){var t=new THREE.Vector3,e=new THREE.Matrix4;return function(i,n,r){var o=this.elements,s=t.set(o[0],o[1],o[2]).length(),a=t.set(o[4],o[5],o[6]).length(),l=t.set(o[8],o[9],o[10]).length();0>this.determinant()&&(s=-s),i.x=o[12],i.y=o[13],i.z=o[14],e.elements.set(this.elements),i=1/s;var o=1/a,h=1/l;return e.elements[0]*=i,e.elements[1]*=i,e.elements[2]*=i,e.elements[4]*=o,e.elements[5]*=o,e.elements[6]*=o,e.elements[8]*=h,e.elements[9]*=h,e.elements[10]*=h,n.setFromRotationMatrix(e),r.x=s,r.y=a,r.z=l,this}}(),makeFrustum:function(t,e,i,n,r,o){var s=this.elements;return s[0]=2*r/(e-t),s[4]=0,s[8]=(e+t)/(e-t),s[12]=0,s[1]=0,s[5]=2*r/(n-i),s[9]=(n+i)/(n-i),s[13]=0,s[2]=0,s[6]=0,s[10]=-(o+r)/(o-r),s[14]=-2*o*r/(o-r),s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this},makePerspective:function(t,e,i,n){t=i*Math.tan(THREE.Math.degToRad(.5*t));var r=-t;return this.makeFrustum(r*e,t*e,r,t,i,n)},makeOrthographic:function(t,e,i,n,r,o){var s=this.elements,a=e-t,l=i-n,h=o-r;return s[0]=2/a,s[4]=0,s[8]=0,s[12]=-((e+t)/a),s[1]=0,s[5]=2/l,s[9]=0,s[13]=-((i+n)/l),s[2]=0,s[6]=0,s[10]=-2/h,s[14]=-((o+r)/h),s[3]=0,s[7]=0,s[11]=0,s[15]=1,this},fromArray:function(t){return this.elements.set(t),this},toArray:function(){var t=this.elements;return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},clone:function(){return(new THREE.Matrix4).fromArray(this.elements)}},THREE.Ray=function(t,e){this.origin=void 0!==t?t:new THREE.Vector3,this.direction=void 0!==e?e:new THREE.Vector3},THREE.Ray.prototype={constructor:THREE.Ray,set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return(e||new THREE.Vector3).copy(this.direction).multiplyScalar(t).add(this.origin)},recast:function(){var t=new THREE.Vector3;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){var i=e||new THREE.Vector3;i.subVectors(t,this.origin);var n=i.dot(this.direction);return 0>n?i.copy(this.origin):i.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(){var t=new THREE.Vector3;return function(e){var i=t.subVectors(e,this.origin).dot(this.direction);return 0>i?this.origin.distanceTo(e):(t.copy(this.direction).multiplyScalar(i).add(this.origin),t.distanceTo(e))}}(),distanceSqToSegment:function(t,e,i,n){var r=t.clone().add(e).multiplyScalar(.5),o=e.clone().sub(t).normalize(),s=.5*t.distanceTo(e),a=this.origin.clone().sub(r);t=-this.direction.dot(o),e=a.dot(this.direction);var l,h,c=-a.dot(o),u=a.lengthSq(),d=Math.abs(1-t*t);return d>=0?(a=t*c-e,l=t*e-c,h=s*d,a>=0?l>=-h?h>=l?(s=1/d,a*=s,l*=s,t=a*(a+t*l+2*e)+l*(t*a+l+2*c)+u):(l=s,a=Math.max(0,-(t*l+e)),t=-a*a+l*(l+2*c)+u):(l=-s,a=Math.max(0,-(t*l+e)),t=-a*a+l*(l+2*c)+u):-h>=l?(a=Math.max(0,-(-t*s+e)),l=a>0?-s:Math.min(Math.max(-s,-c),s),t=-a*a+l*(l+2*c)+u):h>=l?(a=0,l=Math.min(Math.max(-s,-c),s),t=l*(l+2*c)+u):(a=Math.max(0,-(t*s+e)),l=a>0?s:Math.min(Math.max(-s,-c),s),t=-a*a+l*(l+2*c)+u)):(l=t>0?-s:s,a=Math.max(0,-(t*l+e)),t=-a*a+l*(l+2*c)+u),i&&i.copy(this.direction.clone().multiplyScalar(a).add(this.origin)),n&&n.copy(o.clone().multiplyScalar(l).add(r)),t},isIntersectionSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},intersectSphere:function(){var t=new THREE.Vector3;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),r=t.dot(t)-n*n,o=e.radius*e.radius;return r>o?null:(o=Math.sqrt(o-r),r=n-o,n+=o,0>r&&0>n?null:0>r?this.at(n,i):this.at(r,i))}}(),isIntersectionPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||0>t.normal.dot(this.direction)*e?!0:!1},distanceToPlane:function(t){var e=t.normal.dot(this.direction);return 0==e?0==t.distanceToPoint(this.origin)?0:null:(t=-(this.origin.dot(t.normal)+t.constant)/e,t>=0?t:null)},intersectPlane:function(t,e){var i=this.distanceToPlane(t);return null===i?null:this.at(i,e)},isIntersectionBox:function(){var t=new THREE.Vector3;return function(e){return null!==this.intersectBox(e,t)}}(),intersectBox:function(t,e){var i,n,r,o,s;n=1/this.direction.x,o=1/this.direction.y,s=1/this.direction.z;var a=this.origin;return n>=0?(i=(t.min.x-a.x)*n,n*=t.max.x-a.x):(i=(t.max.x-a.x)*n,n*=t.min.x-a.x),o>=0?(r=(t.min.y-a.y)*o,o*=t.max.y-a.y):(r=(t.max.y-a.y)*o,o*=t.min.y-a.y),i>o||r>n?null:((r>i||i!==i)&&(i=r),(n>o||n!==n)&&(n=o),s>=0?(r=(t.min.z-a.z)*s,s*=t.max.z-a.z):(r=(t.max.z-a.z)*s,s*=t.min.z-a.z),i>s||r>n?null:((r>i||i!==i)&&(i=r),(n>s||n!==n)&&(n=s),0>n?null:this.at(i>=0?i:n,e)))},intersectTriangle:function(){var t=new THREE.Vector3,e=new THREE.Vector3,i=new THREE.Vector3,n=new THREE.Vector3;return function(r,o,s,a,l){if(e.subVectors(o,r),i.subVectors(s,r),n.crossVectors(e,i),o=this.direction.dot(n),o>0){if(a)return null;a=1}else{if(!(0>o))return null;a=-1,o=-o}return t.subVectors(this.origin,r),r=a*this.direction.dot(i.crossVectors(t,i)),0>r?null:(s=a*this.direction.dot(e.cross(t)),0>s||r+s>o?null:(r=-a*t.dot(n),0>r?null:this.at(r/o,l)))}}(),applyMatrix4:function(t){return this.direction.add(this.origin).applyMatrix4(t),this.origin.applyMatrix4(t),this.direction.sub(this.origin),this.direction.normalize(),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)},clone:function(){return(new THREE.Ray).copy(this)}},THREE.Sphere=function(t,e){this.center=void 0!==t?t:new THREE.Vector3,this.radius=void 0!==e?e:0},THREE.Sphere.prototype={constructor:THREE.Sphere,set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new THREE.Box3;return function(e,i){var n=this.center;void 0!==i?n.copy(i):t.setFromPoints(e).center(n);for(var r=0,o=0,s=e.length;s>o;o++)r=Math.max(r,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(r),this}}(),copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return 0>=this.radius},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},clampPoint:function(t,e){var i=this.center.distanceToSquared(t),n=e||new THREE.Vector3;return n.copy(t),i>this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n},getBoundingBox:function(t){return t=t||new THREE.Box3,t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius*=t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius},clone:function(){return(new THREE.Sphere).copy(this)}},THREE.Frustum=function(t,e,i,n,r,o){this.planes=[void 0!==t?t:new THREE.Plane,void 0!==e?e:new THREE.Plane,void 0!==i?i:new THREE.Plane,void 0!==n?n:new THREE.Plane,void 0!==r?r:new THREE.Plane,void 0!==o?o:new THREE.Plane]},THREE.Frustum.prototype={constructor:THREE.Frustum,set:function(t,e,i,n,r,o){var s=this.planes;return s[0].copy(t),s[1].copy(e),s[2].copy(i),s[3].copy(n),s[4].copy(r),s[5].copy(o),this},copy:function(t){for(var e=this.planes,i=0;6>i;i++)e[i].copy(t.planes[i]);return this},setFromMatrix:function(t){var e=this.planes,i=t.elements;t=i[0];var n=i[1],r=i[2],o=i[3],s=i[4],a=i[5],l=i[6],h=i[7],c=i[8],u=i[9],d=i[10],p=i[11],f=i[12],m=i[13],g=i[14],i=i[15];return e[0].setComponents(o-t,h-s,p-c,i-f).normalize(),e[1].setComponents(o+t,h+s,p+c,i+f).normalize(),e[2].setComponents(o+n,h+a,p+u,i+m).normalize(),e[3].setComponents(o-n,h-a,p-u,i-m).normalize(),e[4].setComponents(o-r,h-l,p-d,i-g).normalize(),e[5].setComponents(o+r,h+l,p+d,i+g).normalize(),this},intersectsObject:function(){var t=new THREE.Sphere;return function(e){var i=e.geometry;return null===i.boundingSphere&&i.computeBoundingSphere(),t.copy(i.boundingSphere),t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){var e=this.planes,i=t.center;t=-t.radius;for(var n=0;6>n;n++)if(e[n].distanceToPoint(i)<t)return!1;return!0},intersectsBox:function(){var t=new THREE.Vector3,e=new THREE.Vector3;return function(i){for(var n=this.planes,r=0;6>r;r++){var o=n[r];t.x=0<o.normal.x?i.min.x:i.max.x,e.x=0<o.normal.x?i.max.x:i.min.x,t.y=0<o.normal.y?i.min.y:i.max.y,e.y=0<o.normal.y?i.max.y:i.min.y,t.z=0<o.normal.z?i.min.z:i.max.z,e.z=0<o.normal.z?i.max.z:i.min.z;var s=o.distanceToPoint(t),o=o.distanceToPoint(e);if(0>s&&0>o)return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,i=0;6>i;i++)if(0>e[i].distanceToPoint(t))return!1;return!0},clone:function(){return(new THREE.Frustum).copy(this)}},THREE.Plane=function(t,e){this.normal=void 0!==t?t:new THREE.Vector3(1,0,0),this.constant=void 0!==e?e:0},THREE.Plane.prototype={constructor:THREE.Plane,set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new THREE.Vector3,e=new THREE.Vector3;return function(i,n,r){return n=t.subVectors(r,n).cross(e.subVectors(i,n)).normalize(),this.setFromNormalAndCoplanarPoint(n,i),this}}(),copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return this.orthoPoint(t,e).sub(t).negate()},orthoPoint:function(t,e){var i=this.distanceToPoint(t);return(e||new THREE.Vector3).copy(this.normal).multiplyScalar(i)},isIntersectionLine:function(t){var e=this.distanceToPoint(t.start);return t=this.distanceToPoint(t.end),0>e&&t>0||0>t&&e>0},intersectLine:function(){var t=new THREE.Vector3;return function(e,i){var n=i||new THREE.Vector3,r=e.delta(t),o=this.normal.dot(r);return 0!=o?(o=-(e.start.dot(this.normal)+this.constant)/o,0>o||o>1?void 0:n.copy(r).multiplyScalar(o).add(e.start)):0==this.distanceToPoint(e.start)?n.copy(e.start):void 0}}(),coplanarPoint:function(t){return(t||new THREE.Vector3).copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new THREE.Vector3,e=new THREE.Vector3,i=new THREE.Matrix3;return function(n,r){var o=r||i.getNormalMatrix(n),o=t.copy(this.normal).applyMatrix3(o),s=this.coplanarPoint(e);return s.applyMatrix4(n),this.setFromNormalAndCoplanarPoint(o,s),this}}(),translate:function(t){return this.constant-=t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant==this.constant},clone:function(){return(new THREE.Plane).copy(this)}},THREE.Math={generateUUID:function(){var t,e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=Array(36),n=0;return function(){for(var r=0;36>r;r++)8==r||13==r||18==r||23==r?i[r]="-":14==r?i[r]="4":(2>=n&&(n=33554432+16777216*Math.random()|0),t=15&n,n>>=4,i[r]=e[19==r?3&t|8:t]);return i.join("")}}(),clamp:function(t,e,i){return e>t?e:t>i?i:t},clampBottom:function(t,e){return e>t?e:t},mapLinear:function(t,e,i,n,r){return n+(t-e)*(r-n)/(i-e)},smoothstep:function(t,e,i){return e>=t?0:t>=i?1:(t=(t-e)/(i-e),t*t*(3-2*t))},smootherstep:function(t,e,i){return e>=t?0:t>=i?1:(t=(t-e)/(i-e),t*t*t*(t*(6*t-15)+10))},random16:function(){return(65280*Math.random()+255*Math.random())/65535},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(){var t=Math.PI/180;return function(e){return e*t}}(),radToDeg:function(){var t=180/Math.PI;return function(e){return e*t}}(),isPowerOfTwo:function(t){return 0===(t&t-1)&&0!==t}},THREE.Spline=function(t){function e(t,e,i,n,r,o,s){return t=.5*(i-t),n=.5*(n-e),(2*(e-i)+t+n)*s+(-3*(e-i)-2*t-n)*o+t*r+e}this.points=t;var i,n,r,o,s,a,l,h,c,u=[],d={x:0,y:0,z:0};this.initFromArray=function(t){this.points=[];for(var e=0;e<t.length;e++)this.points[e]={x:t[e][0],y:t[e][1],z:t[e][2]}},this.getPoint=function(t){return i=(this.points.length-1)*t,n=Math.floor(i),r=i-n,u[0]=0===n?n:n-1,u[1]=n,u[2]=n>this.points.length-2?this.points.length-1:n+1,u[3]=n>this.points.length-3?this.points.length-1:n+2,a=this.points[u[0]],l=this.points[u[1]],h=this.points[u[2]],c=this.points[u[3]],o=r*r,s=r*o,d.x=e(a.x,l.x,h.x,c.x,r,o,s),d.y=e(a.y,l.y,h.y,c.y,r,o,s),d.z=e(a.z,l.z,h.z,c.z,r,o,s),d},this.getControlPointsArray=function(){var t,e,i=this.points.length,n=[];for(t=0;i>t;t++)e=this.points[t],n[t]=[e.x,e.y,e.z];return n},this.getLength=function(t){var e,i,n,r=e=e=0,o=new THREE.Vector3,s=new THREE.Vector3,a=[],l=0;for(a[0]=0,t||(t=100),i=this.points.length*t,o.copy(this.points[0]),t=1;i>t;t++)e=t/i,n=this.getPoint(e),s.copy(n),l+=s.distanceTo(o),o.copy(n),e*=this.points.length-1,e=Math.floor(e),e!=r&&(a[e]=l,r=e);return a[a.length]=l,{chunks:a,total:l}},this.reparametrizeByArcLength=function(t){var e,i,n,r,o,s,a=[],l=new THREE.Vector3,h=this.getLength();for(a.push(l.copy(this.points[0]).clone()),e=1;e<this.points.length;e++){for(i=h.chunks[e]-h.chunks[e-1],s=Math.ceil(t*i/h.total),r=(e-1)/(this.points.length-1),o=e/(this.points.length-1),i=1;s-1>i;i++)n=r+1/s*i*(o-r),n=this.getPoint(n),a.push(l.copy(n).clone());a.push(l.copy(this.points[e]).clone())}this.points=a}},THREE.Triangle=function(t,e,i){this.a=void 0!==t?t:new THREE.Vector3,this.b=void 0!==e?e:new THREE.Vector3,this.c=void 0!==i?i:new THREE.Vector3},THREE.Triangle.normal=function(){var t=new THREE.Vector3;return function(e,i,n,r){return r=r||new THREE.Vector3,r.subVectors(n,i),t.subVectors(e,i),r.cross(t),e=r.lengthSq(),e>0?r.multiplyScalar(1/Math.sqrt(e)):r.set(0,0,0)}}(),THREE.Triangle.barycoordFromPoint=function(){var t=new THREE.Vector3,e=new THREE.Vector3,i=new THREE.Vector3;return function(n,r,o,s,a){t.subVectors(s,r),e.subVectors(o,r),i.subVectors(n,r),n=t.dot(t),r=t.dot(e),o=t.dot(i);var l=e.dot(e);s=e.dot(i);var h=n*l-r*r;return a=a||new THREE.Vector3,0==h?a.set(-2,-1,-1):(h=1/h,l=(l*o-r*s)*h,n=(n*s-r*o)*h,a.set(1-l-n,n,l))}}(),THREE.Triangle.containsPoint=function(){var t=new THREE.Vector3;return function(e,i,n,r){return e=THREE.Triangle.barycoordFromPoint(e,i,n,r,t),0<=e.x&&0<=e.y&&1>=e.x+e.y}}(),THREE.Triangle.prototype={constructor:THREE.Triangle,set:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this},setFromPointsAndIndices:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},area:function(){var t=new THREE.Vector3,e=new THREE.Vector3;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),midpoint:function(t){return(t||new THREE.Vector3).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(t){return THREE.Triangle.normal(this.a,this.b,this.c,t)},plane:function(t){return(t||new THREE.Plane).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(t,e){return THREE.Triangle.barycoordFromPoint(t,this.a,this.b,this.c,e)},containsPoint:function(t){return THREE.Triangle.containsPoint(t,this.a,this.b,this.c)},equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)},clone:function(){return(new THREE.Triangle).copy(this)}},THREE.Clock=function(t){this.autoStart=void 0!==t?t:!0,this.elapsedTime=this.oldTime=this.startTime=0,this.running=!1},THREE.Clock.prototype={constructor:THREE.Clock,start:function(){this.oldTime=this.startTime=void 0!==self.performance&&void 0!==self.performance.now?self.performance.now():Date.now(),this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running&&this.start(),this.running){var e=void 0!==self.performance&&void 0!==self.performance.now?self.performance.now():Date.now(),t=.001*(e-this.oldTime);this.oldTime=e,this.elapsedTime+=t}return t}},THREE.EventDispatcher=function(){},THREE.EventDispatcher.prototype={constructor:THREE.EventDispatcher,apply:function(t){t.addEventListener=THREE.EventDispatcher.prototype.addEventListener,t.hasEventListener=THREE.EventDispatcher.prototype.hasEventListener,t.removeEventListener=THREE.EventDispatcher.prototype.removeEventListener,t.dispatchEvent=THREE.EventDispatcher.prototype.dispatchEvent},addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var i=this._listeners;void 0===i[t]&&(i[t]=[]),-1===i[t].indexOf(e)&&i[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var i=this._listeners;return void 0!==i[t]&&-1!==i[t].indexOf(e)?!0:!1},removeEventListener:function(t,e){if(void 0!==this._listeners){var i=this._listeners[t];if(void 0!==i){var n=i.indexOf(e);-1!==n&&i.splice(n,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var i=[],n=e.length,r=0;n>r;r++)i[r]=e[r];for(r=0;n>r;r++)i[r].call(this,t)}}}},function(t){t.Raycaster=function(e,i,n,r){this.ray=new t.Ray(e,i),this.near=n||0,this.far=r||1/0,this.params={Sprite:{},Mesh:{},PointCloud:{threshold:1},LOD:{},Line:{}}};var e=function(t,e){return t.distance-e.distance},i=function(t,e,n,r){if(t.raycast(e,n),!0===r){t=t.children,r=0;for(var o=t.length;o>r;r++)i(t[r],e,n,!0)}};t.Raycaster.prototype={constructor:t.Raycaster,precision:1e-4,linePrecision:1,set:function(t,e){this.ray.set(t,e)},intersectObject:function(t,n){var r=[];return i(t,this,r,n),r.sort(e),r},intersectObjects:function(t,n){var r=[];if(!1==t instanceof Array)return console.log("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var o=0,s=t.length;s>o;o++)i(t[o],this,r,n);return r.sort(e),r}}}(THREE),THREE.Object3D=function(){Object.defineProperty(this,"id",{value:THREE.Object3DIdCount++}),this.uuid=THREE.Math.generateUUID(),this.name="",this.type="Object3D",this.parent=void 0,this.children=[],this.up=THREE.Object3D.DefaultUp.clone();var t=new THREE.Vector3,e=new THREE.Euler,i=new THREE.Quaternion,n=new THREE.Vector3(1,1,1);e.onChange(function(){i.setFromEuler(e,!1)}),i.onChange(function(){e.setFromQuaternion(i,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:i},scale:{enumerable:!0,value:n}}),this.renderDepth=null,this.rotationAutoUpdate=!0,this.matrix=new THREE.Matrix4,this.matrixWorld=new THREE.Matrix4,this.matrixAutoUpdate=!0,this.matrixWorldNeedsUpdate=!1,this.visible=!0,this.receiveShadow=this.castShadow=!1,this.frustumCulled=!0,this.userData={}},THREE.Object3D.DefaultUp=new THREE.Vector3(0,1,0),THREE.Object3D.prototype={constructor:THREE.Object3D,get eulerOrder(){return console.warn("THREE.Object3D: .eulerOrder has been moved to .rotation.order."),this.rotation.order},set eulerOrder(t){console.warn("THREE.Object3D: .eulerOrder has been moved to .rotation.order."),this.rotation.order=t},get useQuaternion(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set useQuaternion(t){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")
  25. },applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new THREE.Quaternion;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateX:function(){var t=new THREE.Vector3(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new THREE.Vector3(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new THREE.Vector3(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new THREE.Vector3;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},translateX:function(){var t=new THREE.Vector3(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new THREE.Vector3(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new THREE.Vector3(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new THREE.Matrix4;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new THREE.Matrix4;return function(e){t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add:",t,"can't be added as a child of itself."),this):(t instanceof THREE.Object3D?(void 0!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add:",t,"is not an instance of THREE.Object3D."),this)},remove:function(t){if(1<arguments.length)for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);e=this.children.indexOf(t),-1!==e&&(t.parent=void 0,t.dispatchEvent({type:"removed"}),this.children.splice(e,1))},getChildByName:function(t,e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t,e)},getObjectById:function(t,e){if(this.id===t)return this;for(var i=0,n=this.children.length;n>i;i++){var r=this.children[i].getObjectById(t,e);if(void 0!==r)return r}},getObjectByName:function(t,e){if(this.name===t)return this;for(var i=0,n=this.children.length;n>i;i++){var r=this.children[i].getObjectByName(t,e);if(void 0!==r)return r}},getWorldPosition:function(t){return t=t||new THREE.Vector3,this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new THREE.Vector3,e=new THREE.Vector3;return function(i){return i=i||new THREE.Quaternion,this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldRotation:function(){var t=new THREE.Quaternion;return function(e){return e=e||new THREE.Euler,this.getWorldQuaternion(t),e.setFromQuaternion(t,this.rotation.order,!1)}}(),getWorldScale:function(){var t=new THREE.Vector3,e=new THREE.Quaternion;return function(i){return i=i||new THREE.Vector3,this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,i),i}}(),getWorldDirection:function(){var t=new THREE.Quaternion;return function(e){return e=e||new THREE.Vector3,this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=0,i=this.children.length;i>e;e++)this.children[e].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=0,i=this.children.length;i>e;e++)this.children[e].traverseVisible(t)}},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){!0===this.matrixAutoUpdate&&this.updateMatrix(),(!0===this.matrixWorldNeedsUpdate||!0===t)&&(void 0===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=0,i=this.children.length;i>e;e++)this.children[e].updateMatrixWorld(t)},toJSON:function(){var t={metadata:{version:4.3,type:"Object",generator:"ObjectExporter"}},e={},i=function(i){if(void 0===t.geometries&&(t.geometries=[]),void 0===e[i.uuid]){var n=i.toJSON();delete n.metadata,e[i.uuid]=n,t.geometries.push(n)}return i.uuid},n={},r=function(e){if(void 0===t.materials&&(t.materials=[]),void 0===n[e.uuid]){var i=e.toJSON();delete i.metadata,n[e.uuid]=i,t.materials.push(i)}return e.uuid},o=function(t){var e={};if(e.uuid=t.uuid,e.type=t.type,""!==t.name&&(e.name=t.name),"{}"!==JSON.stringify(t.userData)&&(e.userData=t.userData),!0!==t.visible&&(e.visible=t.visible),t instanceof THREE.PerspectiveCamera?(e.fov=t.fov,e.aspect=t.aspect,e.near=t.near,e.far=t.far):t instanceof THREE.OrthographicCamera?(e.left=t.left,e.right=t.right,e.top=t.top,e.bottom=t.bottom,e.near=t.near,e.far=t.far):t instanceof THREE.AmbientLight?e.color=t.color.getHex():t instanceof THREE.DirectionalLight?(e.color=t.color.getHex(),e.intensity=t.intensity):t instanceof THREE.PointLight?(e.color=t.color.getHex(),e.intensity=t.intensity,e.distance=t.distance):t instanceof THREE.SpotLight?(e.color=t.color.getHex(),e.intensity=t.intensity,e.distance=t.distance,e.angle=t.angle,e.exponent=t.exponent):t instanceof THREE.HemisphereLight?(e.color=t.color.getHex(),e.groundColor=t.groundColor.getHex()):t instanceof THREE.Mesh?(e.geometry=i(t.geometry),e.material=r(t.material)):t instanceof THREE.Line?(e.geometry=i(t.geometry),e.material=r(t.material)):t instanceof THREE.Sprite&&(e.material=r(t.material)),e.matrix=t.matrix.toArray(),0<t.children.length){e.children=[];for(var n=0;n<t.children.length;n++)e.children.push(o(t.children[n]))}return e};return t.object=o(this),t},clone:function(t,e){if(void 0===t&&(t=new THREE.Object3D),void 0===e&&(e=!0),t.name=this.name,t.up.copy(this.up),t.position.copy(this.position),t.quaternion.copy(this.quaternion),t.scale.copy(this.scale),t.renderDepth=this.renderDepth,t.rotationAutoUpdate=this.rotationAutoUpdate,t.matrix.copy(this.matrix),t.matrixWorld.copy(this.matrixWorld),t.matrixAutoUpdate=this.matrixAutoUpdate,t.matrixWorldNeedsUpdate=this.matrixWorldNeedsUpdate,t.visible=this.visible,t.castShadow=this.castShadow,t.receiveShadow=this.receiveShadow,t.frustumCulled=this.frustumCulled,t.userData=JSON.parse(JSON.stringify(this.userData)),!0===e)for(var i=0;i<this.children.length;i++)t.add(this.children[i].clone());return t}},THREE.EventDispatcher.prototype.apply(THREE.Object3D.prototype),THREE.Object3DIdCount=0,THREE.Projector=function(){console.warn("THREE.Projector has been moved to /examples/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() has been removed.")}},THREE.Face3=function(t,e,i,n,r,o){this.a=t,this.b=e,this.c=i,this.normal=n instanceof THREE.Vector3?n:new THREE.Vector3,this.vertexNormals=n instanceof Array?n:[],this.color=r instanceof THREE.Color?r:new THREE.Color,this.vertexColors=r instanceof Array?r:[],this.vertexTangents=[],this.materialIndex=void 0!==o?o:0},THREE.Face3.prototype={constructor:THREE.Face3,clone:function(){var t=new THREE.Face3(this.a,this.b,this.c);t.normal.copy(this.normal),t.color.copy(this.color),t.materialIndex=this.materialIndex;for(var e=0,i=this.vertexNormals.length;i>e;e++)t.vertexNormals[e]=this.vertexNormals[e].clone();for(e=0,i=this.vertexColors.length;i>e;e++)t.vertexColors[e]=this.vertexColors[e].clone();for(e=0,i=this.vertexTangents.length;i>e;e++)t.vertexTangents[e]=this.vertexTangents[e].clone();return t}},THREE.Face4=function(t,e,i,n,r,o,s){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new THREE.Face3(t,e,i,r,o,s)},THREE.BufferAttribute=function(t,e){this.array=t,this.itemSize=e,this.needsUpdate=!1},THREE.BufferAttribute.prototype={constructor:THREE.BufferAttribute,get length(){return this.array.length},copyAt:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,r=this.itemSize;r>n;n++)this.array[t+n]=e.array[i+n]},set:function(t){return this.array.set(t),this},setX:function(t,e){return this.array[t*this.itemSize]=e,this},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},setXY:function(t,e,i){return t*=this.itemSize,this.array[t]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t*=this.itemSize,this.array[t]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=r,this},clone:function(){return new THREE.BufferAttribute(new this.array.constructor(this.array),this.itemSize)}},THREE.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new THREE.BufferAttribute(t,e)},THREE.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new THREE.BufferAttribute(t,e)},THREE.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new THREE.BufferAttribute(t,e)},THREE.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new THREE.BufferAttribute(t,e)},THREE.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new THREE.BufferAttribute(t,e)},THREE.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new THREE.BufferAttribute(t,e)},THREE.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new THREE.BufferAttribute(t,e)},THREE.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new THREE.BufferAttribute(t,e)},THREE.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use THREE.BufferAttribute( array, itemSize ) instead."),new THREE.BufferAttribute(t,e)},THREE.BufferGeometry=function(){Object.defineProperty(this,"id",{value:THREE.GeometryIdCount++}),this.uuid=THREE.Math.generateUUID(),this.name="",this.type="BufferGeometry",this.attributes={},this.attributesKeys=[],this.offsets=this.drawcalls=[],this.boundingSphere=this.boundingBox=null},THREE.BufferGeometry.prototype={constructor:THREE.BufferGeometry,addAttribute:function(t,e,i){!1==e instanceof THREE.BufferAttribute?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.attributes[t]={array:e,itemSize:i}):(this.attributes[t]=e,this.attributesKeys=Object.keys(this.attributes))},getAttribute:function(t){return this.attributes[t]},addDrawCall:function(t,e,i){this.drawcalls.push({start:t,count:e,index:void 0!==i?i:0})},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToVector3Array(e.array),e.needsUpdate=!0),e=this.attributes.normal,void 0!==e&&((new THREE.Matrix3).getNormalMatrix(t).applyToVector3Array(e.array),e.needsUpdate=!0)},center:function(){},fromGeometry:function(t,e){e=e||{vertexColors:THREE.NoColors};var i=t.vertices,n=t.faces,r=t.faceVertexUvs,o=e.vertexColors,s=0<r[0].length,a=3==n[0].vertexNormals.length,l=new Float32Array(9*n.length);this.addAttribute("position",new THREE.BufferAttribute(l,3));var h=new Float32Array(9*n.length);if(this.addAttribute("normal",new THREE.BufferAttribute(h,3)),o!==THREE.NoColors){var c=new Float32Array(9*n.length);this.addAttribute("color",new THREE.BufferAttribute(c,3))}if(!0===s){var u=new Float32Array(6*n.length);this.addAttribute("uv",new THREE.BufferAttribute(u,2))}for(var d=0,p=0,f=0;d<n.length;d++,p+=6,f+=9){var m=n[d],g=i[m.a],v=i[m.b],y=i[m.c];l[f]=g.x,l[f+1]=g.y,l[f+2]=g.z,l[f+3]=v.x,l[f+4]=v.y,l[f+5]=v.z,l[f+6]=y.x,l[f+7]=y.y,l[f+8]=y.z,!0===a?(g=m.vertexNormals[0],v=m.vertexNormals[1],y=m.vertexNormals[2],h[f]=g.x,h[f+1]=g.y,h[f+2]=g.z,h[f+3]=v.x,h[f+4]=v.y,h[f+5]=v.z,h[f+6]=y.x,h[f+7]=y.y,h[f+8]=y.z):(g=m.normal,h[f]=g.x,h[f+1]=g.y,h[f+2]=g.z,h[f+3]=g.x,h[f+4]=g.y,h[f+5]=g.z,h[f+6]=g.x,h[f+7]=g.y,h[f+8]=g.z),o===THREE.FaceColors?(m=m.color,c[f]=m.r,c[f+1]=m.g,c[f+2]=m.b,c[f+3]=m.r,c[f+4]=m.g,c[f+5]=m.b,c[f+6]=m.r,c[f+7]=m.g,c[f+8]=m.b):o===THREE.VertexColors&&(g=m.vertexColors[0],v=m.vertexColors[1],m=m.vertexColors[2],c[f]=g.r,c[f+1]=g.g,c[f+2]=g.b,c[f+3]=v.r,c[f+4]=v.g,c[f+5]=v.b,c[f+6]=m.r,c[f+7]=m.g,c[f+8]=m.b),!0===s&&(m=r[0][d][0],g=r[0][d][1],v=r[0][d][2],u[p]=m.x,u[p+1]=m.y,u[p+2]=g.x,u[p+3]=g.y,u[p+4]=v.x,u[p+5]=v.y)}return this.computeBoundingSphere(),this},computeBoundingBox:function(){var t=new THREE.Vector3;return function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var e=this.attributes.position.array;if(e){var i=this.boundingBox;i.makeEmpty();for(var n=0,r=e.length;r>n;n+=3)t.set(e[n],e[n+1],e[n+2]),i.expandByPoint(t)}(void 0===e||0===e.length)&&(this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0)),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.')}}(),computeBoundingSphere:function(){var t=new THREE.Box3,e=new THREE.Vector3;return function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var i=this.attributes.position.array;if(i){t.makeEmpty();for(var n=this.boundingSphere.center,r=0,o=i.length;o>r;r+=3)e.set(i[r],i[r+1],i[r+2]),t.expandByPoint(e);t.center(n);for(var s=0,r=0,o=i.length;o>r;r+=3)e.set(i[r],i[r+1],i[r+2]),s=Math.max(s,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.')}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.attributes;if(t.position){var e=t.position.array;if(void 0===t.normal)this.addAttribute("normal",new THREE.BufferAttribute(new Float32Array(e.length),3));else for(var i=t.normal.array,n=0,r=i.length;r>n;n++)i[n]=0;var o,s,a,i=t.normal.array,l=new THREE.Vector3,h=new THREE.Vector3,c=new THREE.Vector3,u=new THREE.Vector3,d=new THREE.Vector3;if(t.index)for(var p=t.index.array,f=0<this.offsets.length?this.offsets:[{start:0,count:p.length,index:0}],m=0,g=f.length;g>m;++m){r=f[m].start,o=f[m].count;for(var v=f[m].index,n=r,r=r+o;r>n;n+=3)o=3*(v+p[n]),s=3*(v+p[n+1]),a=3*(v+p[n+2]),l.fromArray(e,o),h.fromArray(e,s),c.fromArray(e,a),u.subVectors(c,h),d.subVectors(l,h),u.cross(d),i[o]+=u.x,i[o+1]+=u.y,i[o+2]+=u.z,i[s]+=u.x,i[s+1]+=u.y,i[s+2]+=u.z,i[a]+=u.x,i[a+1]+=u.y,i[a+2]+=u.z}else for(n=0,r=e.length;r>n;n+=9)l.fromArray(e,n),h.fromArray(e,n+3),c.fromArray(e,n+6),u.subVectors(c,h),d.subVectors(l,h),u.cross(d),i[n]=u.x,i[n+1]=u.y,i[n+2]=u.z,i[n+3]=u.x,i[n+4]=u.y,i[n+5]=u.z,i[n+6]=u.x,i[n+7]=u.y,i[n+8]=u.z;this.normalizeNormals(),t.normal.needsUpdate=!0}},computeTangents:function(){function t(t,e,i){M.fromArray(n,3*t),C.fromArray(n,3*e),H.fromArray(n,3*i),D.fromArray(o,2*t),P.fromArray(o,2*e),k.fromArray(o,2*i),u=C.x-M.x,d=H.x-M.x,p=C.y-M.y,f=H.y-M.y,m=C.z-M.z,g=H.z-M.z,v=P.x-D.x,y=k.x-D.x,E=P.y-D.y,b=k.y-D.y,_=1/(v*b-y*E),A.set((b*u-E*d)*_,(b*p-E*f)*_,(b*m-E*g)*_),L.set((v*d-y*u)*_,(v*f-y*p)*_,(v*g-y*m)*_),l[t].add(A),l[e].add(A),l[i].add(A),h[t].add(L),h[e].add(L),h[i].add(L)}function e(t){V.fromArray(r,3*t),j.copy(V),z=l[t],O.copy(z),O.sub(V.multiplyScalar(V.dot(z))).normalize(),U.crossVectors(j,z),B=U.dot(h[t]),N=0>B?-1:1,a[4*t]=O.x,a[4*t+1]=O.y,a[4*t+2]=O.z,a[4*t+3]=N}if(void 0===this.attributes.index||void 0===this.attributes.position||void 0===this.attributes.normal||void 0===this.attributes.uv)console.warn("Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");else{var i=this.attributes.index.array,n=this.attributes.position.array,r=this.attributes.normal.array,o=this.attributes.uv.array,s=n.length/3;void 0===this.attributes.tangent&&this.addAttribute("tangent",new THREE.BufferAttribute(new Float32Array(4*s),4));for(var a=this.attributes.tangent.array,l=[],h=[],c=0;s>c;c++)l[c]=new THREE.Vector3,h[c]=new THREE.Vector3;var u,d,p,f,m,g,v,y,E,b,_,T,x,w,R,S,M=new THREE.Vector3,C=new THREE.Vector3,H=new THREE.Vector3,D=new THREE.Vector2,P=new THREE.Vector2,k=new THREE.Vector2,A=new THREE.Vector3,L=new THREE.Vector3;0===this.drawcalls.length&&this.addDrawCall(0,i.length,0);var I=this.drawcalls,c=0;for(x=I.length;x>c;++c){T=I[c].start,w=I[c].count;var F=I[c].index,s=T;for(T+=w;T>s;s+=3)w=F+i[s],R=F+i[s+1],S=F+i[s+2],t(w,R,S)}var N,z,B,O=new THREE.Vector3,U=new THREE.Vector3,V=new THREE.Vector3,j=new THREE.Vector3,c=0;for(x=I.length;x>c;++c)for(T=I[c].start,w=I[c].count,F=I[c].index,s=T,T+=w;T>s;s+=3)w=F+i[s],R=F+i[s+1],S=F+i[s+2],e(w),e(R),e(S)}},computeOffsets:function(t){var e=t;void 0===t&&(e=65535),Date.now(),t=this.attributes.index.array;for(var i=this.attributes.position.array,n=t.length/3,r=new Uint16Array(t.length),o=0,s=0,a=[{start:0,count:0,index:0}],l=a[0],h=0,c=0,u=new Int32Array(6),d=new Int32Array(i.length),p=new Int32Array(i.length),f=0;f<i.length;f++)d[f]=-1,p[f]=-1;for(i=0;n>i;i++){for(var m=c=0;3>m;m++)f=t[3*i+m],-1==d[f]?(u[2*m]=f,u[2*m+1]=-1,c++):d[f]<l.index?(u[2*m]=f,u[2*m+1]=-1,h++):(u[2*m]=f,u[2*m+1]=d[f]);if(s+c>l.index+e)for(l={start:o,count:0,index:s},a.push(l),c=0;6>c;c+=2)m=u[c+1],m>-1&&m<l.index&&(u[c+1]=-1);for(c=0;6>c;c+=2)f=u[c],m=u[c+1],-1===m&&(m=s++),d[f]=m,p[m]=f,r[o++]=m-l.index,l.count++}return this.reorderBuffers(r,p,s),this.offsets=a},merge:function(){console.log("BufferGeometry.merge(): TODO")},normalizeNormals:function(){for(var t,e,i,n=this.attributes.normal.array,r=0,o=n.length;o>r;r+=3)t=n[r],e=n[r+1],i=n[r+2],t=1/Math.sqrt(t*t+e*e+i*i),n[r]*=t,n[r+1]*=t,n[r+2]*=t},reorderBuffers:function(t,e,i){var n,r={};for(n in this.attributes)"index"!=n&&(r[n]=new this.attributes[n].array.constructor(this.attributes[n].itemSize*i));for(var o=0;i>o;o++){var s=e[o];for(n in this.attributes)if("index"!=n)for(var a=this.attributes[n].array,l=this.attributes[n].itemSize,h=r[n],c=0;l>c;c++)h[o*l+c]=a[s*l+c]}this.attributes.index.array=t;for(n in this.attributes)"index"!=n&&(this.attributes[n].array=r[n],this.attributes[n].numItems=this.attributes[n].itemSize*i)},toJSON:function(){var t,e={metadata:{version:4,type:"BufferGeometry",generator:"BufferGeometryExporter"},uuid:this.uuid,type:this.type,data:{attributes:{}}},i=this.attributes,n=this.offsets,r=this.boundingSphere;for(t in i){for(var o=i[t],s=[],a=o.array,l=0,h=a.length;h>l;l++)s[l]=a[l];e.data.attributes[t]={itemSize:o.itemSize,type:o.array.constructor.name,array:s}}return 0<n.length&&(e.data.offsets=JSON.parse(JSON.stringify(n))),null!==r&&(e.data.boundingSphere={center:r.center.toArray(),radius:r.radius}),e},clone:function(){var t,e=new THREE.BufferGeometry;for(t in this.attributes)e.addAttribute(t,this.attributes[t].clone());t=0;for(var i=this.offsets.length;i>t;t++){var n=this.offsets[t];e.offsets.push({start:n.start,index:n.index,count:n.count})}return e},dispose:function(){this.dispatchEvent({type:"dispose"})}},THREE.EventDispatcher.prototype.apply(THREE.BufferGeometry.prototype),THREE.Geometry=function(){Object.defineProperty(this,"id",{value:THREE.GeometryIdCount++}),this.uuid=THREE.Math.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphColors=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.hasTangents=!1,this.dynamic=!0,this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.tangentsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.elementsNeedUpdate=this.verticesNeedUpdate=!1},THREE.Geometry.prototype={constructor:THREE.Geometry,applyMatrix:function(t){for(var e=(new THREE.Matrix3).getNormalMatrix(t),i=0,n=this.vertices.length;n>i;i++)this.vertices[i].applyMatrix4(t);for(i=0,n=this.faces.length;n>i;i++){t=this.faces[i],t.normal.applyMatrix3(e).normalize();for(var r=0,o=t.vertexNormals.length;o>r;r++)t.vertexNormals[r].applyMatrix3(e).normalize()}this.boundingBox instanceof THREE.Box3&&this.computeBoundingBox(),this.boundingSphere instanceof THREE.Sphere&&this.computeBoundingSphere()},fromBufferGeometry:function(t){for(var e=this,i=t.attributes,n=i.position.array,r=void 0!==i.index?i.index.array:void 0,o=void 0!==i.normal?i.normal.array:void 0,s=void 0!==i.color?i.color.array:void 0,a=void 0!==i.uv?i.uv.array:void 0,l=[],h=[],c=i=0;i<n.length;i+=3,c+=2)e.vertices.push(new THREE.Vector3(n[i],n[i+1],n[i+2])),void 0!==o&&l.push(new THREE.Vector3(o[i],o[i+1],o[i+2])),void 0!==s&&e.colors.push(new THREE.Color(s[i],s[i+1],s[i+2])),void 0!==a&&h.push(new THREE.Vector2(a[c],a[c+1]));if(a=function(t,i,n){var r=void 0!==o?[l[t].clone(),l[i].clone(),l[n].clone()]:[],a=void 0!==s?[e.colors[t].clone(),e.colors[i].clone(),e.colors[n].clone()]:[];e.faces.push(new THREE.Face3(t,i,n,r,a)),e.faceVertexUvs[0].push([h[t],h[i],h[n]])},void 0!==r)for(i=0;i<r.length;i+=3)a(r[i],r[i+1],r[i+2]);else for(i=0;i<n.length/3;i+=3)a(i,i+1,i+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){this.computeBoundingBox();var t=new THREE.Vector3;return t.addVectors(this.boundingBox.min,this.boundingBox.max),t.multiplyScalar(-.5),this.applyMatrix((new THREE.Matrix4).makeTranslation(t.x,t.y,t.z)),this.computeBoundingBox(),t},computeFaceNormals:function(){for(var t=new THREE.Vector3,e=new THREE.Vector3,i=0,n=this.faces.length;n>i;i++){var r=this.faces[i],o=this.vertices[r.a],s=this.vertices[r.b];t.subVectors(this.vertices[r.c],s),e.subVectors(o,s),t.cross(e),t.normalize(),r.normal.copy(t)}},computeVertexNormals:function(t){var e,i,n;for(n=Array(this.vertices.length),e=0,i=this.vertices.length;i>e;e++)n[e]=new THREE.Vector3;if(t){var r,o,s,a=new THREE.Vector3,l=new THREE.Vector3;for(new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,t=0,e=this.faces.length;e>t;t++)i=this.faces[t],r=this.vertices[i.a],o=this.vertices[i.b],s=this.vertices[i.c],a.subVectors(s,o),l.subVectors(r,o),a.cross(l),n[i.a].add(a),n[i.b].add(a),n[i.c].add(a)}else for(t=0,e=this.faces.length;e>t;t++)i=this.faces[t],n[i.a].add(i.normal),n[i.b].add(i.normal),n[i.c].add(i.normal);for(e=0,i=this.vertices.length;i>e;e++)n[e].normalize();for(t=0,e=this.faces.length;e>t;t++)i=this.faces[t],i.vertexNormals[0]=n[i.a].clone(),i.vertexNormals[1]=n[i.b].clone(),i.vertexNormals[2]=n[i.c].clone()},computeMorphNormals:function(){var t,e,i,n,r;for(i=0,n=this.faces.length;n>i;i++)for(r=this.faces[i],r.__originalFaceNormal?r.__originalFaceNormal.copy(r.normal):r.__originalFaceNormal=r.normal.clone(),r.__originalVertexNormals||(r.__originalVertexNormals=[]),t=0,e=r.vertexNormals.length;e>t;t++)r.__originalVertexNormals[t]?r.__originalVertexNormals[t].copy(r.vertexNormals[t]):r.__originalVertexNormals[t]=r.vertexNormals[t].clone();var o=new THREE.Geometry;for(o.faces=this.faces,t=0,e=this.morphTargets.length;e>t;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[],r=this.morphNormals[t].faceNormals;var s,a,l=this.morphNormals[t].vertexNormals;for(i=0,n=this.faces.length;n>i;i++)s=new THREE.Vector3,a={a:new THREE.Vector3,b:new THREE.Vector3,c:new THREE.Vector3},r.push(s),l.push(a)}for(l=this.morphNormals[t],o.vertices=this.morphTargets[t].vertices,o.computeFaceNormals(),o.computeVertexNormals(),i=0,n=this.faces.length;n>i;i++)r=this.faces[i],s=l.faceNormals[i],a=l.vertexNormals[i],s.copy(r.normal),a.a.copy(r.vertexNormals[0]),a.b.copy(r.vertexNormals[1]),a.c.copy(r.vertexNormals[2])}for(i=0,n=this.faces.length;n>i;i++)r=this.faces[i],r.normal=r.__originalFaceNormal,r.vertexNormals=r.__originalVertexNormals},computeTangents:function(){var t,e,i,n,r,o,s,a,l,h,c,u,d,p,f,m,g,v=[],y=[];i=new THREE.Vector3;var E=new THREE.Vector3,b=new THREE.Vector3,_=new THREE.Vector3,T=new THREE.Vector3;for(t=0,e=this.vertices.length;e>t;t++)v[t]=new THREE.Vector3,y[t]=new THREE.Vector3;for(t=0,e=this.faces.length;e>t;t++)r=this.faces[t],o=this.faceVertexUvs[0][t],n=r.a,g=r.b,r=r.c,s=this.vertices[n],a=this.vertices[g],l=this.vertices[r],h=o[0],c=o[1],u=o[2],o=a.x-s.x,d=l.x-s.x,p=a.y-s.y,f=l.y-s.y,a=a.z-s.z,s=l.z-s.z,l=c.x-h.x,m=u.x-h.x,c=c.y-h.y,h=u.y-h.y,u=1/(l*h-m*c),i.set((h*o-c*d)*u,(h*p-c*f)*u,(h*a-c*s)*u),E.set((l*d-m*o)*u,(l*f-m*p)*u,(l*s-m*a)*u),v[n].add(i),v[g].add(i),v[r].add(i),y[n].add(E),y[g].add(E),y[r].add(E);for(E=["a","b","c","d"],t=0,e=this.faces.length;e>t;t++)for(r=this.faces[t],i=0;i<Math.min(r.vertexNormals.length,3);i++)T.copy(r.vertexNormals[i]),n=r[E[i]],g=v[n],b.copy(g),b.sub(T.multiplyScalar(T.dot(g))).normalize(),_.crossVectors(r.vertexNormals[i],g),n=_.dot(y[n]),n=0>n?-1:1,r.vertexTangents[i]=new THREE.Vector4(b.x,b.y,b.z,n);this.hasTangents=!0},computeLineDistances:function(){for(var t=0,e=this.vertices,i=0,n=e.length;n>i;i++)i>0&&(t+=e[i].distanceTo(e[i-1])),this.lineDistances[i]=t},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(!1==t instanceof THREE.Geometry)console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t);else{var n,r=this.vertices.length,o=this.vertices,s=t.vertices,a=this.faces,l=t.faces,h=this.faceVertexUvs[0];t=t.faceVertexUvs[0],void 0===i&&(i=0),void 0!==e&&(n=(new THREE.Matrix3).getNormalMatrix(e));for(var c=0,u=s.length;u>c;c++){var d=s[c].clone();void 0!==e&&d.applyMatrix4(e),o.push(d)}for(c=0,u=l.length;u>c;c++){var p,s=l[c],f=s.vertexNormals,m=s.vertexColors,d=new THREE.Face3(s.a+r,s.b+r,s.c+r);for(d.normal.copy(s.normal),void 0!==n&&d.normal.applyMatrix3(n).normalize(),e=0,o=f.length;o>e;e++)p=f[e].clone(),void 0!==n&&p.applyMatrix3(n).normalize(),d.vertexNormals.push(p);for(d.color.copy(s.color),e=0,o=m.length;o>e;e++)p=m[e],d.vertexColors.push(p.clone());d.materialIndex=s.materialIndex+i,a.push(d)}for(c=0,u=t.length;u>c;c++)if(i=t[c],n=[],void 0!==i){for(e=0,o=i.length;o>e;e++)n.push(new THREE.Vector2(i[e].x,i[e].y));h.push(n)}}},mergeVertices:function(){var t,e,i,n={},r=[],o=[],s=Math.pow(10,4);for(e=0,i=this.vertices.length;i>e;e++)t=this.vertices[e],t=Math.round(t.x*s)+"_"+Math.round(t.y*s)+"_"+Math.round(t.z*s),void 0===n[t]?(n[t]=e,r.push(this.vertices[e]),o[e]=r.length-1):o[e]=o[n[t]];for(n=[],e=0,i=this.faces.length;i>e;e++)for(s=this.faces[e],s.a=o[s.a],s.b=o[s.b],s.c=o[s.c],s=[s.a,s.b,s.c],t=0;3>t;t++)if(s[t]==s[(t+1)%3]){n.push(e);break}for(e=n.length-1;e>=0;e--)for(s=n[e],this.faces.splice(s,1),o=0,i=this.faceVertexUvs.length;i>o;o++)this.faceVertexUvs[o].splice(s,1);return e=this.vertices.length-r.length,this.vertices=r,e},toJSON:function(){function t(t,e,i){return i?t|1<<e:t&~(1<<e)}function e(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==h[e]?h[e]:(h[e]=l.length/3,l.push(t.x,t.y,t.z),h[e])}function i(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==u[e]?u[e]:(u[e]=c.length,c.push(t.getHex()),u[e])}function n(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]?p[e]:(p[e]=d.length/2,d.push(t.x,t.y),p[e])}var r={metadata:{version:4,type:"BufferGeometry",generator:"BufferGeometryExporter"},uuid:this.uuid,type:this.type};if(""!==this.name&&(r.name=this.name),void 0!==this.parameters){var o,s=this.parameters;for(o in s)void 0!==s[o]&&(r[o]=s[o]);return r}for(s=[],o=0;o<this.vertices.length;o++){var a=this.vertices[o];s.push(a.x,a.y,a.z)}var a=[],l=[],h={},c=[],u={},d=[],p={};for(o=0;o<this.faces.length;o++){var f=this.faces[o],m=void 0!==this.faceVertexUvs[0][o],g=0<f.normal.length(),v=0<f.vertexNormals.length,y=1!==f.color.r||1!==f.color.g||1!==f.color.b,E=0<f.vertexColors.length,b=0,b=t(b,0,0),b=t(b,1,!1),b=t(b,2,!1),b=t(b,3,m),b=t(b,4,g),b=t(b,5,v),b=t(b,6,y),b=t(b,7,E);a.push(b),a.push(f.a,f.b,f.c),m&&(m=this.faceVertexUvs[0][o],a.push(n(m[0]),n(m[1]),n(m[2]))),g&&a.push(e(f.normal)),v&&(g=f.vertexNormals,a.push(e(g[0]),e(g[1]),e(g[2]))),y&&a.push(i(f.color)),E&&(f=f.vertexColors,a.push(i(f[0]),i(f[1]),i(f[2])))}return r.data={},r.data.vertices=s,r.data.normals=l,0<c.length&&(r.data.colors=c),0<d.length&&(r.data.uvs=[d]),r.data.faces=a,r},clone:function(){for(var t=new THREE.Geometry,e=this.vertices,i=0,n=e.length;n>i;i++)t.vertices.push(e[i].clone());for(e=this.faces,i=0,n=e.length;n>i;i++)t.faces.push(e[i].clone());for(e=this.faceVertexUvs[0],i=0,n=e.length;n>i;i++){for(var r=e[i],o=[],s=0,a=r.length;a>s;s++)o.push(new THREE.Vector2(r[s].x,r[s].y));t.faceVertexUvs[0].push(o)}return t},dispose:function(){this.dispatchEvent({type:"dispose"})}},THREE.EventDispatcher.prototype.apply(THREE.Geometry.prototype),THREE.GeometryIdCount=0,THREE.Camera=function(){THREE.Object3D.call(this),this.type="Camera",this.matrixWorldInverse=new THREE.Matrix4,this.projectionMatrix=new THREE.Matrix4},THREE.Camera.prototype=Object.create(THREE.Object3D.prototype),THREE.Camera.prototype.getWorldDirection=function(){var t=new THREE.Quaternion;return function(e){return e=e||new THREE.Vector3,this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),THREE.Camera.prototype.lookAt=function(){var t=new THREE.Matrix4;return function(e){t.lookAt(this.position,e,this.up),this.quaternion.setFromRotationMatrix(t)}}(),THREE.Camera.prototype.clone=function(t){return void 0===t&&(t=new THREE.Camera),THREE.Object3D.prototype.clone.call(this,t),t.matrixWorldInverse.copy(this.matrixWorldInverse),t.projectionMatrix.copy(this.projectionMatrix),t},THREE.CubeCamera=function(t,e,i){THREE.Object3D.call(this),this.type="CubeCamera";var n=new THREE.PerspectiveCamera(90,1,t,e);n.up.set(0,-1,0),n.lookAt(new THREE.Vector3(1,0,0)),this.add(n);var r=new THREE.PerspectiveCamera(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new THREE.Vector3(-1,0,0)),this.add(r);var o=new THREE.PerspectiveCamera(90,1,t,e);o.up.set(0,0,1),o.lookAt(new THREE.Vector3(0,1,0)),this.add(o);var s=new THREE.PerspectiveCamera(90,1,t,e);s.up.set(0,0,-1),s.lookAt(new THREE.Vector3(0,-1,0)),this.add(s);var a=new THREE.PerspectiveCamera(90,1,t,e);a.up.set(0,-1,0),a.lookAt(new THREE.Vector3(0,0,1)),this.add(a);var l=new THREE.PerspectiveCamera(90,1,t,e);l.up.set(0,-1,0),l.lookAt(new THREE.Vector3(0,0,-1)),this.add(l),this.renderTarget=new THREE.WebGLRenderTargetCube(i,i,{format:THREE.RGBFormat,magFilter:THREE.LinearFilter,minFilter:THREE.LinearFilter}),this.updateCubeMap=function(t,e){var i=this.renderTarget,h=i.generateMipmaps;i.generateMipmaps=!1,i.activeCubeFace=0,t.render(e,n,i),i.activeCubeFace=1,t.render(e,r,i),i.activeCubeFace=2,t.render(e,o,i),i.activeCubeFace=3,t.render(e,s,i),i.activeCubeFace=4,t.render(e,a,i),i.generateMipmaps=h,i.activeCubeFace=5,t.render(e,l,i)
  26. }},THREE.CubeCamera.prototype=Object.create(THREE.Object3D.prototype),THREE.OrthographicCamera=function(t,e,i,n,r,o){THREE.Camera.call(this),this.type="OrthographicCamera",this.zoom=1,this.left=t,this.right=e,this.top=i,this.bottom=n,this.near=void 0!==r?r:.1,this.far=void 0!==o?o:2e3,this.updateProjectionMatrix()},THREE.OrthographicCamera.prototype=Object.create(THREE.Camera.prototype),THREE.OrthographicCamera.prototype.updateProjectionMatrix=function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2;this.projectionMatrix.makeOrthographic(i-t,i+t,n+e,n-e,this.near,this.far)},THREE.OrthographicCamera.prototype.clone=function(){var t=new THREE.OrthographicCamera;return THREE.Camera.prototype.clone.call(this,t),t.zoom=this.zoom,t.left=this.left,t.right=this.right,t.top=this.top,t.bottom=this.bottom,t.near=this.near,t.far=this.far,t.projectionMatrix.copy(this.projectionMatrix),t},THREE.PerspectiveCamera=function(t,e,i,n){THREE.Camera.call(this),this.type="PerspectiveCamera",this.zoom=1,this.fov=void 0!==t?t:50,this.aspect=void 0!==e?e:1,this.near=void 0!==i?i:.1,this.far=void 0!==n?n:2e3,this.updateProjectionMatrix()},THREE.PerspectiveCamera.prototype=Object.create(THREE.Camera.prototype),THREE.PerspectiveCamera.prototype.setLens=function(t,e){void 0===e&&(e=24),this.fov=2*THREE.Math.radToDeg(Math.atan(e/(2*t))),this.updateProjectionMatrix()},THREE.PerspectiveCamera.prototype.setViewOffset=function(t,e,i,n,r,o){this.fullWidth=t,this.fullHeight=e,this.x=i,this.y=n,this.width=r,this.height=o,this.updateProjectionMatrix()},THREE.PerspectiveCamera.prototype.updateProjectionMatrix=function(){var t=THREE.Math.radToDeg(2*Math.atan(Math.tan(.5*THREE.Math.degToRad(this.fov))/this.zoom));if(this.fullWidth){var e=this.fullWidth/this.fullHeight,t=Math.tan(THREE.Math.degToRad(.5*t))*this.near,i=-t,n=e*i,e=Math.abs(e*t-n),i=Math.abs(t-i);this.projectionMatrix.makeFrustum(n+this.x*e/this.fullWidth,n+(this.x+this.width)*e/this.fullWidth,t-(this.y+this.height)*i/this.fullHeight,t-this.y*i/this.fullHeight,this.near,this.far)}else this.projectionMatrix.makePerspective(t,this.aspect,this.near,this.far)},THREE.PerspectiveCamera.prototype.clone=function(){var t=new THREE.PerspectiveCamera;return THREE.Camera.prototype.clone.call(this,t),t.zoom=this.zoom,t.fov=this.fov,t.aspect=this.aspect,t.near=this.near,t.far=this.far,t.projectionMatrix.copy(this.projectionMatrix),t},THREE.Light=function(t){THREE.Object3D.call(this),this.type="Light",this.color=new THREE.Color(t)},THREE.Light.prototype=Object.create(THREE.Object3D.prototype),THREE.Light.prototype.clone=function(t){return void 0===t&&(t=new THREE.Light),THREE.Object3D.prototype.clone.call(this,t),t.color.copy(this.color),t},THREE.AmbientLight=function(t){THREE.Light.call(this,t),this.type="AmbientLight"},THREE.AmbientLight.prototype=Object.create(THREE.Light.prototype),THREE.AmbientLight.prototype.clone=function(){var t=new THREE.AmbientLight;return THREE.Light.prototype.clone.call(this,t),t},THREE.AreaLight=function(t,e){THREE.Light.call(this,t),this.type="AreaLight",this.normal=new THREE.Vector3(0,-1,0),this.right=new THREE.Vector3(1,0,0),this.intensity=void 0!==e?e:1,this.height=this.width=1,this.constantAttenuation=1.5,this.linearAttenuation=.5,this.quadraticAttenuation=.1},THREE.AreaLight.prototype=Object.create(THREE.Light.prototype),THREE.DirectionalLight=function(t,e){THREE.Light.call(this,t),this.type="DirectionalLight",this.position.set(0,1,0),this.target=new THREE.Object3D,this.intensity=void 0!==e?e:1,this.onlyShadow=this.castShadow=!1,this.shadowCameraNear=50,this.shadowCameraFar=5e3,this.shadowCameraLeft=-500,this.shadowCameraTop=this.shadowCameraRight=500,this.shadowCameraBottom=-500,this.shadowCameraVisible=!1,this.shadowBias=0,this.shadowDarkness=.5,this.shadowMapHeight=this.shadowMapWidth=512,this.shadowCascade=!1,this.shadowCascadeOffset=new THREE.Vector3(0,0,-1e3),this.shadowCascadeCount=2,this.shadowCascadeBias=[0,0,0],this.shadowCascadeWidth=[512,512,512],this.shadowCascadeHeight=[512,512,512],this.shadowCascadeNearZ=[-1,.99,.998],this.shadowCascadeFarZ=[.99,.998,1],this.shadowCascadeArray=[],this.shadowMatrix=this.shadowCamera=this.shadowMapSize=this.shadowMap=null},THREE.DirectionalLight.prototype=Object.create(THREE.Light.prototype),THREE.DirectionalLight.prototype.clone=function(){var t=new THREE.DirectionalLight;return THREE.Light.prototype.clone.call(this,t),t.target=this.target.clone(),t.intensity=this.intensity,t.castShadow=this.castShadow,t.onlyShadow=this.onlyShadow,t.shadowCameraNear=this.shadowCameraNear,t.shadowCameraFar=this.shadowCameraFar,t.shadowCameraLeft=this.shadowCameraLeft,t.shadowCameraRight=this.shadowCameraRight,t.shadowCameraTop=this.shadowCameraTop,t.shadowCameraBottom=this.shadowCameraBottom,t.shadowCameraVisible=this.shadowCameraVisible,t.shadowBias=this.shadowBias,t.shadowDarkness=this.shadowDarkness,t.shadowMapWidth=this.shadowMapWidth,t.shadowMapHeight=this.shadowMapHeight,t.shadowCascade=this.shadowCascade,t.shadowCascadeOffset.copy(this.shadowCascadeOffset),t.shadowCascadeCount=this.shadowCascadeCount,t.shadowCascadeBias=this.shadowCascadeBias.slice(0),t.shadowCascadeWidth=this.shadowCascadeWidth.slice(0),t.shadowCascadeHeight=this.shadowCascadeHeight.slice(0),t.shadowCascadeNearZ=this.shadowCascadeNearZ.slice(0),t.shadowCascadeFarZ=this.shadowCascadeFarZ.slice(0),t},THREE.HemisphereLight=function(t,e,i){THREE.Light.call(this,t),this.type="HemisphereLight",this.position.set(0,100,0),this.groundColor=new THREE.Color(e),this.intensity=void 0!==i?i:1},THREE.HemisphereLight.prototype=Object.create(THREE.Light.prototype),THREE.HemisphereLight.prototype.clone=function(){var t=new THREE.HemisphereLight;return THREE.Light.prototype.clone.call(this,t),t.groundColor.copy(this.groundColor),t.intensity=this.intensity,t},THREE.PointLight=function(t,e,i){THREE.Light.call(this,t),this.type="PointLight",this.intensity=void 0!==e?e:1,this.distance=void 0!==i?i:0},THREE.PointLight.prototype=Object.create(THREE.Light.prototype),THREE.PointLight.prototype.clone=function(){var t=new THREE.PointLight;return THREE.Light.prototype.clone.call(this,t),t.intensity=this.intensity,t.distance=this.distance,t},THREE.SpotLight=function(t,e,i,n,r){THREE.Light.call(this,t),this.type="SpotLight",this.position.set(0,1,0),this.target=new THREE.Object3D,this.intensity=void 0!==e?e:1,this.distance=void 0!==i?i:0,this.angle=void 0!==n?n:Math.PI/3,this.exponent=void 0!==r?r:10,this.onlyShadow=this.castShadow=!1,this.shadowCameraNear=50,this.shadowCameraFar=5e3,this.shadowCameraFov=50,this.shadowCameraVisible=!1,this.shadowBias=0,this.shadowDarkness=.5,this.shadowMapHeight=this.shadowMapWidth=512,this.shadowMatrix=this.shadowCamera=this.shadowMapSize=this.shadowMap=null},THREE.SpotLight.prototype=Object.create(THREE.Light.prototype),THREE.SpotLight.prototype.clone=function(){var t=new THREE.SpotLight;return THREE.Light.prototype.clone.call(this,t),t.target=this.target.clone(),t.intensity=this.intensity,t.distance=this.distance,t.angle=this.angle,t.exponent=this.exponent,t.castShadow=this.castShadow,t.onlyShadow=this.onlyShadow,t.shadowCameraNear=this.shadowCameraNear,t.shadowCameraFar=this.shadowCameraFar,t.shadowCameraFov=this.shadowCameraFov,t.shadowCameraVisible=this.shadowCameraVisible,t.shadowBias=this.shadowBias,t.shadowDarkness=this.shadowDarkness,t.shadowMapWidth=this.shadowMapWidth,t.shadowMapHeight=this.shadowMapHeight,t},THREE.Cache=function(){this.files={}},THREE.Cache.prototype={constructor:THREE.Cache,add:function(t,e){this.files[t]=e},get:function(t){return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},THREE.Loader=function(t){this.statusDomElement=(this.showStatus=t)?THREE.Loader.prototype.addStatusElement():null,this.imageLoader=new THREE.ImageLoader,this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}},THREE.Loader.prototype={constructor:THREE.Loader,crossOrigin:void 0,addStatusElement:function(){var t=document.createElement("div");return t.style.position="absolute",t.style.right="0px",t.style.top="0px",t.style.fontSize="0.8em",t.style.textAlign="left",t.style.background="rgba(0,0,0,0.25)",t.style.color="#fff",t.style.width="120px",t.style.padding="0.5em 0.5em 0.5em 0.5em",t.style.zIndex=1e3,t.innerHTML="Loading ...",t},updateProgress:function(t){var e="Loaded ",e=t.total?e+((100*t.loaded/t.total).toFixed(0)+"%"):e+((t.loaded/1024).toFixed(2)+" KB");this.statusDomElement.innerHTML=e},extractUrlBase:function(t){return t=t.split("/"),1===t.length?"./":(t.pop(),t.join("/")+"/")},initMaterials:function(t,e){for(var i=[],n=0;n<t.length;++n)i[n]=this.createMaterial(t[n],e);return i},needsTangents:function(t){for(var e=0,i=t.length;i>e;e++)if(t[e]instanceof THREE.ShaderMaterial)return!0;return!1},createMaterial:function(t,e){function i(t){return t=Math.log(t)/Math.LN2,Math.pow(2,Math.round(t))}function n(t,n,r,s,a,l,h){var c,u=e+r,d=THREE.Loader.Handlers.get(u);null!==d?c=d.load(u):(c=new THREE.Texture,d=o.imageLoader,d.crossOrigin=o.crossOrigin,d.load(u,function(t){if(!1===THREE.Math.isPowerOfTwo(t.width)||!1===THREE.Math.isPowerOfTwo(t.height)){var e=i(t.width),n=i(t.height),r=document.createElement("canvas");r.width=e,r.height=n,r.getContext("2d").drawImage(t,0,0,e,n),c.image=r}else c.image=t;c.needsUpdate=!0})),c.sourceFile=r,s&&(c.repeat.set(s[0],s[1]),1!==s[0]&&(c.wrapS=THREE.RepeatWrapping),1!==s[1]&&(c.wrapT=THREE.RepeatWrapping)),a&&c.offset.set(a[0],a[1]),l&&(r={repeat:THREE.RepeatWrapping,mirror:THREE.MirroredRepeatWrapping},void 0!==r[l[0]]&&(c.wrapS=r[l[0]]),void 0!==r[l[1]]&&(c.wrapT=r[l[1]])),h&&(c.anisotropy=h),t[n]=c}function r(t){return(255*t[0]<<16)+(255*t[1]<<8)+255*t[2]}var o=this,s="MeshLambertMaterial",a={color:15658734,opacity:1,map:null,lightMap:null,normalMap:null,bumpMap:null,wireframe:!1};if(t.shading){var l=t.shading.toLowerCase();"phong"===l?s="MeshPhongMaterial":"basic"===l&&(s="MeshBasicMaterial")}return void 0!==t.blending&&void 0!==THREE[t.blending]&&(a.blending=THREE[t.blending]),(void 0!==t.transparent||1>t.opacity)&&(a.transparent=t.transparent),void 0!==t.depthTest&&(a.depthTest=t.depthTest),void 0!==t.depthWrite&&(a.depthWrite=t.depthWrite),void 0!==t.visible&&(a.visible=t.visible),void 0!==t.flipSided&&(a.side=THREE.BackSide),void 0!==t.doubleSided&&(a.side=THREE.DoubleSide),void 0!==t.wireframe&&(a.wireframe=t.wireframe),void 0!==t.vertexColors&&("face"===t.vertexColors?a.vertexColors=THREE.FaceColors:t.vertexColors&&(a.vertexColors=THREE.VertexColors)),t.colorDiffuse?a.color=r(t.colorDiffuse):t.DbgColor&&(a.color=t.DbgColor),t.colorSpecular&&(a.specular=r(t.colorSpecular)),t.colorAmbient&&(a.ambient=r(t.colorAmbient)),t.colorEmissive&&(a.emissive=r(t.colorEmissive)),t.transparency&&(a.opacity=t.transparency),t.specularCoef&&(a.shininess=t.specularCoef),t.mapDiffuse&&e&&n(a,"map",t.mapDiffuse,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy),t.mapLight&&e&&n(a,"lightMap",t.mapLight,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy),t.mapBump&&e&&n(a,"bumpMap",t.mapBump,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy),t.mapNormal&&e&&n(a,"normalMap",t.mapNormal,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy),t.mapSpecular&&e&&n(a,"specularMap",t.mapSpecular,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy),t.mapAlpha&&e&&n(a,"alphaMap",t.mapAlpha,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy),t.mapBumpScale&&(a.bumpScale=t.mapBumpScale),t.mapNormal?(s=THREE.ShaderLib.normalmap,l=THREE.UniformsUtils.clone(s.uniforms),l.tNormal.value=a.normalMap,t.mapNormalFactor&&l.uNormalScale.value.set(t.mapNormalFactor,t.mapNormalFactor),a.map&&(l.tDiffuse.value=a.map,l.enableDiffuse.value=!0),a.specularMap&&(l.tSpecular.value=a.specularMap,l.enableSpecular.value=!0),a.lightMap&&(l.tAO.value=a.lightMap,l.enableAO.value=!0),l.diffuse.value.setHex(a.color),l.specular.value.setHex(a.specular),l.ambient.value.setHex(a.ambient),l.shininess.value=a.shininess,void 0!==a.opacity&&(l.opacity.value=a.opacity),s=new THREE.ShaderMaterial({fragmentShader:s.fragmentShader,vertexShader:s.vertexShader,uniforms:l,lights:!0,fog:!0}),a.transparent&&(s.transparent=!0)):s=new THREE[s](a),void 0!==t.DbgName&&(s.name=t.DbgName),s}},THREE.Loader.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=0,i=this.handlers.length;i>e;e+=2){var n=this.handlers[e+1];if(this.handlers[e].test(t))return n}return null}},THREE.XHRLoader=function(t){this.cache=new THREE.Cache,this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.XHRLoader.prototype={constructor:THREE.XHRLoader,load:function(t,e,i,n){var r=this,o=r.cache.get(t);void 0!==o?e&&e(o):(o=new XMLHttpRequest,o.open("GET",t,!0),o.addEventListener("load",function(){r.cache.add(t,this.response),e&&e(this.response),r.manager.itemEnd(t)},!1),void 0!==i&&o.addEventListener("progress",function(t){i(t)},!1),void 0!==n&&o.addEventListener("error",function(t){n(t)},!1),void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),void 0!==this.responseType&&(o.responseType=this.responseType),o.send(null),r.manager.itemStart(t))},setResponseType:function(t){this.responseType=t},setCrossOrigin:function(t){this.crossOrigin=t}},THREE.ImageLoader=function(t){this.cache=new THREE.Cache,this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.ImageLoader.prototype={constructor:THREE.ImageLoader,load:function(t,e,i,n){var r=this,o=r.cache.get(t);return void 0===o?(o=document.createElement("img"),void 0!==e&&o.addEventListener("load",function(){r.cache.add(t,this),e(this),r.manager.itemEnd(t)},!1),void 0!==i&&o.addEventListener("progress",function(t){i(t)},!1),void 0!==n&&o.addEventListener("error",function(t){n(t)},!1),void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),o.src=t,r.manager.itemStart(t),o):void e(o)},setCrossOrigin:function(t){this.crossOrigin=t}},THREE.JSONLoader=function(t){THREE.Loader.call(this,t),this.withCredentials=!1},THREE.JSONLoader.prototype=Object.create(THREE.Loader.prototype),THREE.JSONLoader.prototype.load=function(t,e,i){i=i&&"string"==typeof i?i:this.extractUrlBase(t),this.onLoadStart(),this.loadAjaxJSON(this,t,e,i)},THREE.JSONLoader.prototype.loadAjaxJSON=function(t,e,i,n,r){var o=new XMLHttpRequest,s=0;o.onreadystatechange=function(){if(o.readyState===o.DONE)if(200===o.status||0===o.status){if(o.responseText){var a=JSON.parse(o.responseText);if(void 0!==a.metadata&&"scene"===a.metadata.type)return void console.error('THREE.JSONLoader: "'+e+'" seems to be a Scene. Use THREE.SceneLoader instead.');a=t.parse(a,n),i(a.geometry,a.materials)}else console.error('THREE.JSONLoader: "'+e+'" seems to be unreachable or the file is empty.');t.onLoadComplete()}else console.error("THREE.JSONLoader: Couldn't load \""+e+'" ('+o.status+")");else o.readyState===o.LOADING?r&&(0===s&&(s=o.getResponseHeader("Content-Length")),r({total:s,loaded:o.responseText.length})):o.readyState===o.HEADERS_RECEIVED&&void 0!==r&&(s=o.getResponseHeader("Content-Length"))},o.open("GET",e,!0),o.withCredentials=this.withCredentials,o.send(null)},THREE.JSONLoader.prototype.parse=function(t,e){var i=new THREE.Geometry,n=void 0!==t.scale?1/t.scale:1;return function(e){var n,r,o,s,a,l,h,c,u,d,p,f,m,g=t.faces;l=t.vertices;var v=t.normals,y=t.colors,E=0;if(void 0!==t.uvs){for(n=0;n<t.uvs.length;n++)t.uvs[n].length&&E++;for(n=0;E>n;n++)i.faceVertexUvs[n]=[]}for(s=0,a=l.length;a>s;)n=new THREE.Vector3,n.x=l[s++]*e,n.y=l[s++]*e,n.z=l[s++]*e,i.vertices.push(n);for(s=0,a=g.length;a>s;)if(e=g[s++],u=1&e,o=2&e,n=8&e,h=16&e,d=32&e,l=64&e,e&=128,u){if(u=new THREE.Face3,u.a=g[s],u.b=g[s+1],u.c=g[s+3],p=new THREE.Face3,p.a=g[s+1],p.b=g[s+2],p.c=g[s+3],s+=4,o&&(o=g[s++],u.materialIndex=o,p.materialIndex=o),o=i.faces.length,n)for(n=0;E>n;n++)for(f=t.uvs[n],i.faceVertexUvs[n][o]=[],i.faceVertexUvs[n][o+1]=[],r=0;4>r;r++)c=g[s++],m=f[2*c],c=f[2*c+1],m=new THREE.Vector2(m,c),2!==r&&i.faceVertexUvs[n][o].push(m),0!==r&&i.faceVertexUvs[n][o+1].push(m);if(h&&(h=3*g[s++],u.normal.set(v[h++],v[h++],v[h]),p.normal.copy(u.normal)),d)for(n=0;4>n;n++)h=3*g[s++],d=new THREE.Vector3(v[h++],v[h++],v[h]),2!==n&&u.vertexNormals.push(d),0!==n&&p.vertexNormals.push(d);if(l&&(l=g[s++],l=y[l],u.color.setHex(l),p.color.setHex(l)),e)for(n=0;4>n;n++)l=g[s++],l=y[l],2!==n&&u.vertexColors.push(new THREE.Color(l)),0!==n&&p.vertexColors.push(new THREE.Color(l));i.faces.push(u),i.faces.push(p)}else{if(u=new THREE.Face3,u.a=g[s++],u.b=g[s++],u.c=g[s++],o&&(o=g[s++],u.materialIndex=o),o=i.faces.length,n)for(n=0;E>n;n++)for(f=t.uvs[n],i.faceVertexUvs[n][o]=[],r=0;3>r;r++)c=g[s++],m=f[2*c],c=f[2*c+1],m=new THREE.Vector2(m,c),i.faceVertexUvs[n][o].push(m);if(h&&(h=3*g[s++],u.normal.set(v[h++],v[h++],v[h])),d)for(n=0;3>n;n++)h=3*g[s++],d=new THREE.Vector3(v[h++],v[h++],v[h]),u.vertexNormals.push(d);if(l&&(l=g[s++],u.color.setHex(y[l])),e)for(n=0;3>n;n++)l=g[s++],u.vertexColors.push(new THREE.Color(y[l]));i.faces.push(u)}}(n),function(){var e=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var n=0,r=t.skinWeights.length;r>n;n+=e)i.skinWeights.push(new THREE.Vector4(t.skinWeights[n],e>1?t.skinWeights[n+1]:0,e>2?t.skinWeights[n+2]:0,e>3?t.skinWeights[n+3]:0));if(t.skinIndices)for(n=0,r=t.skinIndices.length;r>n;n+=e)i.skinIndices.push(new THREE.Vector4(t.skinIndices[n],e>1?t.skinIndices[n+1]:0,e>2?t.skinIndices[n+2]:0,e>3?t.skinIndices[n+3]:0));i.bones=t.bones,i.bones&&0<i.bones.length&&(i.skinWeights.length!==i.skinIndices.length||i.skinIndices.length!==i.vertices.length)&&console.warn("When skinning, number of vertices ("+i.vertices.length+"), skinIndices ("+i.skinIndices.length+"), and skinWeights ("+i.skinWeights.length+") should match."),i.animation=t.animation,i.animations=t.animations}(),function(e){if(void 0!==t.morphTargets){var n,r,o,s,a,l;for(n=0,r=t.morphTargets.length;r>n;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=t.morphTargets[n].name,i.morphTargets[n].vertices=[],a=i.morphTargets[n].vertices,l=t.morphTargets[n].vertices,o=0,s=l.length;s>o;o+=3){var h=new THREE.Vector3;h.x=l[o]*e,h.y=l[o+1]*e,h.z=l[o+2]*e,a.push(h)}}if(void 0!==t.morphColors)for(n=0,r=t.morphColors.length;r>n;n++)for(i.morphColors[n]={},i.morphColors[n].name=t.morphColors[n].name,i.morphColors[n].colors=[],s=i.morphColors[n].colors,a=t.morphColors[n].colors,e=0,o=a.length;o>e;e+=3)l=new THREE.Color(16755200),l.setRGB(a[e],a[e+1],a[e+2]),s.push(l)}(n),i.computeFaceNormals(),i.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:i}:(n=this.initMaterials(t.materials,e),this.needsTangents(n)&&i.computeTangents(),{geometry:i,materials:n})},THREE.LoadingManager=function(t,e,i){var n=this,r=0,o=0;this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(){o++},this.itemEnd=function(t){r++,void 0!==n.onProgress&&n.onProgress(t,r,o),r===o&&void 0!==n.onLoad&&n.onLoad()}},THREE.DefaultLoadingManager=new THREE.LoadingManager,THREE.BufferGeometryLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.BufferGeometryLoader.prototype={constructor:THREE.BufferGeometryLoader,load:function(t,e,i,n){var r=this,o=new THREE.XHRLoader;o.setCrossOrigin(this.crossOrigin),o.load(t,function(t){e(r.parse(JSON.parse(t)))},i,n)},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t){var e,i=new THREE.BufferGeometry,n=t.attributes;for(e in n){var r=n[e],o=new self[r.type](r.array);i.addAttribute(e,new THREE.BufferAttribute(o,r.itemSize))}return n=t.offsets,void 0!==n&&(i.offsets=JSON.parse(JSON.stringify(n))),t=t.boundingSphere,void 0!==t&&(n=new THREE.Vector3,void 0!==t.center&&n.fromArray(t.center),i.boundingSphere=new THREE.Sphere(n,t.radius)),i}},THREE.MaterialLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.MaterialLoader.prototype={constructor:THREE.MaterialLoader,load:function(t,e,i,n){var r=this,o=new THREE.XHRLoader;o.setCrossOrigin(this.crossOrigin),o.load(t,function(t){e(r.parse(JSON.parse(t)))},i,n)},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t){var e=new THREE[t.type];if(void 0!==t.color&&e.color.setHex(t.color),void 0!==t.ambient&&e.ambient.setHex(t.ambient),void 0!==t.emissive&&e.emissive.setHex(t.emissive),void 0!==t.specular&&e.specular.setHex(t.specular),void 0!==t.shininess&&(e.shininess=t.shininess),void 0!==t.uniforms&&(e.uniforms=t.uniforms),void 0!==t.vertexShader&&(e.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(e.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(e.vertexColors=t.vertexColors),void 0!==t.shading&&(e.shading=t.shading),void 0!==t.blending&&(e.blending=t.blending),void 0!==t.side&&(e.side=t.side),void 0!==t.opacity&&(e.opacity=t.opacity),void 0!==t.transparent&&(e.transparent=t.transparent),void 0!==t.wireframe&&(e.wireframe=t.wireframe),void 0!==t.materials)for(var i=0,n=t.materials.length;n>i;i++)e.materials.push(this.parse(t.materials[i]));return e}},THREE.ObjectLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.ObjectLoader.prototype={constructor:THREE.ObjectLoader,load:function(t,e,i,n){var r=this,o=new THREE.XHRLoader(r.manager);o.setCrossOrigin(this.crossOrigin),o.load(t,function(t){e(r.parse(JSON.parse(t)))},i,n)},setCrossOrigin:function(t){this.crossOrigin=t},parse:function(t){var e=this.parseGeometries(t.geometries),i=this.parseMaterials(t.materials);return this.parseObject(t.object,e,i)},parseGeometries:function(t){var e={};if(void 0!==t)for(var i=new THREE.JSONLoader,n=new THREE.BufferGeometryLoader,r=0,o=t.length;o>r;r++){var s,a=t[r];switch(a.type){case"PlaneGeometry":s=new THREE.PlaneGeometry(a.width,a.height,a.widthSegments,a.heightSegments);break;case"BoxGeometry":case"CubeGeometry":s=new THREE.BoxGeometry(a.width,a.height,a.depth,a.widthSegments,a.heightSegments,a.depthSegments);break;case"CircleGeometry":s=new THREE.CircleGeometry(a.radius,a.segments);break;case"CylinderGeometry":s=new THREE.CylinderGeometry(a.radiusTop,a.radiusBottom,a.height,a.radialSegments,a.heightSegments,a.openEnded);break;case"SphereGeometry":s=new THREE.SphereGeometry(a.radius,a.widthSegments,a.heightSegments,a.phiStart,a.phiLength,a.thetaStart,a.thetaLength);break;case"IcosahedronGeometry":s=new THREE.IcosahedronGeometry(a.radius,a.detail);break;case"TorusGeometry":s=new THREE.TorusGeometry(a.radius,a.tube,a.radialSegments,a.tubularSegments,a.arc);break;case"TorusKnotGeometry":s=new THREE.TorusKnotGeometry(a.radius,a.tube,a.radialSegments,a.tubularSegments,a.p,a.q,a.heightScale);break;case"BufferGeometry":s=n.parse(a.data);break;case"Geometry":s=i.parse(a.data).geometry}s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),e[a.uuid]=s}return e},parseMaterials:function(t){var e={};if(void 0!==t)for(var i=new THREE.MaterialLoader,n=0,r=t.length;r>n;n++){var o=t[n],s=i.parse(o);s.uuid=o.uuid,void 0!==o.name&&(s.name=o.name),e[o.uuid]=s}return e},parseObject:function(){var t=new THREE.Matrix4;return function(e,i,n){var r;switch(e.type){case"Scene":r=new THREE.Scene;break;case"PerspectiveCamera":r=new THREE.PerspectiveCamera(e.fov,e.aspect,e.near,e.far);break;case"OrthographicCamera":r=new THREE.OrthographicCamera(e.left,e.right,e.top,e.bottom,e.near,e.far);break;case"AmbientLight":r=new THREE.AmbientLight(e.color);break;case"DirectionalLight":r=new THREE.DirectionalLight(e.color,e.intensity);break;case"PointLight":r=new THREE.PointLight(e.color,e.intensity,e.distance);break;case"SpotLight":r=new THREE.SpotLight(e.color,e.intensity,e.distance,e.angle,e.exponent);break;case"HemisphereLight":r=new THREE.HemisphereLight(e.color,e.groundColor,e.intensity);break;case"Mesh":r=i[e.geometry];var o=n[e.material];void 0===r&&console.warn("THREE.ObjectLoader: Undefined geometry",e.geometry),void 0===o&&console.warn("THREE.ObjectLoader: Undefined material",e.material),r=new THREE.Mesh(r,o);break;case"Line":r=i[e.geometry],o=n[e.material],void 0===r&&console.warn("THREE.ObjectLoader: Undefined geometry",e.geometry),void 0===o&&console.warn("THREE.ObjectLoader: Undefined material",e.material),r=new THREE.Line(r,o);break;case"Sprite":o=n[e.material],void 0===o&&console.warn("THREE.ObjectLoader: Undefined material",e.material),r=new THREE.Sprite(o);break;case"Group":r=new THREE.Group;break;default:r=new THREE.Object3D}if(r.uuid=e.uuid,void 0!==e.name&&(r.name=e.name),void 0!==e.matrix?(t.fromArray(e.matrix),t.decompose(r.position,r.quaternion,r.scale)):(void 0!==e.position&&r.position.fromArray(e.position),void 0!==e.rotation&&r.rotation.fromArray(e.rotation),void 0!==e.scale&&r.scale.fromArray(e.scale)),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.children)for(var s in e.children)r.add(this.parseObject(e.children[s],i,n));return r}}()},THREE.TextureLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.TextureLoader.prototype={constructor:THREE.TextureLoader,load:function(t,e,i,n){var r=new THREE.ImageLoader(this.manager);r.setCrossOrigin(this.crossOrigin),r.load(t,function(t){t=new THREE.Texture(t),t.needsUpdate=!0,void 0!==e&&e(t)},i,n)},setCrossOrigin:function(t){this.crossOrigin=t}},THREE.CompressedTextureLoader=function(){this._parser=null},THREE.CompressedTextureLoader.prototype={constructor:THREE.CompressedTextureLoader,load:function(t,e,i){var n=this,r=[],o=new THREE.CompressedTexture;o.image=r;var s=new THREE.XHRLoader;if(s.setResponseType("arraybuffer"),t instanceof Array){var a=0;i=function(i){s.load(t[i],function(t){t=n._parser(t,!0),r[i]={width:t.width,height:t.height,format:t.format,mipmaps:t.mipmaps},a+=1,6===a&&(1==t.mipmapCount&&(o.minFilter=THREE.LinearFilter),o.format=t.format,o.needsUpdate=!0,e&&e(o))})};for(var l=0,h=t.length;h>l;++l)i(l)}else s.load(t,function(t){if(t=n._parser(t,!0),t.isCubemap)for(var i=t.mipmaps.length/t.mipmapCount,s=0;i>s;s++){r[s]={mipmaps:[]};for(var a=0;a<t.mipmapCount;a++)r[s].mipmaps.push(t.mipmaps[s*t.mipmapCount+a]),r[s].format=t.format,r[s].width=t.width,r[s].height=t.height}else o.image.width=t.width,o.image.height=t.height,o.mipmaps=t.mipmaps;1===t.mipmapCount&&(o.minFilter=THREE.LinearFilter),o.format=t.format,o.needsUpdate=!0,e&&e(o)});return o}},THREE.Material=function(){Object.defineProperty(this,"id",{value:THREE.MaterialIdCount++}),this.uuid=THREE.Math.generateUUID(),this.name="",this.type="Material",this.side=THREE.FrontSide,this.opacity=1,this.transparent=!1,this.blending=THREE.NormalBlending,this.blendSrc=THREE.SrcAlphaFactor,this.blendDst=THREE.OneMinusSrcAlphaFactor,this.blendEquation=THREE.AddEquation,this.depthWrite=this.depthTest=!0,this.polygonOffset=!1,this.overdraw=this.alphaTest=this.polygonOffsetUnits=this.polygonOffsetFactor=0,this.needsUpdate=this.visible=!0},THREE.Material.prototype={constructor:THREE.Material,setValues:function(t){if(void 0!==t)for(var e in t){var i=t[e];if(void 0===i)console.warn("THREE.Material: '"+e+"' parameter is undefined.");else if(e in this){var n=this[e];n instanceof THREE.Color?n.set(i):n instanceof THREE.Vector3&&i instanceof THREE.Vector3?n.copy(i):this[e]="overdraw"==e?Number(i):i}}},toJSON:function(){var t={metadata:{version:4.2,type:"material",generator:"MaterialExporter"},uuid:this.uuid,type:this.type};return""!==this.name&&(t.name=this.name),this instanceof THREE.MeshBasicMaterial?(t.color=this.color.getHex(),this.vertexColors!==THREE.NoColors&&(t.vertexColors=this.vertexColors),this.blending!==THREE.NormalBlending&&(t.blending=this.blending),this.side!==THREE.FrontSide&&(t.side=this.side)):this instanceof THREE.MeshLambertMaterial?(t.color=this.color.getHex(),t.ambient=this.ambient.getHex(),t.emissive=this.emissive.getHex(),this.vertexColors!==THREE.NoColors&&(t.vertexColors=this.vertexColors),this.blending!==THREE.NormalBlending&&(t.blending=this.blending),this.side!==THREE.FrontSide&&(t.side=this.side)):this instanceof THREE.MeshPhongMaterial?(t.color=this.color.getHex(),t.ambient=this.ambient.getHex(),t.emissive=this.emissive.getHex(),t.specular=this.specular.getHex(),t.shininess=this.shininess,this.vertexColors!==THREE.NoColors&&(t.vertexColors=this.vertexColors),this.blending!==THREE.NormalBlending&&(t.blending=this.blending),this.side!==THREE.FrontSide&&(t.side=this.side)):this instanceof THREE.MeshNormalMaterial?(this.shading!==THREE.FlatShading&&(t.shading=this.shading),this.blending!==THREE.NormalBlending&&(t.blending=this.blending),this.side!==THREE.FrontSide&&(t.side=this.side)):this instanceof THREE.MeshDepthMaterial?(this.blending!==THREE.NormalBlending&&(t.blending=this.blending),this.side!==THREE.FrontSide&&(t.side=this.side)):this instanceof THREE.ShaderMaterial?(t.uniforms=this.uniforms,t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader):this instanceof THREE.SpriteMaterial&&(t.color=this.color.getHex()),1>this.opacity&&(t.opacity=this.opacity),!1!==this.transparent&&(t.transparent=this.transparent),!1!==this.wireframe&&(t.wireframe=this.wireframe),t},clone:function(t){return void 0===t&&(t=new THREE.Material),t.name=this.name,t.side=this.side,t.opacity=this.opacity,t.transparent=this.transparent,t.blending=this.blending,t.blendSrc=this.blendSrc,t.blendDst=this.blendDst,t.blendEquation=this.blendEquation,t.depthTest=this.depthTest,t.depthWrite=this.depthWrite,t.polygonOffset=this.polygonOffset,t.polygonOffsetFactor=this.polygonOffsetFactor,t.polygonOffsetUnits=this.polygonOffsetUnits,t.alphaTest=this.alphaTest,t.overdraw=this.overdraw,t.visible=this.visible,t},dispose:function(){this.dispatchEvent({type:"dispose"})}},THREE.EventDispatcher.prototype.apply(THREE.Material.prototype),THREE.MaterialIdCount=0,THREE.LineBasicMaterial=function(t){THREE.Material.call(this),this.type="LineBasicMaterial",this.color=new THREE.Color(16777215),this.linewidth=1,this.linejoin=this.linecap="round",this.vertexColors=THREE.NoColors,this.fog=!0,this.setValues(t)},THREE.LineBasicMaterial.prototype=Object.create(THREE.Material.prototype),THREE.LineBasicMaterial.prototype.clone=function(){var t=new THREE.LineBasicMaterial;return THREE.Material.prototype.clone.call(this,t),t.color.copy(this.color),t.linewidth=this.linewidth,t.linecap=this.linecap,t.linejoin=this.linejoin,t.vertexColors=this.vertexColors,t.fog=this.fog,t},THREE.LineDashedMaterial=function(t){THREE.Material.call(this),this.type="LineDashedMaterial",this.color=new THREE.Color(16777215),this.scale=this.linewidth=1,this.dashSize=3,this.gapSize=1,this.vertexColors=!1,this.fog=!0,this.setValues(t)},THREE.LineDashedMaterial.prototype=Object.create(THREE.Material.prototype),THREE.LineDashedMaterial.prototype.clone=function(){var t=new THREE.LineDashedMaterial;return THREE.Material.prototype.clone.call(this,t),t.color.copy(this.color),t.linewidth=this.linewidth,t.scale=this.scale,t.dashSize=this.dashSize,t.gapSize=this.gapSize,t.vertexColors=this.vertexColors,t.fog=this.fog,t},THREE.MeshBasicMaterial=function(t){THREE.Material.call(this),this.type="MeshBasicMaterial",this.color=new THREE.Color(16777215),this.envMap=this.alphaMap=this.specularMap=this.lightMap=this.map=null,this.combine=THREE.MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.shading=THREE.SmoothShading,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.vertexColors=THREE.NoColors,this.morphTargets=this.skinning=!1,this.setValues(t)},THREE.MeshBasicMaterial.prototype=Object.create(THREE.Material.prototype),THREE.MeshBasicMaterial.prototype.clone=function(){var t=new THREE.MeshBasicMaterial;return THREE.Material.prototype.clone.call(this,t),t.color.copy(this.color),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.alphaMap=this.alphaMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.wireframe=this.wireframe,t.wireframeLinewidth=this.wireframeLinewidth,t.wireframeLinecap=this.wireframeLinecap,t.wireframeLinejoin=this.wireframeLinejoin,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t
  27. },THREE.MeshLambertMaterial=function(t){THREE.Material.call(this),this.type="MeshLambertMaterial",this.color=new THREE.Color(16777215),this.ambient=new THREE.Color(16777215),this.emissive=new THREE.Color(0),this.wrapAround=!1,this.wrapRGB=new THREE.Vector3(1,1,1),this.envMap=this.alphaMap=this.specularMap=this.lightMap=this.map=null,this.combine=THREE.MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.shading=THREE.SmoothShading,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.vertexColors=THREE.NoColors,this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)},THREE.MeshLambertMaterial.prototype=Object.create(THREE.Material.prototype),THREE.MeshLambertMaterial.prototype.clone=function(){var t=new THREE.MeshLambertMaterial;return THREE.Material.prototype.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.specularMap=this.specularMap,t.alphaMap=this.alphaMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.wireframe=this.wireframe,t.wireframeLinewidth=this.wireframeLinewidth,t.wireframeLinecap=this.wireframeLinecap,t.wireframeLinejoin=this.wireframeLinejoin,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t},THREE.MeshPhongMaterial=function(t){THREE.Material.call(this),this.type="MeshPhongMaterial",this.color=new THREE.Color(16777215),this.ambient=new THREE.Color(16777215),this.emissive=new THREE.Color(0),this.specular=new THREE.Color(1118481),this.shininess=30,this.wrapAround=this.metal=!1,this.wrapRGB=new THREE.Vector3(1,1,1),this.bumpMap=this.lightMap=this.map=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new THREE.Vector2(1,1),this.envMap=this.alphaMap=this.specularMap=null,this.combine=THREE.MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.shading=THREE.SmoothShading,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinejoin=this.wireframeLinecap="round",this.vertexColors=THREE.NoColors,this.morphNormals=this.morphTargets=this.skinning=!1,this.setValues(t)},THREE.MeshPhongMaterial.prototype=Object.create(THREE.Material.prototype),THREE.MeshPhongMaterial.prototype.clone=function(){var t=new THREE.MeshPhongMaterial;return THREE.Material.prototype.clone.call(this,t),t.color.copy(this.color),t.ambient.copy(this.ambient),t.emissive.copy(this.emissive),t.specular.copy(this.specular),t.shininess=this.shininess,t.metal=this.metal,t.wrapAround=this.wrapAround,t.wrapRGB.copy(this.wrapRGB),t.map=this.map,t.lightMap=this.lightMap,t.bumpMap=this.bumpMap,t.bumpScale=this.bumpScale,t.normalMap=this.normalMap,t.normalScale.copy(this.normalScale),t.specularMap=this.specularMap,t.alphaMap=this.alphaMap,t.envMap=this.envMap,t.combine=this.combine,t.reflectivity=this.reflectivity,t.refractionRatio=this.refractionRatio,t.fog=this.fog,t.shading=this.shading,t.wireframe=this.wireframe,t.wireframeLinewidth=this.wireframeLinewidth,t.wireframeLinecap=this.wireframeLinecap,t.wireframeLinejoin=this.wireframeLinejoin,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t},THREE.MeshDepthMaterial=function(t){THREE.Material.call(this),this.type="MeshDepthMaterial",this.wireframe=this.morphTargets=!1,this.wireframeLinewidth=1,this.setValues(t)},THREE.MeshDepthMaterial.prototype=Object.create(THREE.Material.prototype),THREE.MeshDepthMaterial.prototype.clone=function(){var t=new THREE.MeshDepthMaterial;return THREE.Material.prototype.clone.call(this,t),t.wireframe=this.wireframe,t.wireframeLinewidth=this.wireframeLinewidth,t},THREE.MeshNormalMaterial=function(t){THREE.Material.call(this,t),this.type="MeshNormalMaterial",this.shading=THREE.FlatShading,this.wireframe=!1,this.wireframeLinewidth=1,this.morphTargets=!1,this.setValues(t)},THREE.MeshNormalMaterial.prototype=Object.create(THREE.Material.prototype),THREE.MeshNormalMaterial.prototype.clone=function(){var t=new THREE.MeshNormalMaterial;return THREE.Material.prototype.clone.call(this,t),t.shading=this.shading,t.wireframe=this.wireframe,t.wireframeLinewidth=this.wireframeLinewidth,t},THREE.MeshFaceMaterial=function(t){this.uuid=THREE.Math.generateUUID(),this.type="MeshFaceMaterial",this.materials=t instanceof Array?t:[]},THREE.MeshFaceMaterial.prototype={constructor:THREE.MeshFaceMaterial,toJSON:function(){for(var t={metadata:{version:4.2,type:"material",generator:"MaterialExporter"},uuid:this.uuid,type:this.type,materials:[]},e=0,i=this.materials.length;i>e;e++)t.materials.push(this.materials[e].toJSON());return t},clone:function(){for(var t=new THREE.MeshFaceMaterial,e=0;e<this.materials.length;e++)t.materials.push(this.materials[e].clone());return t}},THREE.PointCloudMaterial=function(t){THREE.Material.call(this),this.type="PointCloudMaterial",this.color=new THREE.Color(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.vertexColors=THREE.NoColors,this.fog=!0,this.setValues(t)},THREE.PointCloudMaterial.prototype=Object.create(THREE.Material.prototype),THREE.PointCloudMaterial.prototype.clone=function(){var t=new THREE.PointCloudMaterial;return THREE.Material.prototype.clone.call(this,t),t.color.copy(this.color),t.map=this.map,t.size=this.size,t.sizeAttenuation=this.sizeAttenuation,t.vertexColors=this.vertexColors,t.fog=this.fog,t},THREE.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointCloudMaterial."),new THREE.PointCloudMaterial(t)},THREE.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointCloudMaterial."),new THREE.PointCloudMaterial(t)},THREE.ShaderMaterial=function(t){THREE.Material.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.attributes=null,this.vertexShader="void main() {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.shading=THREE.SmoothShading,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.lights=this.fog=!1,this.vertexColors=THREE.NoColors,this.morphNormals=this.morphTargets=this.skinning=!1,this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.setValues(t)},THREE.ShaderMaterial.prototype=Object.create(THREE.Material.prototype),THREE.ShaderMaterial.prototype.clone=function(){var t=new THREE.ShaderMaterial;return THREE.Material.prototype.clone.call(this,t),t.fragmentShader=this.fragmentShader,t.vertexShader=this.vertexShader,t.uniforms=THREE.UniformsUtils.clone(this.uniforms),t.attributes=this.attributes,t.defines=this.defines,t.shading=this.shading,t.wireframe=this.wireframe,t.wireframeLinewidth=this.wireframeLinewidth,t.fog=this.fog,t.lights=this.lights,t.vertexColors=this.vertexColors,t.skinning=this.skinning,t.morphTargets=this.morphTargets,t.morphNormals=this.morphNormals,t},THREE.RawShaderMaterial=function(t){THREE.ShaderMaterial.call(this,t),this.type="RawShaderMaterial"},THREE.RawShaderMaterial.prototype=Object.create(THREE.ShaderMaterial.prototype),THREE.RawShaderMaterial.prototype.clone=function(){var t=new THREE.RawShaderMaterial;return THREE.ShaderMaterial.prototype.clone.call(this,t),t},THREE.SpriteMaterial=function(t){THREE.Material.call(this),this.type="SpriteMaterial",this.color=new THREE.Color(16777215),this.map=null,this.rotation=0,this.fog=!1,this.setValues(t)},THREE.SpriteMaterial.prototype=Object.create(THREE.Material.prototype),THREE.SpriteMaterial.prototype.clone=function(){var t=new THREE.SpriteMaterial;return THREE.Material.prototype.clone.call(this,t),t.color.copy(this.color),t.map=this.map,t.rotation=this.rotation,t.fog=this.fog,t},THREE.Texture=function(t,e,i,n,r,o,s,a,l){Object.defineProperty(this,"id",{value:THREE.TextureIdCount++}),this.uuid=THREE.Math.generateUUID(),this.name="",this.image=void 0!==t?t:THREE.Texture.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:THREE.Texture.DEFAULT_MAPPING,this.wrapS=void 0!==i?i:THREE.ClampToEdgeWrapping,this.wrapT=void 0!==n?n:THREE.ClampToEdgeWrapping,this.magFilter=void 0!==r?r:THREE.LinearFilter,this.minFilter=void 0!==o?o:THREE.LinearMipMapLinearFilter,this.anisotropy=void 0!==l?l:1,this.format=void 0!==s?s:THREE.RGBAFormat,this.type=void 0!==a?a:THREE.UnsignedByteType,this.offset=new THREE.Vector2(0,0),this.repeat=new THREE.Vector2(1,1),this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this._needsUpdate=!1,this.onUpdate=null},THREE.Texture.DEFAULT_IMAGE=void 0,THREE.Texture.DEFAULT_MAPPING=new THREE.UVMapping,THREE.Texture.prototype={constructor:THREE.Texture,get needsUpdate(){return this._needsUpdate},set needsUpdate(t){!0===t&&this.update(),this._needsUpdate=t},clone:function(t){return void 0===t&&(t=new THREE.Texture),t.image=this.image,t.mipmaps=this.mipmaps.slice(0),t.mapping=this.mapping,t.wrapS=this.wrapS,t.wrapT=this.wrapT,t.magFilter=this.magFilter,t.minFilter=this.minFilter,t.anisotropy=this.anisotropy,t.format=this.format,t.type=this.type,t.offset.copy(this.offset),t.repeat.copy(this.repeat),t.generateMipmaps=this.generateMipmaps,t.premultiplyAlpha=this.premultiplyAlpha,t.flipY=this.flipY,t.unpackAlignment=this.unpackAlignment,t},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}},THREE.EventDispatcher.prototype.apply(THREE.Texture.prototype),THREE.TextureIdCount=0,THREE.CubeTexture=function(t,e,i,n,r,o,s,a,l){THREE.Texture.call(this,t,e,i,n,r,o,s,a,l),this.images=t},THREE.CubeTexture.prototype=Object.create(THREE.Texture.prototype),THREE.CubeTexture.clone=function(t){return void 0===t&&(t=new THREE.CubeTexture),THREE.Texture.prototype.clone.call(this,t),t.images=this.images,t},THREE.CompressedTexture=function(t,e,i,n,r,o,s,a,l,h,c){THREE.Texture.call(this,null,o,s,a,l,h,n,r,c),this.image={width:e,height:i},this.mipmaps=t,this.generateMipmaps=this.flipY=!1},THREE.CompressedTexture.prototype=Object.create(THREE.Texture.prototype),THREE.CompressedTexture.prototype.clone=function(){var t=new THREE.CompressedTexture;return THREE.Texture.prototype.clone.call(this,t),t},THREE.DataTexture=function(t,e,i,n,r,o,s,a,l,h,c){THREE.Texture.call(this,null,o,s,a,l,h,n,r,c),this.image={data:t,width:e,height:i}},THREE.DataTexture.prototype=Object.create(THREE.Texture.prototype),THREE.DataTexture.prototype.clone=function(){var t=new THREE.DataTexture;return THREE.Texture.prototype.clone.call(this,t),t},THREE.VideoTexture=function(t,e,i,n,r,o,s,a,l){THREE.Texture.call(this,t,e,i,n,r,o,s,a,l),this.generateMipmaps=!1;var h=this,c=function(){requestAnimationFrame(c),t.readyState===t.HAVE_ENOUGH_DATA&&(h.needsUpdate=!0)};c()},THREE.VideoTexture.prototype=Object.create(THREE.Texture.prototype),THREE.Group=function(){THREE.Object3D.call(this),this.type="Group"},THREE.Group.prototype=Object.create(THREE.Object3D.prototype),THREE.PointCloud=function(t,e){THREE.Object3D.call(this),this.type="PointCloud",this.geometry=void 0!==t?t:new THREE.Geometry,this.material=void 0!==e?e:new THREE.PointCloudMaterial({color:16777215*Math.random()}),this.sortParticles=!1},THREE.PointCloud.prototype=Object.create(THREE.Object3D.prototype),THREE.PointCloud.prototype.raycast=function(){var t=new THREE.Matrix4,e=new THREE.Ray;return function(i,n){var r=this,o=r.geometry,s=i.params.PointCloud.threshold;if(t.getInverse(this.matrixWorld),e.copy(i.ray).applyMatrix4(t),null===o.boundingBox||!1!==e.isIntersectionBox(o.boundingBox)){var a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=new THREE.Vector3,s=function(t,o){var s=e.distanceToPoint(t);if(a>s){var l=e.closestPointToPoint(t);l.applyMatrix4(r.matrixWorld);var h=i.ray.origin.distanceTo(l);n.push({distance:h,distanceToRay:s,point:l.clone(),index:o,face:null,object:r})}};if(o instanceof THREE.BufferGeometry){var h=o.attributes,c=h.position.array;if(void 0!==h.index){var h=h.index.array,u=o.offsets;0===u.length&&(u=[{start:0,count:h.length,index:0}]);for(var d=0,p=u.length;p>d;++d)for(var f=u[d].start,m=u[d].index,o=f,f=f+u[d].count;f>o;o++){var g=m+h[o];l.fromArray(c,3*g),s(l,g)}}else for(h=c.length/3,o=0;h>o;o++)l.set(c[3*o],c[3*o+1],c[3*o+2]),s(l,o)}else for(l=this.geometry.vertices,o=0;o<l.length;o++)s(l[o],o)}}}(),THREE.PointCloud.prototype.clone=function(t){return void 0===t&&(t=new THREE.PointCloud(this.geometry,this.material)),t.sortParticles=this.sortParticles,THREE.Object3D.prototype.clone.call(this,t),t},THREE.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.PointCloud."),new THREE.PointCloud(t,e)},THREE.Line=function(t,e,i){THREE.Object3D.call(this),this.type="Line",this.geometry=void 0!==t?t:new THREE.Geometry,this.material=void 0!==e?e:new THREE.LineBasicMaterial({color:16777215*Math.random()}),this.mode=void 0!==i?i:THREE.LineStrip},THREE.LineStrip=0,THREE.LinePieces=1,THREE.Line.prototype=Object.create(THREE.Object3D.prototype),THREE.Line.prototype.raycast=function(){var t=new THREE.Matrix4,e=new THREE.Ray,i=new THREE.Sphere;return function(n,r){var o=n.linePrecision,o=o*o,s=this.geometry;if(null===s.boundingSphere&&s.computeBoundingSphere(),i.copy(s.boundingSphere),i.applyMatrix4(this.matrixWorld),!1!==n.ray.isIntersectionSphere(i)&&(t.getInverse(this.matrixWorld),e.copy(n.ray).applyMatrix4(t),s instanceof THREE.Geometry))for(var s=s.vertices,a=s.length,l=new THREE.Vector3,h=new THREE.Vector3,c=this.mode===THREE.LineStrip?1:2,u=0;a-1>u;u+=c)if(!(e.distanceSqToSegment(s[u],s[u+1],h,l)>o)){var d=e.origin.distanceTo(h);d<n.near||d>n.far||r.push({distance:d,point:l.clone().applyMatrix4(this.matrixWorld),face:null,faceIndex:null,object:this})}}}(),THREE.Line.prototype.clone=function(t){return void 0===t&&(t=new THREE.Line(this.geometry,this.material,this.mode)),THREE.Object3D.prototype.clone.call(this,t),t},THREE.Mesh=function(t,e){THREE.Object3D.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new THREE.Geometry,this.material=void 0!==e?e:new THREE.MeshBasicMaterial({color:16777215*Math.random()}),this.updateMorphTargets()},THREE.Mesh.prototype=Object.create(THREE.Object3D.prototype),THREE.Mesh.prototype.updateMorphTargets=function(){if(void 0!==this.geometry.morphTargets&&0<this.geometry.morphTargets.length){this.morphTargetBase=-1,this.morphTargetForcedOrder=[],this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var t=0,e=this.geometry.morphTargets.length;e>t;t++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[t].name]=t}},THREE.Mesh.prototype.getMorphTargetIndexByName=function(t){return void 0!==this.morphTargetDictionary[t]?this.morphTargetDictionary[t]:(console.log("THREE.Mesh.getMorphTargetIndexByName: morph target "+t+" does not exist. Returning 0."),0)},THREE.Mesh.prototype.raycast=function(){var t=new THREE.Matrix4,e=new THREE.Ray,i=new THREE.Sphere,n=new THREE.Vector3,r=new THREE.Vector3,o=new THREE.Vector3;return function(s,a){var l=this.geometry;if(null===l.boundingSphere&&l.computeBoundingSphere(),i.copy(l.boundingSphere),i.applyMatrix4(this.matrixWorld),!1!==s.ray.isIntersectionSphere(i)&&(t.getInverse(this.matrixWorld),e.copy(s.ray).applyMatrix4(t),null===l.boundingBox||!1!==e.isIntersectionBox(l.boundingBox)))if(l instanceof THREE.BufferGeometry){var h=this.material;if(void 0!==h){var c,u,d=l.attributes,p=s.precision;if(void 0!==d.index){var f=d.index.array,m=d.position.array,g=l.offsets;0===g.length&&(g=[{start:0,count:f.length,index:0}]);for(var v=0,y=g.length;y>v;++v)for(var d=g[v].start,E=g[v].index,l=d,b=d+g[v].count;b>l;l+=3){d=E+f[l],c=E+f[l+1],u=E+f[l+2],n.fromArray(m,3*d),r.fromArray(m,3*c),o.fromArray(m,3*u);var _=h.side===THREE.BackSide?e.intersectTriangle(o,r,n,!0):e.intersectTriangle(n,r,o,h.side!==THREE.DoubleSide);if(null!==_){_.applyMatrix4(this.matrixWorld);var T=s.ray.origin.distanceTo(_);p>T||T<s.near||T>s.far||a.push({distance:T,point:_,face:new THREE.Face3(d,c,u,THREE.Triangle.normal(n,r,o)),faceIndex:null,object:this})}}}else for(m=d.position.array,f=l=0,b=m.length;b>l;l+=3,f+=9)d=l,c=l+1,u=l+2,n.fromArray(m,f),r.fromArray(m,f+3),o.fromArray(m,f+6),_=h.side===THREE.BackSide?e.intersectTriangle(o,r,n,!0):e.intersectTriangle(n,r,o,h.side!==THREE.DoubleSide),null!==_&&(_.applyMatrix4(this.matrixWorld),T=s.ray.origin.distanceTo(_),p>T||T<s.near||T>s.far||a.push({distance:T,point:_,face:new THREE.Face3(d,c,u,THREE.Triangle.normal(n,r,o)),faceIndex:null,object:this}))}}else if(l instanceof THREE.Geometry)for(f=this.material instanceof THREE.MeshFaceMaterial,m=!0===f?this.material.materials:null,p=s.precision,g=l.vertices,v=0,y=l.faces.length;y>v;v++)if(E=l.faces[v],h=!0===f?m[E.materialIndex]:this.material,void 0!==h){if(d=g[E.a],c=g[E.b],u=g[E.c],!0===h.morphTargets){_=l.morphTargets,T=this.morphTargetInfluences,n.set(0,0,0),r.set(0,0,0),o.set(0,0,0);for(var b=0,x=_.length;x>b;b++){var w=T[b];if(0!==w){var R=_[b].vertices;n.x+=(R[E.a].x-d.x)*w,n.y+=(R[E.a].y-d.y)*w,n.z+=(R[E.a].z-d.z)*w,r.x+=(R[E.b].x-c.x)*w,r.y+=(R[E.b].y-c.y)*w,r.z+=(R[E.b].z-c.z)*w,o.x+=(R[E.c].x-u.x)*w,o.y+=(R[E.c].y-u.y)*w,o.z+=(R[E.c].z-u.z)*w}}n.add(d),r.add(c),o.add(u),d=n,c=r,u=o}_=h.side===THREE.BackSide?e.intersectTriangle(u,c,d,!0):e.intersectTriangle(d,c,u,h.side!==THREE.DoubleSide),null!==_&&(_.applyMatrix4(this.matrixWorld),T=s.ray.origin.distanceTo(_),p>T||T<s.near||T>s.far||a.push({distance:T,point:_,face:E,faceIndex:v,object:this}))}}}(),THREE.Mesh.prototype.clone=function(t,e){return void 0===t&&(t=new THREE.Mesh(this.geometry,this.material)),THREE.Object3D.prototype.clone.call(this,t,e),t},THREE.Bone=function(t){THREE.Object3D.call(this),this.skin=t},THREE.Bone.prototype=Object.create(THREE.Object3D.prototype),THREE.Skeleton=function(t,e,i){if(this.useVertexTexture=void 0!==i?i:!0,this.identityMatrix=new THREE.Matrix4,t=t||[],this.bones=t.slice(0),this.useVertexTexture?(this.boneTextureHeight=this.boneTextureWidth=t=256<this.bones.length?64:64<this.bones.length?32:16<this.bones.length?16:8,this.boneMatrices=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new THREE.DataTexture(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,THREE.RGBAFormat,THREE.FloatType),this.boneTexture.minFilter=THREE.NearestFilter,this.boneTexture.magFilter=THREE.NearestFilter,this.boneTexture.generateMipmaps=!1,this.boneTexture.flipY=!1):this.boneMatrices=new Float32Array(16*this.bones.length),void 0===e)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else for(console.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[],e=0,t=this.bones.length;t>e;e++)this.boneInverses.push(new THREE.Matrix4)},THREE.Skeleton.prototype.calculateInverses=function(){this.boneInverses=[];for(var t=0,e=this.bones.length;e>t;t++){var i=new THREE.Matrix4;this.bones[t]&&i.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(i)}},THREE.Skeleton.prototype.pose=function(){for(var t,e=0,i=this.bones.length;i>e;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,i=this.bones.length;i>e;e++)(t=this.bones[e])&&(t.parent?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},THREE.Skeleton.prototype.update=function(){var t=new THREE.Matrix4;return function(){for(var e=0,i=this.bones.length;i>e;e++)t.multiplyMatrices(this.bones[e]?this.bones[e].matrixWorld:this.identityMatrix,this.boneInverses[e]),t.flattenToArrayOffset(this.boneMatrices,16*e);this.useVertexTexture&&(this.boneTexture.needsUpdate=!0)}}(),THREE.SkinnedMesh=function(t,e,i){if(THREE.Mesh.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new THREE.Matrix4,this.bindMatrixInverse=new THREE.Matrix4,t=[],this.geometry&&void 0!==this.geometry.bones){for(var n,r,o,s,a=0,l=this.geometry.bones.length;l>a;++a)n=this.geometry.bones[a],r=n.pos,o=n.rotq,s=n.scl,e=new THREE.Bone(this),t.push(e),e.name=n.name,e.position.set(r[0],r[1],r[2]),e.quaternion.set(o[0],o[1],o[2],o[3]),void 0!==s?e.scale.set(s[0],s[1],s[2]):e.scale.set(1,1,1);for(a=0,l=this.geometry.bones.length;l>a;++a)n=this.geometry.bones[a],-1!==n.parent?t[n.parent].add(t[a]):this.add(t[a])}this.normalizeSkinWeights(),this.updateMatrixWorld(!0),this.bind(new THREE.Skeleton(t,void 0,i))},THREE.SkinnedMesh.prototype=Object.create(THREE.Mesh.prototype),THREE.SkinnedMesh.prototype.bind=function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},THREE.SkinnedMesh.prototype.pose=function(){this.skeleton.pose()},THREE.SkinnedMesh.prototype.normalizeSkinWeights=function(){if(this.geometry instanceof THREE.Geometry)for(var t=0;t<this.geometry.skinIndices.length;t++){var e=this.geometry.skinWeights[t],i=1/e.lengthManhattan();1/0!==i?e.multiplyScalar(i):e.set(1)}},THREE.SkinnedMesh.prototype.updateMatrixWorld=function(){THREE.Mesh.prototype.updateMatrixWorld.call(this,!0),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh unreckognized bindMode: "+this.bindMode)},THREE.SkinnedMesh.prototype.clone=function(t){return void 0===t&&(t=new THREE.SkinnedMesh(this.geometry,this.material,this.useVertexTexture)),THREE.Mesh.prototype.clone.call(this,t),t},THREE.MorphAnimMesh=function(t,e){THREE.Mesh.call(this,t,e),this.type="MorphAnimMesh",this.duration=1e3,this.mirroredLoop=!1,this.currentKeyframe=this.lastKeyframe=this.time=0,this.direction=1,this.directionBackwards=!1,this.setFrameRange(0,this.geometry.morphTargets.length-1)},THREE.MorphAnimMesh.prototype=Object.create(THREE.Mesh.prototype),THREE.MorphAnimMesh.prototype.setFrameRange=function(t,e){this.startKeyframe=t,this.endKeyframe=e,this.length=this.endKeyframe-this.startKeyframe+1},THREE.MorphAnimMesh.prototype.setDirectionForward=function(){this.direction=1,this.directionBackwards=!1},THREE.MorphAnimMesh.prototype.setDirectionBackward=function(){this.direction=-1,this.directionBackwards=!0},THREE.MorphAnimMesh.prototype.parseAnimations=function(){var t=this.geometry;t.animations||(t.animations={});for(var e,i=t.animations,n=/([a-z]+)_?(\d+)/,r=0,o=t.morphTargets.length;o>r;r++){var s=t.morphTargets[r].name.match(n);if(s&&1<s.length){s=s[1],i[s]||(i[s]={start:1/0,end:-1/0});var a=i[s];r<a.start&&(a.start=r),r>a.end&&(a.end=r),e||(e=s)}}t.firstAnimation=e},THREE.MorphAnimMesh.prototype.setAnimationLabel=function(t,e,i){this.geometry.animations||(this.geometry.animations={}),this.geometry.animations[t]={start:e,end:i}},THREE.MorphAnimMesh.prototype.playAnimation=function(t,e){var i=this.geometry.animations[t];i?(this.setFrameRange(i.start,i.end),this.duration=(i.end-i.start)/e*1e3,this.time=0):console.warn("animation["+t+"] undefined")},THREE.MorphAnimMesh.prototype.updateAnimation=function(t){var e=this.duration/this.length;this.time+=this.direction*t,this.mirroredLoop?(this.time>this.duration||0>this.time)&&(this.direction*=-1,this.time>this.duration&&(this.time=this.duration,this.directionBackwards=!0),0>this.time&&(this.time=0,this.directionBackwards=!1)):(this.time%=this.duration,0>this.time&&(this.time+=this.duration)),t=this.startKeyframe+THREE.Math.clamp(Math.floor(this.time/e),0,this.length-1),t!==this.currentKeyframe&&(this.morphTargetInfluences[this.lastKeyframe]=0,this.morphTargetInfluences[this.currentKeyframe]=1,this.morphTargetInfluences[t]=0,this.lastKeyframe=this.currentKeyframe,this.currentKeyframe=t),e=this.time%e/e,this.directionBackwards&&(e=1-e),this.morphTargetInfluences[this.currentKeyframe]=e,this.morphTargetInfluences[this.lastKeyframe]=1-e},THREE.MorphAnimMesh.prototype.interpolateTargets=function(t,e,i){for(var n=this.morphTargetInfluences,r=0,o=n.length;o>r;r++)n[r]=0;t>-1&&(n[t]=1-i),e>-1&&(n[e]=i)},THREE.MorphAnimMesh.prototype.clone=function(t){return void 0===t&&(t=new THREE.MorphAnimMesh(this.geometry,this.material)),t.duration=this.duration,t.mirroredLoop=this.mirroredLoop,t.time=this.time,t.lastKeyframe=this.lastKeyframe,t.currentKeyframe=this.currentKeyframe,t.direction=this.direction,t.directionBackwards=this.directionBackwards,THREE.Mesh.prototype.clone.call(this,t),t},THREE.LOD=function(){THREE.Object3D.call(this),this.objects=[]},THREE.LOD.prototype=Object.create(THREE.Object3D.prototype),THREE.LOD.prototype.addLevel=function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var i=0;i<this.objects.length&&!(e<this.objects[i].distance);i++);this.objects.splice(i,0,{distance:e,object:t}),this.add(t)},THREE.LOD.prototype.getObjectForDistance=function(t){for(var e=1,i=this.objects.length;i>e&&!(t<this.objects[e].distance);e++);return this.objects[e-1].object},THREE.LOD.prototype.raycast=function(){var t=new THREE.Vector3;return function(e,i){t.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(t);this.getObjectForDistance(n).raycast(e,i)}}(),THREE.LOD.prototype.update=function(){var t=new THREE.Vector3,e=new THREE.Vector3;return function(i){if(1<this.objects.length){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld),i=t.distanceTo(e),this.objects[0].object.visible=!0;for(var n=1,r=this.objects.length;r>n&&i>=this.objects[n].distance;n++)this.objects[n-1].object.visible=!1,this.objects[n].object.visible=!0;for(;r>n;n++)this.objects[n].object.visible=!1}}}(),THREE.LOD.prototype.clone=function(t){void 0===t&&(t=new THREE.LOD),THREE.Object3D.prototype.clone.call(this,t);for(var e=0,i=this.objects.length;i>e;e++){var n=this.objects[e].object.clone();n.visible=0===e,t.addLevel(n,this.objects[e].distance)}return t},THREE.Sprite=function(){var t=new Uint16Array([0,1,2,0,2,3]),e=new Float32Array([-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0]),i=new Float32Array([0,0,1,0,1,1,0,1]),n=new THREE.BufferGeometry;return n.addAttribute("index",new THREE.BufferAttribute(t,1)),n.addAttribute("position",new THREE.BufferAttribute(e,3)),n.addAttribute("uv",new THREE.BufferAttribute(i,2)),function(t){THREE.Object3D.call(this),this.type="Sprite",this.geometry=n,this.material=void 0!==t?t:new THREE.SpriteMaterial}}(),THREE.Sprite.prototype=Object.create(THREE.Object3D.prototype),THREE.Sprite.prototype.raycast=function(){var t=new THREE.Vector3;return function(e,i){t.setFromMatrixPosition(this.matrixWorld);var n=e.ray.distanceToPoint(t);n>this.scale.x||i.push({distance:n,point:this.position,face:null,object:this})}}(),THREE.Sprite.prototype.clone=function(t){return void 0===t&&(t=new THREE.Sprite(this.material)),THREE.Object3D.prototype.clone.call(this,t),t},THREE.Particle=THREE.Sprite,THREE.LensFlare=function(t,e,i,n,r){THREE.Object3D.call(this),this.lensFlares=[],this.positionScreen=new THREE.Vector3,this.customUpdateCallback=void 0,void 0!==t&&this.add(t,e,i,n,r)},THREE.LensFlare.prototype=Object.create(THREE.Object3D.prototype),THREE.LensFlare.prototype.add=function(t,e,i,n,r,o){void 0===e&&(e=-1),void 0===i&&(i=0),void 0===o&&(o=1),void 0===r&&(r=new THREE.Color(16777215)),void 0===n&&(n=THREE.NormalBlending),i=Math.min(i,Math.max(0,i)),this.lensFlares.push({texture:t,size:e,distance:i,x:0,y:0,z:0,scale:1,rotation:1,opacity:o,color:r,blending:n})},THREE.LensFlare.prototype.updateLensFlares=function(){var t,e,i=this.lensFlares.length,n=2*-this.positionScreen.x,r=2*-this.positionScreen.y;for(t=0;i>t;t++)e=this.lensFlares[t],e.x=this.positionScreen.x+n*e.distance,e.y=this.positionScreen.y+r*e.distance,e.wantedRotation=e.x*Math.PI*.25,e.rotation+=.25*(e.wantedRotation-e.rotation)},THREE.Scene=function(){THREE.Object3D.call(this),this.type="Scene",this.overrideMaterial=this.fog=null,this.autoUpdate=!0},THREE.Scene.prototype=Object.create(THREE.Object3D.prototype),THREE.Scene.prototype.clone=function(t){return void 0===t&&(t=new THREE.Scene),THREE.Object3D.prototype.clone.call(this,t),null!==this.fog&&(t.fog=this.fog.clone()),null!==this.overrideMaterial&&(t.overrideMaterial=this.overrideMaterial.clone()),t.autoUpdate=this.autoUpdate,t.matrixAutoUpdate=this.matrixAutoUpdate,t},THREE.Fog=function(t,e,i){this.name="",this.color=new THREE.Color(t),this.near=void 0!==e?e:1,this.far=void 0!==i?i:1e3},THREE.Fog.prototype.clone=function(){return new THREE.Fog(this.color.getHex(),this.near,this.far)},THREE.FogExp2=function(t,e){this.name="",this.color=new THREE.Color(t),this.density=void 0!==e?e:25e-5},THREE.FogExp2.prototype.clone=function(){return new THREE.FogExp2(this.color.getHex(),this.density)},THREE.ShaderChunk={},THREE.ShaderChunk.alphatest_fragment="#ifdef ALPHATEST\n\n if ( gl_FragColor.a < ALPHATEST ) discard;\n\n#endif\n",THREE.ShaderChunk.lights_lambert_vertex="vLightFront = vec3( 0.0 );\n\n#ifdef DOUBLE_SIDED\n\n vLightBack = vec3( 0.0 );\n\n#endif\n\ntransformedNormal = normalize( transformedNormal );\n\n#if MAX_DIR_LIGHTS > 0\n\nfor( int i = 0; i < MAX_DIR_LIGHTS; i ++ ) {\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ i ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n\n float dotProduct = dot( transformedNormal, dirVector );\n vec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n #ifdef DOUBLE_SIDED\n\n vec3 directionalLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n\n #ifdef WRAP_AROUND\n\n vec3 directionalLightWeightingHalfBack = vec3( max( -0.5 * dotProduct + 0.5, 0.0 ) );\n\n #endif\n\n #endif\n\n #ifdef WRAP_AROUND\n\n vec3 directionalLightWeightingHalf = vec3( max( 0.5 * dotProduct + 0.5, 0.0 ) );\n directionalLightWeighting = mix( directionalLightWeighting, directionalLightWeightingHalf, wrapRGB );\n\n #ifdef DOUBLE_SIDED\n\n directionalLightWeightingBack = mix( directionalLightWeightingBack, directionalLightWeightingHalfBack, wrapRGB );\n\n #endif\n\n #endif\n\n vLightFront += directionalLightColor[ i ] * directionalLightWeighting;\n\n #ifdef DOUBLE_SIDED\n\n vLightBack += directionalLightColor[ i ] * directionalLightWeightingBack;\n\n #endif\n\n}\n\n#endif\n\n#if MAX_POINT_LIGHTS > 0\n\n for( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {\n\n vec4 lPosition = viewMatrix * vec4( pointLightPosition[ i ], 1.0 );\n vec3 lVector = lPosition.xyz - mvPosition.xyz;\n\n float lDistance = 1.0;\n if ( pointLightDistance[ i ] > 0.0 )\n lDistance = 1.0 - min( ( length( lVector ) / pointLightDistance[ i ] ), 1.0 );\n\n lVector = normalize( lVector );\n float dotProduct = dot( transformedNormal, lVector );\n\n vec3 pointLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n #ifdef DOUBLE_SIDED\n\n vec3 pointLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n\n #ifdef WRAP_AROUND\n\n vec3 pointLightWeightingHalfBack = vec3( max( -0.5 * dotProduct + 0.5, 0.0 ) );\n\n #endif\n\n #endif\n\n #ifdef WRAP_AROUND\n\n vec3 pointLightWeightingHalf = vec3( max( 0.5 * dotProduct + 0.5, 0.0 ) );\n pointLightWeighting = mix( pointLightWeighting, pointLightWeightingHalf, wrapRGB );\n\n #ifdef DOUBLE_SIDED\n\n pointLightWeightingBack = mix( pointLightWeightingBack, pointLightWeightingHalfBack, wrapRGB );\n\n #endif\n\n #endif\n\n vLightFront += pointLightColor[ i ] * pointLightWeighting * lDistance;\n\n #ifdef DOUBLE_SIDED\n\n vLightBack += pointLightColor[ i ] * pointLightWeightingBack * lDistance;\n\n #endif\n\n }\n\n#endif\n\n#if MAX_SPOT_LIGHTS > 0\n\n for( int i = 0; i < MAX_SPOT_LIGHTS; i ++ ) {\n\n vec4 lPosition = viewMatrix * vec4( spotLightPosition[ i ], 1.0 );\n vec3 lVector = lPosition.xyz - mvPosition.xyz;\n\n float spotEffect = dot( spotLightDirection[ i ], normalize( spotLightPosition[ i ] - worldPosition.xyz ) );\n\n if ( spotEffect > spotLightAngleCos[ i ] ) {\n\n spotEffect = max( pow( max( spotEffect, 0.0 ), spotLightExponent[ i ] ), 0.0 );\n\n float lDistance = 1.0;\n if ( spotLightDistance[ i ] > 0.0 )\n lDistance = 1.0 - min( ( length( lVector ) / spotLightDistance[ i ] ), 1.0 );\n\n lVector = normalize( lVector );\n\n float dotProduct = dot( transformedNormal, lVector );\n vec3 spotLightWeighting = vec3( max( dotProduct, 0.0 ) );\n\n #ifdef DOUBLE_SIDED\n\n vec3 spotLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n\n #ifdef WRAP_AROUND\n\n vec3 spotLightWeightingHalfBack = vec3( max( -0.5 * dotProduct + 0.5, 0.0 ) );\n\n #endif\n\n #endif\n\n #ifdef WRAP_AROUND\n\n vec3 spotLightWeightingHalf = vec3( max( 0.5 * dotProduct + 0.5, 0.0 ) );\n spotLightWeighting = mix( spotLightWeighting, spotLightWeightingHalf, wrapRGB );\n\n #ifdef DOUBLE_SIDED\n\n spotLightWeightingBack = mix( spotLightWeightingBack, spotLightWeightingHalfBack, wrapRGB );\n\n #endif\n\n #endif\n\n vLightFront += spotLightColor[ i ] * spotLightWeighting * lDistance * spotEffect;\n\n #ifdef DOUBLE_SIDED\n\n vLightBack += spotLightColor[ i ] * spotLightWeightingBack * lDistance * spotEffect;\n\n #endif\n\n }\n\n }\n\n#endif\n\n#if MAX_HEMI_LIGHTS > 0\n\n for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {\n\n vec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );\n vec3 lVector = normalize( lDirection.xyz );\n\n float dotProduct = dot( transformedNormal, lVector );\n\n float hemiDiffuseWeight = 0.5 * dotProduct + 0.5;\n float hemiDiffuseWeightBack = -0.5 * dotProduct + 0.5;\n\n vLightFront += mix( hemisphereLightGroundColor[ i ], hemisphereLightSkyColor[ i ], hemiDiffuseWeight );\n\n #ifdef DOUBLE_SIDED\n\n vLightBack += mix( hemisphereLightGroundColor[ i ], hemisphereLightSkyColor[ i ], hemiDiffuseWeightBack );\n\n #endif\n\n }\n\n#endif\n\nvLightFront = vLightFront * diffuse + ambient * ambientLightColor + emissive;\n\n#ifdef DOUBLE_SIDED\n\n vLightBack = vLightBack * diffuse + ambient * ambientLightColor + emissive;\n\n#endif",THREE.ShaderChunk.map_particle_pars_fragment="#ifdef USE_MAP\n\n uniform sampler2D map;\n\n#endif",THREE.ShaderChunk.default_vertex="vec4 mvPosition;\n\n#ifdef USE_SKINNING\n\n mvPosition = modelViewMatrix * skinned;\n\n#endif\n\n#if !defined( USE_SKINNING ) && defined( USE_MORPHTARGETS )\n\n mvPosition = modelViewMatrix * vec4( morphed, 1.0 );\n\n#endif\n\n#if !defined( USE_SKINNING ) && ! defined( USE_MORPHTARGETS )\n\n mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n#endif\n\ngl_Position = projectionMatrix * mvPosition;",THREE.ShaderChunk.map_pars_fragment="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP )\n\n varying vec2 vUv;\n\n#endif\n\n#ifdef USE_MAP\n\n uniform sampler2D map;\n\n#endif",THREE.ShaderChunk.skinnormal_vertex="#ifdef USE_SKINNING\n\n mat4 skinMatrix = mat4( 0.0 );\n skinMatrix += skinWeight.x * boneMatX;\n skinMatrix += skinWeight.y * boneMatY;\n skinMatrix += skinWeight.z * boneMatZ;\n skinMatrix += skinWeight.w * boneMatW;\n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\n #ifdef USE_MORPHNORMALS\n\n vec4 skinnedNormal = skinMatrix * vec4( morphedNormal, 0.0 );\n\n #else\n\n vec4 skinnedNormal = skinMatrix * vec4( normal, 0.0 );\n\n #endif\n\n#endif\n",THREE.ShaderChunk.logdepthbuf_pars_vertex="#ifdef USE_LOGDEPTHBUF\n\n #ifdef USE_LOGDEPTHBUF_EXT\n\n varying float vFragDepth;\n\n #endif\n\n uniform float logDepthBufFC;\n\n#endif",THREE.ShaderChunk.lightmap_pars_vertex="#ifdef USE_LIGHTMAP\n\n varying vec2 vUv2;\n\n#endif",THREE.ShaderChunk.lights_phong_fragment="vec3 normal = normalize( vNormal );\nvec3 viewPosition = normalize( vViewPosition );\n\n#ifdef DOUBLE_SIDED\n\n normal = normal * ( -1.0 + 2.0 * float( gl_FrontFacing ) );\n\n#endif\n\n#ifdef USE_NORMALMAP\n\n normal = perturbNormal2Arb( -vViewPosition, normal );\n\n#elif defined( USE_BUMPMAP )\n\n normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n\n#endif\n\n#if MAX_POINT_LIGHTS > 0\n\n vec3 pointDiffuse = vec3( 0.0 );\n vec3 pointSpecular = vec3( 0.0 );\n\n for ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {\n\n vec4 lPosition = viewMatrix * vec4( pointLightPosition[ i ], 1.0 );\n vec3 lVector = lPosition.xyz + vViewPosition.xyz;\n\n float lDistance = 1.0;\n if ( pointLightDistance[ i ] > 0.0 )\n lDistance = 1.0 - min( ( length( lVector ) / pointLightDistance[ i ] ), 1.0 );\n\n lVector = normalize( lVector );\n\n // diffuse\n\n float dotProduct = dot( normal, lVector );\n\n #ifdef WRAP_AROUND\n\n float pointDiffuseWeightFull = max( dotProduct, 0.0 );\n float pointDiffuseWeightHalf = max( 0.5 * dotProduct + 0.5, 0.0 );\n\n vec3 pointDiffuseWeight = mix( vec3( pointDiffuseWeightFull ), vec3( pointDiffuseWeightHalf ), wrapRGB );\n\n #else\n\n float pointDiffuseWeight = max( dotProduct, 0.0 );\n\n #endif\n\n pointDiffuse += diffuse * pointLightColor[ i ] * pointDiffuseWeight * lDistance;\n\n // specular\n\n vec3 pointHalfVector = normalize( lVector + viewPosition );\n float pointDotNormalHalf = max( dot( normal, pointHalfVector ), 0.0 );\n float pointSpecularWeight = specularStrength * max( pow( pointDotNormalHalf, shininess ), 0.0 );\n\n float specularNormalization = ( shininess + 2.0 ) / 8.0;\n\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, pointHalfVector ), 0.0 ), 5.0 );\n pointSpecular += schlick * pointLightColor[ i ] * pointSpecularWeight * pointDiffuseWeight * lDistance * specularNormalization;\n\n }\n\n#endif\n\n#if MAX_SPOT_LIGHTS > 0\n\n vec3 spotDiffuse = vec3( 0.0 );\n vec3 spotSpecular = vec3( 0.0 );\n\n for ( int i = 0; i < MAX_SPOT_LIGHTS; i ++ ) {\n\n vec4 lPosition = viewMatrix * vec4( spotLightPosition[ i ], 1.0 );\n vec3 lVector = lPosition.xyz + vViewPosition.xyz;\n\n float lDistance = 1.0;\n if ( spotLightDistance[ i ] > 0.0 )\n lDistance = 1.0 - min( ( length( lVector ) / spotLightDistance[ i ] ), 1.0 );\n\n lVector = normalize( lVector );\n\n float spotEffect = dot( spotLightDirection[ i ], normalize( spotLightPosition[ i ] - vWorldPosition ) );\n\n if ( spotEffect > spotLightAngleCos[ i ] ) {\n\n spotEffect = max( pow( max( spotEffect, 0.0 ), spotLightExponent[ i ] ), 0.0 );\n\n // diffuse\n\n float dotProduct = dot( normal, lVector );\n\n #ifdef WRAP_AROUND\n\n float spotDiffuseWeightFull = max( dotProduct, 0.0 );\n float spotDiffuseWeightHalf = max( 0.5 * dotProduct + 0.5, 0.0 );\n\n vec3 spotDiffuseWeight = mix( vec3( spotDiffuseWeightFull ), vec3( spotDiffuseWeightHalf ), wrapRGB );\n\n #else\n\n float spotDiffuseWeight = max( dotProduct, 0.0 );\n\n #endif\n\n spotDiffuse += diffuse * spotLightColor[ i ] * spotDiffuseWeight * lDistance * spotEffect;\n\n // specular\n\n vec3 spotHalfVector = normalize( lVector + viewPosition );\n float spotDotNormalHalf = max( dot( normal, spotHalfVector ), 0.0 );\n float spotSpecularWeight = specularStrength * max( pow( spotDotNormalHalf, shininess ), 0.0 );\n\n float specularNormalization = ( shininess + 2.0 ) / 8.0;\n\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, spotHalfVector ), 0.0 ), 5.0 );\n spotSpecular += schlick * spotLightColor[ i ] * spotSpecularWeight * spotDiffuseWeight * lDistance * specularNormalization * spotEffect;\n\n }\n\n }\n\n#endif\n\n#if MAX_DIR_LIGHTS > 0\n\n vec3 dirDiffuse = vec3( 0.0 );\n vec3 dirSpecular = vec3( 0.0 );\n\n for( int i = 0; i < MAX_DIR_LIGHTS; i ++ ) {\n\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ i ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n\n // diffuse\n\n float dotProduct = dot( normal, dirVector );\n\n #ifdef WRAP_AROUND\n\n float dirDiffuseWeightFull = max( dotProduct, 0.0 );\n float dirDiffuseWeightHalf = max( 0.5 * dotProduct + 0.5, 0.0 );\n\n vec3 dirDiffuseWeight = mix( vec3( dirDiffuseWeightFull ), vec3( dirDiffuseWeightHalf ), wrapRGB );\n\n #else\n\n float dirDiffuseWeight = max( dotProduct, 0.0 );\n\n #endif\n\n dirDiffuse += diffuse * directionalLightColor[ i ] * dirDiffuseWeight;\n\n // specular\n\n vec3 dirHalfVector = normalize( dirVector + viewPosition );\n float dirDotNormalHalf = max( dot( normal, dirHalfVector ), 0.0 );\n float dirSpecularWeight = specularStrength * max( pow( dirDotNormalHalf, shininess ), 0.0 );\n\n /*\n // fresnel term from skin shader\n const float F0 = 0.128;\n\n float base = 1.0 - dot( viewPosition, dirHalfVector );\n float exponential = pow( base, 5.0 );\n\n float fresnel = exponential + F0 * ( 1.0 - exponential );\n */\n\n /*\n // fresnel term from fresnel shader\n const float mFresnelBias = 0.08;\n const float mFresnelScale = 0.3;\n const float mFresnelPower = 5.0;\n\n float fresnel = mFresnelBias + mFresnelScale * pow( 1.0 + dot( normalize( -viewPosition ), normal ), mFresnelPower );\n */\n\n float specularNormalization = ( shininess + 2.0 ) / 8.0;\n\n // dirSpecular += specular * directionalLightColor[ i ] * dirSpecularWeight * dirDiffuseWeight * specularNormalization * fresnel;\n\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( dirVector, dirHalfVector ), 0.0 ), 5.0 );\n dirSpecular += schlick * directionalLightColor[ i ] * dirSpecularWeight * dirDiffuseWeight * specularNormalization;\n\n\n }\n\n#endif\n\n#if MAX_HEMI_LIGHTS > 0\n\n vec3 hemiDiffuse = vec3( 0.0 );\n vec3 hemiSpecular = vec3( 0.0 );\n\n for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {\n\n vec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );\n vec3 lVector = normalize( lDirection.xyz );\n\n // diffuse\n\n float dotProduct = dot( normal, lVector );\n float hemiDiffuseWeight = 0.5 * dotProduct + 0.5;\n\n vec3 hemiColor = mix( hemisphereLightGroundColor[ i ], hemisphereLightSkyColor[ i ], hemiDiffuseWeight );\n\n hemiDiffuse += diffuse * hemiColor;\n\n // specular (sky light)\n\n vec3 hemiHalfVectorSky = normalize( lVector + viewPosition );\n float hemiDotNormalHalfSky = 0.5 * dot( normal, hemiHalfVectorSky ) + 0.5;\n float hemiSpecularWeightSky = specularStrength * max( pow( max( hemiDotNormalHalfSky, 0.0 ), shininess ), 0.0 );\n\n // specular (ground light)\n\n vec3 lVectorGround = -lVector;\n\n vec3 hemiHalfVectorGround = normalize( lVectorGround + viewPosition );\n float hemiDotNormalHalfGround = 0.5 * dot( normal, hemiHalfVectorGround ) + 0.5;\n float hemiSpecularWeightGround = specularStrength * max( pow( max( hemiDotNormalHalfGround, 0.0 ), shininess ), 0.0 );\n\n float dotProductGround = dot( normal, lVectorGround );\n\n float specularNormalization = ( shininess + 2.0 ) / 8.0;\n\n vec3 schlickSky = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, hemiHalfVectorSky ), 0.0 ), 5.0 );\n vec3 schlickGround = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVectorGround, hemiHalfVectorGround ), 0.0 ), 5.0 );\n hemiSpecular += hemiColor * specularNormalization * ( schlickSky * hemiSpecularWeightSky * max( dotProduct, 0.0 ) + schlickGround * hemiSpecularWeightGround * max( dotProductGround, 0.0 ) );\n\n }\n\n#endif\n\nvec3 totalDiffuse = vec3( 0.0 );\nvec3 totalSpecular = vec3( 0.0 );\n\n#if MAX_DIR_LIGHTS > 0\n\n totalDiffuse += dirDiffuse;\n totalSpecular += dirSpecular;\n\n#endif\n\n#if MAX_HEMI_LIGHTS > 0\n\n totalDiffuse += hemiDiffuse;\n totalSpecular += hemiSpecular;\n\n#endif\n\n#if MAX_POINT_LIGHTS > 0\n\n totalDiffuse += pointDiffuse;\n totalSpecular += pointSpecular;\n\n#endif\n\n#if MAX_SPOT_LIGHTS > 0\n\n totalDiffuse += spotDiffuse;\n totalSpecular += spotSpecular;\n\n#endif\n\n#ifdef METAL\n\n gl_FragColor.xyz = gl_FragColor.xyz * ( emissive + totalDiffuse + ambientLightColor * ambient + totalSpecular );\n\n#else\n\n gl_FragColor.xyz = gl_FragColor.xyz * ( emissive + totalDiffuse + ambientLightColor * ambient ) + totalSpecular;\n\n#endif",THREE.ShaderChunk.fog_pars_fragment="#ifdef USE_FOG\n\n uniform vec3 fogColor;\n\n #ifdef FOG_EXP2\n\n uniform float fogDensity;\n\n #else\n\n uniform float fogNear;\n uniform float fogFar;\n #endif\n\n#endif",THREE.ShaderChunk.morphnormal_vertex="#ifdef USE_MORPHNORMALS\n\n vec3 morphedNormal = vec3( 0.0 );\n\n morphedNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n morphedNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n morphedNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n morphedNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n\n morphedNormal += normal;\n\n#endif",THREE.ShaderChunk.envmap_pars_fragment="#ifdef USE_ENVMAP\n\n uniform float reflectivity;\n uniform samplerCube envMap;\n uniform float flipEnvMap;\n uniform int combine;\n\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\n uniform bool useRefract;\n uniform float refractionRatio;\n\n #else\n\n varying vec3 vReflect;\n\n #endif\n\n#endif",THREE.ShaderChunk.logdepthbuf_fragment="#if defined(USE_LOGDEPTHBUF) && defined(USE_LOGDEPTHBUF_EXT)\n\n gl_FragDepthEXT = log2(vFragDepth) * logDepthBufFC * 0.5;\n\n#endif",THREE.ShaderChunk.normalmap_pars_fragment="#ifdef USE_NORMALMAP\n\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n\n // Per-Pixel Tangent Space Normal Mapping\n // http://hacksoflife.blogspot.ch/2009/11/per-pixel-tangent-space-normal-mapping.html\n\n vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\n vec3 q0 = dFdx( eye_pos.xyz );\n vec3 q1 = dFdy( eye_pos.xyz );\n vec2 st0 = dFdx( vUv.st );\n vec2 st1 = dFdy( vUv.st );\n\n vec3 S = normalize( q0 * st1.t - q1 * st0.t );\n vec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n vec3 N = normalize( surf_norm );\n\n vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n mapN.xy = normalScale * mapN.xy;\n mat3 tsn = mat3( S, T, N );\n return normalize( tsn * mapN );\n\n }\n\n#endif\n",THREE.ShaderChunk.lights_phong_pars_vertex="#if MAX_SPOT_LIGHTS > 0 || defined( USE_BUMPMAP ) || defined( USE_ENVMAP )\n\n varying vec3 vWorldPosition;\n\n#endif\n",THREE.ShaderChunk.lightmap_pars_fragment="#ifdef USE_LIGHTMAP\n\n varying vec2 vUv2;\n uniform sampler2D lightMap;\n\n#endif",THREE.ShaderChunk.shadowmap_vertex="#ifdef USE_SHADOWMAP\n\n for( int i = 0; i < MAX_SHADOWS; i ++ ) {\n\n vShadowCoord[ i ] = shadowMatrix[ i ] * worldPosition;\n\n }\n\n#endif",THREE.ShaderChunk.lights_phong_vertex="#if MAX_SPOT_LIGHTS > 0 || defined( USE_BUMPMAP ) || defined( USE_ENVMAP )\n\n vWorldPosition = worldPosition.xyz;\n\n#endif",THREE.ShaderChunk.map_fragment="#ifdef USE_MAP\n\n vec4 texelColor = texture2D( map, vUv );\n\n #ifdef GAMMA_INPUT\n\n texelColor.xyz *= texelColor.xyz;\n\n #endif\n\n gl_FragColor = gl_FragColor * texelColor;\n\n#endif",THREE.ShaderChunk.lightmap_vertex="#ifdef USE_LIGHTMAP\n\n vUv2 = uv2;\n\n#endif",THREE.ShaderChunk.map_particle_fragment="#ifdef USE_MAP\n\n gl_FragColor = gl_FragColor * texture2D( map, vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y ) );\n\n#endif",THREE.ShaderChunk.color_pars_fragment="#ifdef USE_COLOR\n\n varying vec3 vColor;\n\n#endif\n",THREE.ShaderChunk.color_vertex="#ifdef USE_COLOR\n\n #ifdef GAMMA_INPUT\n\n vColor = color * color;\n\n #else\n\n vColor = color;\n\n #endif\n\n#endif",THREE.ShaderChunk.skinning_vertex="#ifdef USE_SKINNING\n\n #ifdef USE_MORPHTARGETS\n\n vec4 skinVertex = bindMatrix * vec4( morphed, 1.0 );\n\n #else\n\n vec4 skinVertex = bindMatrix * vec4( position, 1.0 );\n\n #endif\n\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n skinned = bindMatrixInverse * skinned;\n\n#endif\n",THREE.ShaderChunk.envmap_pars_vertex="#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG )\n\n varying vec3 vReflect;\n\n uniform float refractionRatio;\n uniform bool useRefract;\n\n#endif\n",THREE.ShaderChunk.linear_to_gamma_fragment="#ifdef GAMMA_OUTPUT\n\n gl_FragColor.xyz = sqrt( gl_FragColor.xyz );\n\n#endif",THREE.ShaderChunk.color_pars_vertex="#ifdef USE_COLOR\n\n varying vec3 vColor;\n\n#endif",THREE.ShaderChunk.lights_lambert_pars_vertex="uniform vec3 ambient;\nuniform vec3 diffuse;\nuniform vec3 emissive;\n\nuniform vec3 ambientLightColor;\n\n#if MAX_DIR_LIGHTS > 0\n\n uniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ];\n uniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ];\n\n#endif\n\n#if MAX_HEMI_LIGHTS > 0\n\n uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];\n uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];\n uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];\n\n#endif\n\n#if MAX_POINT_LIGHTS > 0\n\n uniform vec3 pointLightColor[ MAX_POINT_LIGHTS ];\n uniform vec3 pointLightPosition[ MAX_POINT_LIGHTS ];\n uniform float pointLightDistance[ MAX_POINT_LIGHTS ];\n\n#endif\n\n#if MAX_SPOT_LIGHTS > 0\n\n uniform vec3 spotLightColor[ MAX_SPOT_LIGHTS ];\n uniform vec3 spotLightPosition[ MAX_SPOT_LIGHTS ];\n uniform vec3 spotLightDirection[ MAX_SPOT_LIGHTS ];\n uniform float spotLightDistance[ MAX_SPOT_LIGHTS ];\n uniform float spotLightAngleCos[ MAX_SPOT_LIGHTS ];\n uniform float spotLightExponent[ MAX_SPOT_LIGHTS ];\n\n#endif\n\n#ifdef WRAP_AROUND\n\n uniform vec3 wrapRGB;\n\n#endif\n",THREE.ShaderChunk.map_pars_vertex="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP )\n\n varying vec2 vUv;\n uniform vec4 offsetRepeat;\n\n#endif\n",THREE.ShaderChunk.envmap_fragment="#ifdef USE_ENVMAP\n\n vec3 reflectVec;\n\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\n vec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\n // http://en.wikibooks.org/wiki/GLSL_Programming/Applying_Matrix_Transformations\n // Transforming Normal Vectors with the Inverse Transformation\n\n vec3 worldNormal = normalize( vec3( vec4( normal, 0.0 ) * viewMatrix ) );\n\n if ( useRefract ) {\n\n reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\n } else { \n\n reflectVec = reflect( cameraToVertex, worldNormal );\n\n }\n\n #else\n\n reflectVec = vReflect;\n\n #endif\n\n #ifdef DOUBLE_SIDED\n\n float flipNormal = ( -1.0 + 2.0 * float( gl_FrontFacing ) );\n vec4 cubeColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\n #else\n\n vec4 cubeColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\n #endif\n\n #ifdef GAMMA_INPUT\n\n cubeColor.xyz *= cubeColor.xyz;\n\n #endif\n\n if ( combine == 1 ) {\n\n gl_FragColor.xyz = mix( gl_FragColor.xyz, cubeColor.xyz, specularStrength * reflectivity );\n\n } else if ( combine == 2 ) {\n\n gl_FragColor.xyz += cubeColor.xyz * specularStrength * reflectivity;\n\n } else {\n\n gl_FragColor.xyz = mix( gl_FragColor.xyz, gl_FragColor.xyz * cubeColor.xyz, specularStrength * reflectivity );\n\n }\n\n#endif",THREE.ShaderChunk.specularmap_pars_fragment="#ifdef USE_SPECULARMAP\n\n uniform sampler2D specularMap;\n\n#endif",THREE.ShaderChunk.logdepthbuf_vertex="#ifdef USE_LOGDEPTHBUF\n\n gl_Position.z = log2(max(1e-6, gl_Position.w + 1.0)) * logDepthBufFC;\n\n #ifdef USE_LOGDEPTHBUF_EXT\n\n vFragDepth = 1.0 + gl_Position.w;\n\n#else\n\n gl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;\n\n #endif\n\n#endif",THREE.ShaderChunk.morphtarget_pars_vertex="#ifdef USE_MORPHTARGETS\n\n #ifndef USE_MORPHNORMALS\n\n uniform float morphTargetInfluences[ 8 ];\n\n #else\n\n uniform float morphTargetInfluences[ 4 ];\n\n #endif\n\n#endif",THREE.ShaderChunk.specularmap_fragment="float specularStrength;\n\n#ifdef USE_SPECULARMAP\n\n vec4 texelSpecular = texture2D( specularMap, vUv );\n specularStrength = texelSpecular.r;\n\n#else\n\n specularStrength = 1.0;\n\n#endif",THREE.ShaderChunk.fog_fragment="#ifdef USE_FOG\n\n #ifdef USE_LOGDEPTHBUF_EXT\n\n float depth = gl_FragDepthEXT / gl_FragCoord.w;\n\n #else\n\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n\n #endif\n\n #ifdef FOG_EXP2\n\n const float LOG2 = 1.442695;\n float fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\n fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n\n #else\n\n float fogFactor = smoothstep( fogNear, fogFar, depth );\n\n #endif\n \n gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n\n#endif",THREE.ShaderChunk.bumpmap_pars_fragment="#ifdef USE_BUMPMAP\n\n uniform sampler2D bumpMap;\n uniform float bumpScale;\n\n // Derivative maps - bump mapping unparametrized surfaces by Morten Mikkelsen\n // http://mmikkelsen3d.blogspot.sk/2011/07/derivative-maps.html\n\n // Evaluate the derivative of the height w.r.t. screen-space using forward differencing (listing 2)\n\n vec2 dHdxy_fwd() {\n\n vec2 dSTdx = dFdx( vUv );\n vec2 dSTdy = dFdy( vUv );\n\n float Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\n return vec2( dBx, dBy );\n\n }\n\n vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\n vec3 vSigmaX = dFdx( surf_pos );\n vec3 vSigmaY = dFdy( surf_pos );\n vec3 vN = surf_norm; // normalized\n\n vec3 R1 = cross( vSigmaY, vN );\n vec3 R2 = cross( vN, vSigmaX );\n\n float fDet = dot( vSigmaX, R1 );\n\n vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n return normalize( abs( fDet ) * surf_norm - vGrad );\n\n }\n\n#endif",THREE.ShaderChunk.defaultnormal_vertex="vec3 objectNormal;\n\n#ifdef USE_SKINNING\n\n objectNormal = skinnedNormal.xyz;\n\n#endif\n\n#if !defined( USE_SKINNING ) && defined( USE_MORPHNORMALS )\n\n objectNormal = morphedNormal;\n\n#endif\n\n#if !defined( USE_SKINNING ) && ! defined( USE_MORPHNORMALS )\n\n objectNormal = normal;\n\n#endif\n\n#ifdef FLIP_SIDED\n\n objectNormal = -objectNormal;\n\n#endif\n\nvec3 transformedNormal = normalMatrix * objectNormal;",THREE.ShaderChunk.lights_phong_pars_fragment="uniform vec3 ambientLightColor;\n\n#if MAX_DIR_LIGHTS > 0\n\n uniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ];\n uniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ];\n\n#endif\n\n#if MAX_HEMI_LIGHTS > 0\n\n uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];\n uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];\n uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];\n\n#endif\n\n#if MAX_POINT_LIGHTS > 0\n\n uniform vec3 pointLightColor[ MAX_POINT_LIGHTS ];\n\n uniform vec3 pointLightPosition[ MAX_POINT_LIGHTS ];\n uniform float pointLightDistance[ MAX_POINT_LIGHTS ];\n\n#endif\n\n#if MAX_SPOT_LIGHTS > 0\n\n uniform vec3 spotLightColor[ MAX_SPOT_LIGHTS ];\n uniform vec3 spotLightPosition[ MAX_SPOT_LIGHTS ];\n uniform vec3 spotLightDirection[ MAX_SPOT_LIGHTS ];\n uniform float spotLightAngleCos[ MAX_SPOT_LIGHTS ];\n uniform float spotLightExponent[ MAX_SPOT_LIGHTS ];\n\n uniform float spotLightDistance[ MAX_SPOT_LIGHTS ];\n\n#endif\n\n#if MAX_SPOT_LIGHTS > 0 || defined( USE_BUMPMAP ) || defined( USE_ENVMAP )\n\n varying vec3 vWorldPosition;\n\n#endif\n\n#ifdef WRAP_AROUND\n\n uniform vec3 wrapRGB;\n\n#endif\n\nvarying vec3 vViewPosition;\nvarying vec3 vNormal;",THREE.ShaderChunk.skinbase_vertex="#ifdef USE_SKINNING\n\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n\n#endif",THREE.ShaderChunk.map_vertex="#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP )\n\n vUv = uv * offsetRepeat.zw + offsetRepeat.xy;\n\n#endif",THREE.ShaderChunk.lightmap_fragment="#ifdef USE_LIGHTMAP\n\n gl_FragColor = gl_FragColor * texture2D( lightMap, vUv2 );\n\n#endif",THREE.ShaderChunk.shadowmap_pars_vertex="#ifdef USE_SHADOWMAP\n\n varying vec4 vShadowCoord[ MAX_SHADOWS ];\n uniform mat4 shadowMatrix[ MAX_SHADOWS ];\n\n#endif",THREE.ShaderChunk.color_fragment="#ifdef USE_COLOR\n\n gl_FragColor = gl_FragColor * vec4( vColor, 1.0 );\n\n#endif",THREE.ShaderChunk.morphtarget_vertex="#ifdef USE_MORPHTARGETS\n\n vec3 morphed = vec3( 0.0 );\n morphed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n morphed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n morphed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n morphed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\n #ifndef USE_MORPHNORMALS\n\n morphed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n morphed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n morphed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n morphed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\n #endif\n\n morphed += position;\n\n#endif",THREE.ShaderChunk.envmap_vertex="#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP ) && ! defined( PHONG )\n\n vec3 worldNormal = mat3( modelMatrix[ 0 ].xyz, modelMatrix[ 1 ].xyz, modelMatrix[ 2 ].xyz ) * objectNormal;\n worldNormal = normalize( worldNormal );\n\n vec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\n if ( useRefract ) {\n\n vReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\n } else {\n\n vReflect = reflect( cameraToVertex, worldNormal );\n\n }\n\n#endif",THREE.ShaderChunk.shadowmap_fragment="#ifdef USE_SHADOWMAP\n\n #ifdef SHADOWMAP_DEBUG\n\n vec3 frustumColors[3];\n frustumColors[0] = vec3( 1.0, 0.5, 0.0 );\n frustumColors[1] = vec3( 0.0, 1.0, 0.8 );\n frustumColors[2] = vec3( 0.0, 0.5, 1.0 );\n\n #endif\n\n #ifdef SHADOWMAP_CASCADE\n\n int inFrustumCount = 0;\n\n #endif\n\n float fDepth;\n vec3 shadowColor = vec3( 1.0 );\n\n for( int i = 0; i < MAX_SHADOWS; i ++ ) {\n\n vec3 shadowCoord = vShadowCoord[ i ].xyz / vShadowCoord[ i ].w;\n\n // if ( something && something ) breaks ATI OpenGL shader compiler\n // if ( all( something, something ) ) using this instead\n\n bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n bool inFrustum = all( inFrustumVec );\n\n // don't shadow pixels outside of light frustum\n // use just first frustum (for cascades)\n // don't shadow pixels behind far plane of light frustum\n\n #ifdef SHADOWMAP_CASCADE\n\n inFrustumCount += int( inFrustum );\n bvec3 frustumTestVec = bvec3( inFrustum, inFrustumCount == 1, shadowCoord.z <= 1.0 );\n\n #else\n\n bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\n #endif\n\n bool frustumTest = all( frustumTestVec );\n\n if ( frustumTest ) {\n\n shadowCoord.z += shadowBias[ i ];\n\n #if defined( SHADOWMAP_TYPE_PCF )\n\n // Percentage-close filtering\n // (9 pixel kernel)\n // http://fabiensanglard.net/shadowmappingPCF/\n\n float shadow = 0.0;\n\n /*\n // nested loops breaks shader compiler / validator on some ATI cards when using OpenGL\n // must enroll loop manually\n\n for ( float y = -1.25; y <= 1.25; y += 1.25 )\n for ( float x = -1.25; x <= 1.25; x += 1.25 ) {\n\n vec4 rgbaDepth = texture2D( shadowMap[ i ], vec2( x * xPixelOffset, y * yPixelOffset ) + shadowCoord.xy );\n\n // doesn't seem to produce any noticeable visual difference compared to simple texture2D lookup\n //vec4 rgbaDepth = texture2DProj( shadowMap[ i ], vec4( vShadowCoord[ i ].w * ( vec2( x * xPixelOffset, y * yPixelOffset ) + shadowCoord.xy ), 0.05, vShadowCoord[ i ].w ) );\n\n float fDepth = unpackDepth( rgbaDepth );\n\n if ( fDepth < shadowCoord.z )\n shadow += 1.0;\n\n }\n\n shadow /= 9.0;\n\n */\n\n const float shadowDelta = 1.0 / 9.0;\n\n float xPixelOffset = 1.0 / shadowMapSize[ i ].x;\n float yPixelOffset = 1.0 / shadowMapSize[ i ].y;\n\n float dx0 = -1.25 * xPixelOffset;\n float dy0 = -1.25 * yPixelOffset;\n float dx1 = 1.25 * xPixelOffset;\n float dy1 = 1.25 * yPixelOffset;\n\n fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, dy0 ) ) );\n if ( fDepth < shadowCoord.z ) shadow += shadowDelta;\n\n fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( 0.0, dy0 ) ) );\n if ( fDepth < shadowCoord.z ) shadow += shadowDelta;\n\n fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, dy0 ) ) );\n if ( fDepth < shadowCoord.z ) shadow += shadowDelta;\n\n fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, 0.0 ) ) );\n if ( fDepth < shadowCoord.z ) shadow += shadowDelta;\n\n fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy ) );\n if ( fDepth < shadowCoord.z ) shadow += shadowDelta;\n\n fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, 0.0 ) ) );\n if ( fDepth < shadowCoord.z ) shadow += shadowDelta;\n\n fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, dy1 ) ) );\n if ( fDepth < shadowCoord.z ) shadow += shadowDelta;\n\n fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( 0.0, dy1 ) ) );\n if ( fDepth < shadowCoord.z ) shadow += shadowDelta;\n\n fDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, dy1 ) ) );\n if ( fDepth < shadowCoord.z ) shadow += shadowDelta;\n\n shadowColor = shadowColor * vec3( ( 1.0 - shadowDarkness[ i ] * shadow ) );\n\n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\n // Percentage-close filtering\n // (9 pixel kernel)\n // http://fabiensanglard.net/shadowmappingPCF/\n\n float shadow = 0.0;\n\n float xPixelOffset = 1.0 / shadowMapSize[ i ].x;\n float yPixelOffset = 1.0 / shadowMapSize[ i ].y;\n\n float dx0 = -1.0 * xPixelOffset;\n float dy0 = -1.0 * yPixelOffset;\n float dx1 = 1.0 * xPixelOffset;\n float dy1 = 1.0 * yPixelOffset;\n\n mat3 shadowKernel;\n mat3 depthKernel;\n\n depthKernel[0][0] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, dy0 ) ) );\n depthKernel[0][1] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, 0.0 ) ) );\n depthKernel[0][2] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, dy1 ) ) );\n depthKernel[1][0] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( 0.0, dy0 ) ) );\n depthKernel[1][1] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy ) );\n depthKernel[1][2] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( 0.0, dy1 ) ) );\n depthKernel[2][0] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, dy0 ) ) );\n depthKernel[2][1] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, 0.0 ) ) );\n depthKernel[2][2] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, dy1 ) ) );\n\n vec3 shadowZ = vec3( shadowCoord.z );\n shadowKernel[0] = vec3(lessThan(depthKernel[0], shadowZ ));\n shadowKernel[0] *= vec3(0.25);\n\n shadowKernel[1] = vec3(lessThan(depthKernel[1], shadowZ ));\n shadowKernel[1] *= vec3(0.25);\n\n shadowKernel[2] = vec3(lessThan(depthKernel[2], shadowZ ));\n shadowKernel[2] *= vec3(0.25);\n\n vec2 fractionalCoord = 1.0 - fract( shadowCoord.xy * shadowMapSize[i].xy );\n\n shadowKernel[0] = mix( shadowKernel[1], shadowKernel[0], fractionalCoord.x );\n shadowKernel[1] = mix( shadowKernel[2], shadowKernel[1], fractionalCoord.x );\n\n vec4 shadowValues;\n shadowValues.x = mix( shadowKernel[0][1], shadowKernel[0][0], fractionalCoord.y );\n shadowValues.y = mix( shadowKernel[0][2], shadowKernel[0][1], fractionalCoord.y );\n shadowValues.z = mix( shadowKernel[1][1], shadowKernel[1][0], fractionalCoord.y );\n shadowValues.w = mix( shadowKernel[1][2], shadowKernel[1][1], fractionalCoord.y );\n\n shadow = dot( shadowValues, vec4( 1.0 ) );\n\n shadowColor = shadowColor * vec3( ( 1.0 - shadowDarkness[ i ] * shadow ) );\n\n #else\n\n vec4 rgbaDepth = texture2D( shadowMap[ i ], shadowCoord.xy );\n float fDepth = unpackDepth( rgbaDepth );\n\n if ( fDepth < shadowCoord.z )\n\n // spot with multiple shadows is darker\n\n shadowColor = shadowColor * vec3( 1.0 - shadowDarkness[ i ] );\n\n // spot with multiple shadows has the same color as single shadow spot\n\n // shadowColor = min( shadowColor, vec3( shadowDarkness[ i ] ) );\n\n #endif\n\n }\n\n\n #ifdef SHADOWMAP_DEBUG\n\n #ifdef SHADOWMAP_CASCADE\n\n if ( inFrustum && inFrustumCount == 1 ) gl_FragColor.xyz *= frustumColors[ i ];\n\n #else\n\n if ( inFrustum ) gl_FragColor.xyz *= frustumColors[ i ];\n\n #endif\n\n #endif\n\n }\n\n #ifdef GAMMA_OUTPUT\n\n shadowColor *= shadowColor;\n\n #endif\n\n gl_FragColor.xyz = gl_FragColor.xyz * shadowColor;\n\n#endif\n",THREE.ShaderChunk.worldpos_vertex="#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n\n #ifdef USE_SKINNING\n\n vec4 worldPosition = modelMatrix * skinned;\n\n #endif\n\n #if defined( USE_MORPHTARGETS ) && ! defined( USE_SKINNING )\n\n vec4 worldPosition = modelMatrix * vec4( morphed, 1.0 );\n\n #endif\n\n #if ! defined( USE_MORPHTARGETS ) && ! defined( USE_SKINNING )\n\n vec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n\n #endif\n\n#endif",THREE.ShaderChunk.shadowmap_pars_fragment="#ifdef USE_SHADOWMAP\n\n uniform sampler2D shadowMap[ MAX_SHADOWS ];\n uniform vec2 shadowMapSize[ MAX_SHADOWS ];\n\n uniform float shadowDarkness[ MAX_SHADOWS ];\n uniform float shadowBias[ MAX_SHADOWS ];\n\n varying vec4 vShadowCoord[ MAX_SHADOWS ];\n\n float unpackDepth( const in vec4 rgba_depth ) {\n\n const vec4 bit_shift = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );\n float depth = dot( rgba_depth, bit_shift );\n return depth;\n\n }\n\n#endif",THREE.ShaderChunk.skinning_pars_vertex="#ifdef USE_SKINNING\n\n uniform mat4 bindMatrix;\n uniform mat4 bindMatrixInverse;\n\n #ifdef BONE_TEXTURE\n\n uniform sampler2D boneTexture;\n uniform int boneTextureWidth;\n uniform int boneTextureHeight;\n\n mat4 getBoneMatrix( const in float i ) {\n\n float j = i * 4.0;\n float x = mod( j, float( boneTextureWidth ) );\n float y = floor( j / float( boneTextureWidth ) );\n\n float dx = 1.0 / float( boneTextureWidth );\n float dy = 1.0 / float( boneTextureHeight );\n\n y = dy * ( y + 0.5 );\n\n vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\n mat4 bone = mat4( v1, v2, v3, v4 );\n\n return bone;\n\n }\n\n #else\n\n uniform mat4 boneGlobalMatrices[ MAX_BONES ];\n\n mat4 getBoneMatrix( const in float i ) {\n\n mat4 bone = boneGlobalMatrices[ int(i) ];\n return bone;\n\n }\n\n #endif\n\n#endif\n",THREE.ShaderChunk.logdepthbuf_pars_fragment="#ifdef USE_LOGDEPTHBUF\n\n uniform float logDepthBufFC;\n\n #ifdef USE_LOGDEPTHBUF_EXT\n\n #extension GL_EXT_frag_depth : enable\n varying float vFragDepth;\n\n #endif\n\n#endif",THREE.ShaderChunk.alphamap_fragment="#ifdef USE_ALPHAMAP\n\n gl_FragColor.a *= texture2D( alphaMap, vUv ).g;\n\n#endif\n",THREE.ShaderChunk.alphamap_pars_fragment="#ifdef USE_ALPHAMAP\n\n uniform sampler2D alphaMap;\n\n#endif\n",THREE.UniformsUtils={merge:function(t){for(var e={},i=0;i<t.length;i++){var n,r=this.clone(t[i]);
  28. for(n in r)e[n]=r[n]}return e},clone:function(t){var e,i={};for(e in t){i[e]={};for(var n in t[e]){var r=t[e][n];i[e][n]=r instanceof THREE.Color||r instanceof THREE.Vector2||r instanceof THREE.Vector3||r instanceof THREE.Vector4||r instanceof THREE.Matrix4||r instanceof THREE.Texture?r.clone():r instanceof Array?r.slice():r}}return i}},THREE.UniformsLib={common:{diffuse:{type:"c",value:new THREE.Color(15658734)},opacity:{type:"f",value:1},map:{type:"t",value:null},offsetRepeat:{type:"v4",value:new THREE.Vector4(0,0,1,1)},lightMap:{type:"t",value:null},specularMap:{type:"t",value:null},alphaMap:{type:"t",value:null},envMap:{type:"t",value:null},flipEnvMap:{type:"f",value:-1},useRefract:{type:"i",value:0},reflectivity:{type:"f",value:1},refractionRatio:{type:"f",value:.98},combine:{type:"i",value:0},morphTargetInfluences:{type:"f",value:0}},bump:{bumpMap:{type:"t",value:null},bumpScale:{type:"f",value:1}},normalmap:{normalMap:{type:"t",value:null},normalScale:{type:"v2",value:new THREE.Vector2(1,1)}},fog:{fogDensity:{type:"f",value:25e-5},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},fogColor:{type:"c",value:new THREE.Color(16777215)}},lights:{ambientLightColor:{type:"fv",value:[]},directionalLightDirection:{type:"fv",value:[]},directionalLightColor:{type:"fv",value:[]},hemisphereLightDirection:{type:"fv",value:[]},hemisphereLightSkyColor:{type:"fv",value:[]},hemisphereLightGroundColor:{type:"fv",value:[]},pointLightColor:{type:"fv",value:[]},pointLightPosition:{type:"fv",value:[]},pointLightDistance:{type:"fv1",value:[]},spotLightColor:{type:"fv",value:[]},spotLightPosition:{type:"fv",value:[]},spotLightDirection:{type:"fv",value:[]},spotLightDistance:{type:"fv1",value:[]},spotLightAngleCos:{type:"fv1",value:[]},spotLightExponent:{type:"fv1",value:[]}},particle:{psColor:{type:"c",value:new THREE.Color(15658734)},opacity:{type:"f",value:1},size:{type:"f",value:1},scale:{type:"f",value:1},map:{type:"t",value:null},fogDensity:{type:"f",value:25e-5},fogNear:{type:"f",value:1},fogFar:{type:"f",value:2e3},fogColor:{type:"c",value:new THREE.Color(16777215)}},shadowmap:{shadowMap:{type:"tv",value:[]},shadowMapSize:{type:"v2v",value:[]},shadowBias:{type:"fv1",value:[]},shadowDarkness:{type:"fv1",value:[]},shadowMatrix:{type:"m4v",value:[]}}},THREE.ShaderLib={basic:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.common,THREE.UniformsLib.fog,THREE.UniformsLib.shadowmap]),vertexShader:[THREE.ShaderChunk.map_pars_vertex,THREE.ShaderChunk.lightmap_pars_vertex,THREE.ShaderChunk.envmap_pars_vertex,THREE.ShaderChunk.color_pars_vertex,THREE.ShaderChunk.morphtarget_pars_vertex,THREE.ShaderChunk.skinning_pars_vertex,THREE.ShaderChunk.shadowmap_pars_vertex,THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",THREE.ShaderChunk.map_vertex,THREE.ShaderChunk.lightmap_vertex,THREE.ShaderChunk.color_vertex,THREE.ShaderChunk.skinbase_vertex," #ifdef USE_ENVMAP",THREE.ShaderChunk.morphnormal_vertex,THREE.ShaderChunk.skinnormal_vertex,THREE.ShaderChunk.defaultnormal_vertex," #endif",THREE.ShaderChunk.morphtarget_vertex,THREE.ShaderChunk.skinning_vertex,THREE.ShaderChunk.default_vertex,THREE.ShaderChunk.logdepthbuf_vertex,THREE.ShaderChunk.worldpos_vertex,THREE.ShaderChunk.envmap_vertex,THREE.ShaderChunk.shadowmap_vertex,"}"].join("\n"),fragmentShader:["uniform vec3 diffuse;\nuniform float opacity;",THREE.ShaderChunk.color_pars_fragment,THREE.ShaderChunk.map_pars_fragment,THREE.ShaderChunk.alphamap_pars_fragment,THREE.ShaderChunk.lightmap_pars_fragment,THREE.ShaderChunk.envmap_pars_fragment,THREE.ShaderChunk.fog_pars_fragment,THREE.ShaderChunk.shadowmap_pars_fragment,THREE.ShaderChunk.specularmap_pars_fragment,THREE.ShaderChunk.logdepthbuf_pars_fragment,"void main() {\n gl_FragColor = vec4( diffuse, opacity );",THREE.ShaderChunk.logdepthbuf_fragment,THREE.ShaderChunk.map_fragment,THREE.ShaderChunk.alphamap_fragment,THREE.ShaderChunk.alphatest_fragment,THREE.ShaderChunk.specularmap_fragment,THREE.ShaderChunk.lightmap_fragment,THREE.ShaderChunk.color_fragment,THREE.ShaderChunk.envmap_fragment,THREE.ShaderChunk.shadowmap_fragment,THREE.ShaderChunk.linear_to_gamma_fragment,THREE.ShaderChunk.fog_fragment,"}"].join("\n")},lambert:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.common,THREE.UniformsLib.fog,THREE.UniformsLib.lights,THREE.UniformsLib.shadowmap,{ambient:{type:"c",value:new THREE.Color(16777215)},emissive:{type:"c",value:new THREE.Color(0)},wrapRGB:{type:"v3",value:new THREE.Vector3(1,1,1)}}]),vertexShader:["#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n varying vec3 vLightBack;\n#endif",THREE.ShaderChunk.map_pars_vertex,THREE.ShaderChunk.lightmap_pars_vertex,THREE.ShaderChunk.envmap_pars_vertex,THREE.ShaderChunk.lights_lambert_pars_vertex,THREE.ShaderChunk.color_pars_vertex,THREE.ShaderChunk.morphtarget_pars_vertex,THREE.ShaderChunk.skinning_pars_vertex,THREE.ShaderChunk.shadowmap_pars_vertex,THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",THREE.ShaderChunk.map_vertex,THREE.ShaderChunk.lightmap_vertex,THREE.ShaderChunk.color_vertex,THREE.ShaderChunk.morphnormal_vertex,THREE.ShaderChunk.skinbase_vertex,THREE.ShaderChunk.skinnormal_vertex,THREE.ShaderChunk.defaultnormal_vertex,THREE.ShaderChunk.morphtarget_vertex,THREE.ShaderChunk.skinning_vertex,THREE.ShaderChunk.default_vertex,THREE.ShaderChunk.logdepthbuf_vertex,THREE.ShaderChunk.worldpos_vertex,THREE.ShaderChunk.envmap_vertex,THREE.ShaderChunk.lights_lambert_vertex,THREE.ShaderChunk.shadowmap_vertex,"}"].join("\n"),fragmentShader:["uniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n varying vec3 vLightBack;\n#endif",THREE.ShaderChunk.color_pars_fragment,THREE.ShaderChunk.map_pars_fragment,THREE.ShaderChunk.alphamap_pars_fragment,THREE.ShaderChunk.lightmap_pars_fragment,THREE.ShaderChunk.envmap_pars_fragment,THREE.ShaderChunk.fog_pars_fragment,THREE.ShaderChunk.shadowmap_pars_fragment,THREE.ShaderChunk.specularmap_pars_fragment,THREE.ShaderChunk.logdepthbuf_pars_fragment,"void main() {\n gl_FragColor = vec4( vec3( 1.0 ), opacity );",THREE.ShaderChunk.logdepthbuf_fragment,THREE.ShaderChunk.map_fragment,THREE.ShaderChunk.alphamap_fragment,THREE.ShaderChunk.alphatest_fragment,THREE.ShaderChunk.specularmap_fragment," #ifdef DOUBLE_SIDED\n if ( gl_FrontFacing )\n gl_FragColor.xyz *= vLightFront;\n else\n gl_FragColor.xyz *= vLightBack;\n #else\n gl_FragColor.xyz *= vLightFront;\n #endif",THREE.ShaderChunk.lightmap_fragment,THREE.ShaderChunk.color_fragment,THREE.ShaderChunk.envmap_fragment,THREE.ShaderChunk.shadowmap_fragment,THREE.ShaderChunk.linear_to_gamma_fragment,THREE.ShaderChunk.fog_fragment,"}"].join("\n")},phong:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.common,THREE.UniformsLib.bump,THREE.UniformsLib.normalmap,THREE.UniformsLib.fog,THREE.UniformsLib.lights,THREE.UniformsLib.shadowmap,{ambient:{type:"c",value:new THREE.Color(16777215)},emissive:{type:"c",value:new THREE.Color(0)},specular:{type:"c",value:new THREE.Color(1118481)},shininess:{type:"f",value:30},wrapRGB:{type:"v3",value:new THREE.Vector3(1,1,1)}}]),vertexShader:["#define PHONG\nvarying vec3 vViewPosition;\nvarying vec3 vNormal;",THREE.ShaderChunk.map_pars_vertex,THREE.ShaderChunk.lightmap_pars_vertex,THREE.ShaderChunk.envmap_pars_vertex,THREE.ShaderChunk.lights_phong_pars_vertex,THREE.ShaderChunk.color_pars_vertex,THREE.ShaderChunk.morphtarget_pars_vertex,THREE.ShaderChunk.skinning_pars_vertex,THREE.ShaderChunk.shadowmap_pars_vertex,THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",THREE.ShaderChunk.map_vertex,THREE.ShaderChunk.lightmap_vertex,THREE.ShaderChunk.color_vertex,THREE.ShaderChunk.morphnormal_vertex,THREE.ShaderChunk.skinbase_vertex,THREE.ShaderChunk.skinnormal_vertex,THREE.ShaderChunk.defaultnormal_vertex," vNormal = normalize( transformedNormal );",THREE.ShaderChunk.morphtarget_vertex,THREE.ShaderChunk.skinning_vertex,THREE.ShaderChunk.default_vertex,THREE.ShaderChunk.logdepthbuf_vertex," vViewPosition = -mvPosition.xyz;",THREE.ShaderChunk.worldpos_vertex,THREE.ShaderChunk.envmap_vertex,THREE.ShaderChunk.lights_phong_vertex,THREE.ShaderChunk.shadowmap_vertex,"}"].join("\n"),fragmentShader:["#define PHONG\nuniform vec3 diffuse;\nuniform float opacity;\nuniform vec3 ambient;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;",THREE.ShaderChunk.color_pars_fragment,THREE.ShaderChunk.map_pars_fragment,THREE.ShaderChunk.alphamap_pars_fragment,THREE.ShaderChunk.lightmap_pars_fragment,THREE.ShaderChunk.envmap_pars_fragment,THREE.ShaderChunk.fog_pars_fragment,THREE.ShaderChunk.lights_phong_pars_fragment,THREE.ShaderChunk.shadowmap_pars_fragment,THREE.ShaderChunk.bumpmap_pars_fragment,THREE.ShaderChunk.normalmap_pars_fragment,THREE.ShaderChunk.specularmap_pars_fragment,THREE.ShaderChunk.logdepthbuf_pars_fragment,"void main() {\n gl_FragColor = vec4( vec3( 1.0 ), opacity );",THREE.ShaderChunk.logdepthbuf_fragment,THREE.ShaderChunk.map_fragment,THREE.ShaderChunk.alphamap_fragment,THREE.ShaderChunk.alphatest_fragment,THREE.ShaderChunk.specularmap_fragment,THREE.ShaderChunk.lights_phong_fragment,THREE.ShaderChunk.lightmap_fragment,THREE.ShaderChunk.color_fragment,THREE.ShaderChunk.envmap_fragment,THREE.ShaderChunk.shadowmap_fragment,THREE.ShaderChunk.linear_to_gamma_fragment,THREE.ShaderChunk.fog_fragment,"}"].join("\n")},particle_basic:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.particle,THREE.UniformsLib.shadowmap]),vertexShader:["uniform float size;\nuniform float scale;",THREE.ShaderChunk.color_pars_vertex,THREE.ShaderChunk.shadowmap_pars_vertex,THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",THREE.ShaderChunk.color_vertex," vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n #ifdef USE_SIZEATTENUATION\n gl_PointSize = size * ( scale / length( mvPosition.xyz ) );\n #else\n gl_PointSize = size;\n #endif\n gl_Position = projectionMatrix * mvPosition;",THREE.ShaderChunk.logdepthbuf_vertex,THREE.ShaderChunk.worldpos_vertex,THREE.ShaderChunk.shadowmap_vertex,"}"].join("\n"),fragmentShader:["uniform vec3 psColor;\nuniform float opacity;",THREE.ShaderChunk.color_pars_fragment,THREE.ShaderChunk.map_particle_pars_fragment,THREE.ShaderChunk.fog_pars_fragment,THREE.ShaderChunk.shadowmap_pars_fragment,THREE.ShaderChunk.logdepthbuf_pars_fragment,"void main() {\n gl_FragColor = vec4( psColor, opacity );",THREE.ShaderChunk.logdepthbuf_fragment,THREE.ShaderChunk.map_particle_fragment,THREE.ShaderChunk.alphatest_fragment,THREE.ShaderChunk.color_fragment,THREE.ShaderChunk.shadowmap_fragment,THREE.ShaderChunk.fog_fragment,"}"].join("\n")},dashed:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.common,THREE.UniformsLib.fog,{scale:{type:"f",value:1},dashSize:{type:"f",value:1},totalSize:{type:"f",value:2}}]),vertexShader:["uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;",THREE.ShaderChunk.color_pars_vertex,THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",THREE.ShaderChunk.color_vertex," vLineDistance = scale * lineDistance;\n vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * mvPosition;",THREE.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;",THREE.ShaderChunk.color_pars_fragment,THREE.ShaderChunk.fog_pars_fragment,THREE.ShaderChunk.logdepthbuf_pars_fragment,"void main() {\n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n discard;\n }\n gl_FragColor = vec4( diffuse, opacity );",THREE.ShaderChunk.logdepthbuf_fragment,THREE.ShaderChunk.color_fragment,THREE.ShaderChunk.fog_fragment,"}"].join("\n")},depth:{uniforms:{mNear:{type:"f",value:1},mFar:{type:"f",value:2e3},opacity:{type:"f",value:1}},vertexShader:[THREE.ShaderChunk.morphtarget_pars_vertex,THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",THREE.ShaderChunk.morphtarget_vertex,THREE.ShaderChunk.default_vertex,THREE.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform float mNear;\nuniform float mFar;\nuniform float opacity;",THREE.ShaderChunk.logdepthbuf_pars_fragment,"void main() {",THREE.ShaderChunk.logdepthbuf_fragment," #ifdef USE_LOGDEPTHBUF_EXT\n float depth = gl_FragDepthEXT / gl_FragCoord.w;\n #else\n float depth = gl_FragCoord.z / gl_FragCoord.w;\n #endif\n float color = 1.0 - smoothstep( mNear, mFar, depth );\n gl_FragColor = vec4( vec3( color ), opacity );\n}"].join("\n")},normal:{uniforms:{opacity:{type:"f",value:1}},vertexShader:["varying vec3 vNormal;",THREE.ShaderChunk.morphtarget_pars_vertex,THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {\n vNormal = normalize( normalMatrix * normal );",THREE.ShaderChunk.morphtarget_vertex,THREE.ShaderChunk.default_vertex,THREE.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform float opacity;\nvarying vec3 vNormal;",THREE.ShaderChunk.logdepthbuf_pars_fragment,"void main() {\n gl_FragColor = vec4( 0.5 * normalize( vNormal ) + 0.5, opacity );",THREE.ShaderChunk.logdepthbuf_fragment,"}"].join("\n")},normalmap:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.fog,THREE.UniformsLib.lights,THREE.UniformsLib.shadowmap,{enableAO:{type:"i",value:0},enableDiffuse:{type:"i",value:0},enableSpecular:{type:"i",value:0},enableReflection:{type:"i",value:0},enableDisplacement:{type:"i",value:0},tDisplacement:{type:"t",value:null},tDiffuse:{type:"t",value:null},tCube:{type:"t",value:null},tNormal:{type:"t",value:null},tSpecular:{type:"t",value:null},tAO:{type:"t",value:null},uNormalScale:{type:"v2",value:new THREE.Vector2(1,1)},uDisplacementBias:{type:"f",value:0},uDisplacementScale:{type:"f",value:1},diffuse:{type:"c",value:new THREE.Color(16777215)},specular:{type:"c",value:new THREE.Color(1118481)},ambient:{type:"c",value:new THREE.Color(16777215)},shininess:{type:"f",value:30},opacity:{type:"f",value:1},useRefract:{type:"i",value:0},refractionRatio:{type:"f",value:.98},reflectivity:{type:"f",value:.5},uOffset:{type:"v2",value:new THREE.Vector2(0,0)},uRepeat:{type:"v2",value:new THREE.Vector2(1,1)},wrapRGB:{type:"v3",value:new THREE.Vector3(1,1,1)}}]),fragmentShader:["uniform vec3 ambient;\nuniform vec3 diffuse;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\nuniform bool enableDiffuse;\nuniform bool enableSpecular;\nuniform bool enableAO;\nuniform bool enableReflection;\nuniform sampler2D tDiffuse;\nuniform sampler2D tNormal;\nuniform sampler2D tSpecular;\nuniform sampler2D tAO;\nuniform samplerCube tCube;\nuniform vec2 uNormalScale;\nuniform bool useRefract;\nuniform float refractionRatio;\nuniform float reflectivity;\nvarying vec3 vTangent;\nvarying vec3 vBinormal;\nvarying vec3 vNormal;\nvarying vec2 vUv;\nuniform vec3 ambientLightColor;\n#if MAX_DIR_LIGHTS > 0\n uniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ];\n uniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ];\n#endif\n#if MAX_HEMI_LIGHTS > 0\n uniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];\n uniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];\n uniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];\n#endif\n#if MAX_POINT_LIGHTS > 0\n uniform vec3 pointLightColor[ MAX_POINT_LIGHTS ];\n uniform vec3 pointLightPosition[ MAX_POINT_LIGHTS ];\n uniform float pointLightDistance[ MAX_POINT_LIGHTS ];\n#endif\n#if MAX_SPOT_LIGHTS > 0\n uniform vec3 spotLightColor[ MAX_SPOT_LIGHTS ];\n uniform vec3 spotLightPosition[ MAX_SPOT_LIGHTS ];\n uniform vec3 spotLightDirection[ MAX_SPOT_LIGHTS ];\n uniform float spotLightAngleCos[ MAX_SPOT_LIGHTS ];\n uniform float spotLightExponent[ MAX_SPOT_LIGHTS ];\n uniform float spotLightDistance[ MAX_SPOT_LIGHTS ];\n#endif\n#ifdef WRAP_AROUND\n uniform vec3 wrapRGB;\n#endif\nvarying vec3 vWorldPosition;\nvarying vec3 vViewPosition;",THREE.ShaderChunk.shadowmap_pars_fragment,THREE.ShaderChunk.fog_pars_fragment,THREE.ShaderChunk.logdepthbuf_pars_fragment,"void main() {",THREE.ShaderChunk.logdepthbuf_fragment," gl_FragColor = vec4( vec3( 1.0 ), opacity );\n vec3 specularTex = vec3( 1.0 );\n vec3 normalTex = texture2D( tNormal, vUv ).xyz * 2.0 - 1.0;\n normalTex.xy *= uNormalScale;\n normalTex = normalize( normalTex );\n if( enableDiffuse ) {\n #ifdef GAMMA_INPUT\n vec4 texelColor = texture2D( tDiffuse, vUv );\n texelColor.xyz *= texelColor.xyz;\n gl_FragColor = gl_FragColor * texelColor;\n #else\n gl_FragColor = gl_FragColor * texture2D( tDiffuse, vUv );\n #endif\n }\n if( enableAO ) {\n #ifdef GAMMA_INPUT\n vec4 aoColor = texture2D( tAO, vUv );\n aoColor.xyz *= aoColor.xyz;\n gl_FragColor.xyz = gl_FragColor.xyz * aoColor.xyz;\n #else\n gl_FragColor.xyz = gl_FragColor.xyz * texture2D( tAO, vUv ).xyz;\n #endif\n }",THREE.ShaderChunk.alphatest_fragment," if( enableSpecular )\n specularTex = texture2D( tSpecular, vUv ).xyz;\n mat3 tsb = mat3( normalize( vTangent ), normalize( vBinormal ), normalize( vNormal ) );\n vec3 finalNormal = tsb * normalTex;\n #ifdef FLIP_SIDED\n finalNormal = -finalNormal;\n #endif\n vec3 normal = normalize( finalNormal );\n vec3 viewPosition = normalize( vViewPosition );\n #if MAX_POINT_LIGHTS > 0\n vec3 pointDiffuse = vec3( 0.0 );\n vec3 pointSpecular = vec3( 0.0 );\n for ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {\n vec4 lPosition = viewMatrix * vec4( pointLightPosition[ i ], 1.0 );\n vec3 pointVector = lPosition.xyz + vViewPosition.xyz;\n float pointDistance = 1.0;\n if ( pointLightDistance[ i ] > 0.0 )\n pointDistance = 1.0 - min( ( length( pointVector ) / pointLightDistance[ i ] ), 1.0 );\n pointVector = normalize( pointVector );\n #ifdef WRAP_AROUND\n float pointDiffuseWeightFull = max( dot( normal, pointVector ), 0.0 );\n float pointDiffuseWeightHalf = max( 0.5 * dot( normal, pointVector ) + 0.5, 0.0 );\n vec3 pointDiffuseWeight = mix( vec3( pointDiffuseWeightFull ), vec3( pointDiffuseWeightHalf ), wrapRGB );\n #else\n float pointDiffuseWeight = max( dot( normal, pointVector ), 0.0 );\n #endif\n pointDiffuse += pointDistance * pointLightColor[ i ] * diffuse * pointDiffuseWeight;\n vec3 pointHalfVector = normalize( pointVector + viewPosition );\n float pointDotNormalHalf = max( dot( normal, pointHalfVector ), 0.0 );\n float pointSpecularWeight = specularTex.r * max( pow( pointDotNormalHalf, shininess ), 0.0 );\n float specularNormalization = ( shininess + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( pointVector, pointHalfVector ), 0.0 ), 5.0 );\n pointSpecular += schlick * pointLightColor[ i ] * pointSpecularWeight * pointDiffuseWeight * pointDistance * specularNormalization;\n }\n #endif\n #if MAX_SPOT_LIGHTS > 0\n vec3 spotDiffuse = vec3( 0.0 );\n vec3 spotSpecular = vec3( 0.0 );\n for ( int i = 0; i < MAX_SPOT_LIGHTS; i ++ ) {\n vec4 lPosition = viewMatrix * vec4( spotLightPosition[ i ], 1.0 );\n vec3 spotVector = lPosition.xyz + vViewPosition.xyz;\n float spotDistance = 1.0;\n if ( spotLightDistance[ i ] > 0.0 )\n spotDistance = 1.0 - min( ( length( spotVector ) / spotLightDistance[ i ] ), 1.0 );\n spotVector = normalize( spotVector );\n float spotEffect = dot( spotLightDirection[ i ], normalize( spotLightPosition[ i ] - vWorldPosition ) );\n if ( spotEffect > spotLightAngleCos[ i ] ) {\n spotEffect = max( pow( max( spotEffect, 0.0 ), spotLightExponent[ i ] ), 0.0 );\n #ifdef WRAP_AROUND\n float spotDiffuseWeightFull = max( dot( normal, spotVector ), 0.0 );\n float spotDiffuseWeightHalf = max( 0.5 * dot( normal, spotVector ) + 0.5, 0.0 );\n vec3 spotDiffuseWeight = mix( vec3( spotDiffuseWeightFull ), vec3( spotDiffuseWeightHalf ), wrapRGB );\n #else\n float spotDiffuseWeight = max( dot( normal, spotVector ), 0.0 );\n #endif\n spotDiffuse += spotDistance * spotLightColor[ i ] * diffuse * spotDiffuseWeight * spotEffect;\n vec3 spotHalfVector = normalize( spotVector + viewPosition );\n float spotDotNormalHalf = max( dot( normal, spotHalfVector ), 0.0 );\n float spotSpecularWeight = specularTex.r * max( pow( spotDotNormalHalf, shininess ), 0.0 );\n float specularNormalization = ( shininess + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( spotVector, spotHalfVector ), 0.0 ), 5.0 );\n spotSpecular += schlick * spotLightColor[ i ] * spotSpecularWeight * spotDiffuseWeight * spotDistance * specularNormalization * spotEffect;\n }\n }\n #endif\n #if MAX_DIR_LIGHTS > 0\n vec3 dirDiffuse = vec3( 0.0 );\n vec3 dirSpecular = vec3( 0.0 );\n for( int i = 0; i < MAX_DIR_LIGHTS; i++ ) {\n vec4 lDirection = viewMatrix * vec4( directionalLightDirection[ i ], 0.0 );\n vec3 dirVector = normalize( lDirection.xyz );\n #ifdef WRAP_AROUND\n float directionalLightWeightingFull = max( dot( normal, dirVector ), 0.0 );\n float directionalLightWeightingHalf = max( 0.5 * dot( normal, dirVector ) + 0.5, 0.0 );\n vec3 dirDiffuseWeight = mix( vec3( directionalLightWeightingFull ), vec3( directionalLightWeightingHalf ), wrapRGB );\n #else\n float dirDiffuseWeight = max( dot( normal, dirVector ), 0.0 );\n #endif\n dirDiffuse += directionalLightColor[ i ] * diffuse * dirDiffuseWeight;\n vec3 dirHalfVector = normalize( dirVector + viewPosition );\n float dirDotNormalHalf = max( dot( normal, dirHalfVector ), 0.0 );\n float dirSpecularWeight = specularTex.r * max( pow( dirDotNormalHalf, shininess ), 0.0 );\n float specularNormalization = ( shininess + 2.0 ) / 8.0;\n vec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( dirVector, dirHalfVector ), 0.0 ), 5.0 );\n dirSpecular += schlick * directionalLightColor[ i ] * dirSpecularWeight * dirDiffuseWeight * specularNormalization;\n }\n #endif\n #if MAX_HEMI_LIGHTS > 0\n vec3 hemiDiffuse = vec3( 0.0 );\n vec3 hemiSpecular = vec3( 0.0 );\n for( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {\n vec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );\n vec3 lVector = normalize( lDirection.xyz );\n float dotProduct = dot( normal, lVector );\n float hemiDiffuseWeight = 0.5 * dotProduct + 0.5;\n vec3 hemiColor = mix( hemisphereLightGroundColor[ i ], hemisphereLightSkyColor[ i ], hemiDiffuseWeight );\n hemiDiffuse += diffuse * hemiColor;\n vec3 hemiHalfVectorSky = normalize( lVector + viewPosition );\n float hemiDotNormalHalfSky = 0.5 * dot( normal, hemiHalfVectorSky ) + 0.5;\n float hemiSpecularWeightSky = specularTex.r * max( pow( max( hemiDotNormalHalfSky, 0.0 ), shininess ), 0.0 );\n vec3 lVectorGround = -lVector;\n vec3 hemiHalfVectorGround = normalize( lVectorGround + viewPosition );\n float hemiDotNormalHalfGround = 0.5 * dot( normal, hemiHalfVectorGround ) + 0.5;\n float hemiSpecularWeightGround = specularTex.r * max( pow( max( hemiDotNormalHalfGround, 0.0 ), shininess ), 0.0 );\n float dotProductGround = dot( normal, lVectorGround );\n float specularNormalization = ( shininess + 2.0 ) / 8.0;\n vec3 schlickSky = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, hemiHalfVectorSky ), 0.0 ), 5.0 );\n vec3 schlickGround = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVectorGround, hemiHalfVectorGround ), 0.0 ), 5.0 );\n hemiSpecular += hemiColor * specularNormalization * ( schlickSky * hemiSpecularWeightSky * max( dotProduct, 0.0 ) + schlickGround * hemiSpecularWeightGround * max( dotProductGround, 0.0 ) );\n }\n #endif\n vec3 totalDiffuse = vec3( 0.0 );\n vec3 totalSpecular = vec3( 0.0 );\n #if MAX_DIR_LIGHTS > 0\n totalDiffuse += dirDiffuse;\n totalSpecular += dirSpecular;\n #endif\n #if MAX_HEMI_LIGHTS > 0\n totalDiffuse += hemiDiffuse;\n totalSpecular += hemiSpecular;\n #endif\n #if MAX_POINT_LIGHTS > 0\n totalDiffuse += pointDiffuse;\n totalSpecular += pointSpecular;\n #endif\n #if MAX_SPOT_LIGHTS > 0\n totalDiffuse += spotDiffuse;\n totalSpecular += spotSpecular;\n #endif\n #ifdef METAL\n gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * ambient + totalSpecular );\n #else\n gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * ambient ) + totalSpecular;\n #endif\n if ( enableReflection ) {\n vec3 vReflect;\n vec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n if ( useRefract ) {\n vReflect = refract( cameraToVertex, normal, refractionRatio );\n } else {\n vReflect = reflect( cameraToVertex, normal );\n }\n vec4 cubeColor = textureCube( tCube, vec3( -vReflect.x, vReflect.yz ) );\n #ifdef GAMMA_INPUT\n cubeColor.xyz *= cubeColor.xyz;\n #endif\n gl_FragColor.xyz = mix( gl_FragColor.xyz, cubeColor.xyz, specularTex.r * reflectivity );\n }",THREE.ShaderChunk.shadowmap_fragment,THREE.ShaderChunk.linear_to_gamma_fragment,THREE.ShaderChunk.fog_fragment,"}"].join("\n"),vertexShader:["attribute vec4 tangent;\nuniform vec2 uOffset;\nuniform vec2 uRepeat;\nuniform bool enableDisplacement;\n#ifdef VERTEX_TEXTURES\n uniform sampler2D tDisplacement;\n uniform float uDisplacementScale;\n uniform float uDisplacementBias;\n#endif\nvarying vec3 vTangent;\nvarying vec3 vBinormal;\nvarying vec3 vNormal;\nvarying vec2 vUv;\nvarying vec3 vWorldPosition;\nvarying vec3 vViewPosition;",THREE.ShaderChunk.skinning_pars_vertex,THREE.ShaderChunk.shadowmap_pars_vertex,THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",THREE.ShaderChunk.skinbase_vertex,THREE.ShaderChunk.skinnormal_vertex," #ifdef USE_SKINNING\n vNormal = normalize( normalMatrix * skinnedNormal.xyz );\n vec4 skinnedTangent = skinMatrix * vec4( tangent.xyz, 0.0 );\n vTangent = normalize( normalMatrix * skinnedTangent.xyz );\n #else\n vNormal = normalize( normalMatrix * normal );\n vTangent = normalize( normalMatrix * tangent.xyz );\n #endif\n vBinormal = normalize( cross( vNormal, vTangent ) * tangent.w );\n vUv = uv * uRepeat + uOffset;\n vec3 displacedPosition;\n #ifdef VERTEX_TEXTURES\n if ( enableDisplacement ) {\n vec3 dv = texture2D( tDisplacement, uv ).xyz;\n float df = uDisplacementScale * dv.x + uDisplacementBias;\n displacedPosition = position + normalize( normal ) * df;\n } else {\n #ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( position, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n skinned = bindMatrixInverse * skinned;\n displacedPosition = skinned.xyz;\n #else\n displacedPosition = position;\n #endif\n }\n #else\n #ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( position, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n skinned = bindMatrixInverse * skinned;\n displacedPosition = skinned.xyz;\n #else\n displacedPosition = position;\n #endif\n #endif\n vec4 mvPosition = modelViewMatrix * vec4( displacedPosition, 1.0 );\n vec4 worldPosition = modelMatrix * vec4( displacedPosition, 1.0 );\n gl_Position = projectionMatrix * mvPosition;",THREE.ShaderChunk.logdepthbuf_vertex," vWorldPosition = worldPosition.xyz;\n vViewPosition = -mvPosition.xyz;\n #ifdef USE_SHADOWMAP\n for( int i = 0; i < MAX_SHADOWS; i ++ ) {\n vShadowCoord[ i ] = shadowMatrix[ i ] * worldPosition;\n }\n #endif\n}"].join("\n")},cube:{uniforms:{tCube:{type:"t",value:null},tFlip:{type:"f",value:-1}},vertexShader:["varying vec3 vWorldPosition;",THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {\n vec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n vWorldPosition = worldPosition.xyz;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",THREE.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform samplerCube tCube;\nuniform float tFlip;\nvarying vec3 vWorldPosition;",THREE.ShaderChunk.logdepthbuf_pars_fragment,"void main() {\n gl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );",THREE.ShaderChunk.logdepthbuf_fragment,"}"].join("\n")},depthRGBA:{uniforms:{},vertexShader:[THREE.ShaderChunk.morphtarget_pars_vertex,THREE.ShaderChunk.skinning_pars_vertex,THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",THREE.ShaderChunk.skinbase_vertex,THREE.ShaderChunk.morphtarget_vertex,THREE.ShaderChunk.skinning_vertex,THREE.ShaderChunk.default_vertex,THREE.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:[THREE.ShaderChunk.logdepthbuf_pars_fragment,"vec4 pack_depth( const in float depth ) {\n const vec4 bit_shift = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n const vec4 bit_mask = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n vec4 res = mod( depth * bit_shift * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );\n res -= res.xxyz * bit_mask;\n return res;\n}\nvoid main() {",THREE.ShaderChunk.logdepthbuf_fragment," #ifdef USE_LOGDEPTHBUF_EXT\n gl_FragData[ 0 ] = pack_depth( gl_FragDepthEXT );\n #else\n gl_FragData[ 0 ] = pack_depth( gl_FragCoord.z );\n #endif\n}"].join("\n")}},THREE.WebGLRenderer=function(t){function e(t){var e=t.geometry;t=t.material;var i=e.vertices.length;if(t.attributes){void 0===e.__webglCustomAttributesList&&(e.__webglCustomAttributesList=[]);for(var n in t.attributes){var r=t.attributes[n];if(!r.__webglInitialized||r.createUniqueBuffers){r.__webglInitialized=!0;var o=1;"v2"===r.type?o=2:"v3"===r.type?o=3:"v4"===r.type?o=4:"c"===r.type&&(o=3),r.size=o,r.array=new Float32Array(i*o),r.buffer=J.createBuffer(),r.buffer.belongsToAttribute=n,r.needsUpdate=!0}e.__webglCustomAttributesList.push(r)}}}function i(t,e){var i=e.geometry,r=t.faces3,o=3*r.length,s=1*r.length,a=3*r.length,r=n(e,t);t.__vertexArray=new Float32Array(3*o),t.__normalArray=new Float32Array(3*o),t.__colorArray=new Float32Array(3*o),t.__uvArray=new Float32Array(2*o),1<i.faceVertexUvs.length&&(t.__uv2Array=new Float32Array(2*o)),i.hasTangents&&(t.__tangentArray=new Float32Array(4*o)),e.geometry.skinWeights.length&&e.geometry.skinIndices.length&&(t.__skinIndexArray=new Float32Array(4*o),t.__skinWeightArray=new Float32Array(4*o)),i=null!==Fe.get("OES_element_index_uint")&&s>21845?Uint32Array:Uint16Array,t.__typeArray=i,t.__faceArray=new i(3*s),t.__lineArray=new i(2*a);var l;if(t.numMorphTargets)for(t.__morphTargetsArrays=[],i=0,l=t.numMorphTargets;l>i;i++)t.__morphTargetsArrays.push(new Float32Array(3*o));if(t.numMorphNormals)for(t.__morphNormalsArrays=[],i=0,l=t.numMorphNormals;l>i;i++)t.__morphNormalsArrays.push(new Float32Array(3*o));if(t.__webglFaceCount=3*s,t.__webglLineCount=2*a,r.attributes){void 0===t.__webglCustomAttributesList&&(t.__webglCustomAttributesList=[]);for(var h in r.attributes){var c,s=r.attributes[h],a={};for(c in s)a[c]=s[c];(!a.__webglInitialized||a.createUniqueBuffers)&&(a.__webglInitialized=!0,i=1,"v2"===a.type?i=2:"v3"===a.type?i=3:"v4"===a.type?i=4:"c"===a.type&&(i=3),a.size=i,a.array=new Float32Array(o*i),a.buffer=J.createBuffer(),a.buffer.belongsToAttribute=h,s.needsUpdate=!0,a.__original=s),t.__webglCustomAttributesList.push(a)}}t.__inittedArrays=!0}function n(t,e){return t.material instanceof THREE.MeshFaceMaterial?t.material.materials[e.materialIndex]:t.material}function r(t,e,i,n){i=i.attributes;var r=e.attributes;e=e.attributesKeys;for(var o=0,l=e.length;l>o;o++){var h=e[o],c=r[h];if(c>=0){var u=i[h];void 0!==u?(h=u.itemSize,J.bindBuffer(J.ARRAY_BUFFER,u.buffer),s(c),J.vertexAttribPointer(c,h,J.FLOAT,!1,0,n*h*4)):void 0!==t.defaultAttributeValues&&(2===t.defaultAttributeValues[h].length?J.vertexAttrib2fv(c,t.defaultAttributeValues[h]):3===t.defaultAttributeValues[h].length&&J.vertexAttrib3fv(c,t.defaultAttributeValues[h]))}}a()}function o(){for(var t=0,e=Re.length;e>t;t++)Re[t]=0}function s(t){Re[t]=1,0===Se[t]&&(J.enableVertexAttribArray(t),Se[t]=1)}function a(){for(var t=0,e=Se.length;e>t;t++)Se[t]!==Re[t]&&(J.disableVertexAttribArray(t),Se[t]=0)
  29. }function l(t,e){return t.material.id!==e.material.id?e.material.id-t.material.id:t.z!==e.z?e.z-t.z:t.id-e.id}function h(t,e){return t.z!==e.z?t.z-e.z:t.id-e.id}function c(t,e){return e[0]-t[0]}function u(t,r){if(!1!==r.visible){if(!(r instanceof THREE.Scene||r instanceof THREE.Group)){void 0===r.__webglInit&&(r.__webglInit=!0,r._modelViewMatrix=new THREE.Matrix4,r._normalMatrix=new THREE.Matrix3,r.addEventListener("removed",Qe));var o=r.geometry;if(void 0!==o&&void 0===o.__webglInit&&(o.__webglInit=!0,o.addEventListener("dispose",ti),!(o instanceof THREE.BufferGeometry)))if(r instanceof THREE.Mesh)m(t,r,o);else if(r instanceof THREE.Line){if(void 0===o.__webglVertexBuffer){o.__webglVertexBuffer=J.createBuffer(),o.__webglColorBuffer=J.createBuffer(),o.__webglLineDistanceBuffer=J.createBuffer(),Q.info.memory.geometries++;var s=o.vertices.length;o.__vertexArray=new Float32Array(3*s),o.__colorArray=new Float32Array(3*s),o.__lineDistanceArray=new Float32Array(1*s),o.__webglLineCount=s,e(r),o.verticesNeedUpdate=!0,o.colorsNeedUpdate=!0,o.lineDistancesNeedUpdate=!0}}else if(r instanceof THREE.PointCloud&&void 0===o.__webglVertexBuffer){o.__webglVertexBuffer=J.createBuffer(),o.__webglColorBuffer=J.createBuffer(),Q.info.memory.geometries++;var a=o.vertices.length;o.__vertexArray=new Float32Array(3*a),o.__colorArray=new Float32Array(3*a),o.__sortArray=[],o.__webglParticleCount=a,e(r),o.verticesNeedUpdate=!0,o.colorsNeedUpdate=!0}if(void 0===r.__webglActive)if(r.__webglActive=!0,r instanceof THREE.Mesh){if(o instanceof THREE.BufferGeometry)g(X,o,r);else if(o instanceof THREE.Geometry)for(var l=si[o.id],h=0,d=l.length;d>h;h++)g(X,l[h],r)}else r instanceof THREE.Line||r instanceof THREE.PointCloud?g(X,o,r):(r instanceof THREE.ImmediateRenderObject||r.immediateRenderCallback)&&Z.push({id:null,object:r,opaque:null,transparent:null,z:0});if(r instanceof THREE.Light)G.push(r);else if(r instanceof THREE.Sprite)$.push(r);else if(r instanceof THREE.LensFlare)K.push(r);else{var p=X[r.id];if(p&&(!1===r.frustumCulled||!0===Me.intersectsObject(r))){var f,E,b=r.geometry;if(b instanceof THREE.BufferGeometry)for(var _=b.attributes,T=b.attributesKeys,x=0,w=T.length;w>x;x++){var R=T[x],S=_[R];if(void 0===S.buffer&&(S.buffer=J.createBuffer(),S.needsUpdate=!0),!0===S.needsUpdate){var M="index"===R?J.ELEMENT_ARRAY_BUFFER:J.ARRAY_BUFFER;J.bindBuffer(M,S.buffer),J.bufferData(M,S.array,J.STATIC_DRAW),S.needsUpdate=!1}}else if(r instanceof THREE.Mesh){!0===b.groupsNeedUpdate&&m(t,r,b);for(var C=si[b.id],H=0,D=C.length;D>H;H++){var P=C[H];if(E=n(r,P),!0===b.groupsNeedUpdate&&i(P,r),f=E.attributes&&v(E),b.verticesNeedUpdate||b.morphTargetsNeedUpdate||b.elementsNeedUpdate||b.uvsNeedUpdate||b.normalsNeedUpdate||b.colorsNeedUpdate||b.tangentsNeedUpdate||f){var k=P,A=r,L=J.DYNAMIC_DRAW,I=!b.dynamic,F=E;if(k.__inittedArrays){var N=F&&void 0!==F.shading&&F.shading===THREE.SmoothShading,z=void 0,B=void 0,O=void 0,U=void 0,V=void 0,j=void 0,W=void 0,te=void 0,ee=void 0,ie=void 0,ne=void 0,re=void 0,oe=void 0,se=void 0,ae=void 0,le=void 0,he=void 0,ce=void 0,ue=void 0,de=void 0,pe=void 0,fe=void 0,me=void 0,ge=void 0,ve=void 0,ye=void 0,Ee=void 0,be=void 0,_e=void 0,Te=void 0,xe=void 0,we=void 0,Re=void 0,Se=void 0,Pe=void 0,ke=void 0,Ae=void 0,Le=void 0,Ie=void 0,Fe=void 0,Ne=0,ze=0,Be=0,Oe=0,Ue=0,Ve=0,je=0,We=0,Ge=0,Xe=0,Ze=0,Ye=0,qe=void 0,$e=k.__vertexArray,Ke=k.__uvArray,Je=k.__uv2Array,ei=k.__normalArray,ii=k.__tangentArray,ni=k.__colorArray,ri=k.__skinIndexArray,oi=k.__skinWeightArray,ai=k.__morphTargetsArrays,li=k.__morphNormalsArrays,hi=k.__webglCustomAttributesList,ci=void 0,ui=k.__faceArray,di=k.__lineArray,pi=A.geometry,fi=pi.elementsNeedUpdate,mi=pi.uvsNeedUpdate,gi=pi.normalsNeedUpdate,vi=pi.tangentsNeedUpdate,yi=pi.colorsNeedUpdate,Ei=pi.morphTargetsNeedUpdate,bi=pi.vertices,_i=k.faces3,Ti=pi.faces,xi=pi.faceVertexUvs[0],wi=pi.faceVertexUvs[1],Ri=pi.skinIndices,Si=pi.skinWeights,Mi=pi.morphTargets,Ci=pi.morphNormals;if(pi.verticesNeedUpdate){for(z=0,B=_i.length;B>z;z++)U=Ti[_i[z]],re=bi[U.a],oe=bi[U.b],se=bi[U.c],$e[ze]=re.x,$e[ze+1]=re.y,$e[ze+2]=re.z,$e[ze+3]=oe.x,$e[ze+4]=oe.y,$e[ze+5]=oe.z,$e[ze+6]=se.x,$e[ze+7]=se.y,$e[ze+8]=se.z,ze+=9;J.bindBuffer(J.ARRAY_BUFFER,k.__webglVertexBuffer),J.bufferData(J.ARRAY_BUFFER,$e,L)}if(Ei)for(Pe=0,ke=Mi.length;ke>Pe;Pe++){for(z=Ze=0,B=_i.length;B>z;z++)Ie=_i[z],U=Ti[Ie],re=Mi[Pe].vertices[U.a],oe=Mi[Pe].vertices[U.b],se=Mi[Pe].vertices[U.c],Ae=ai[Pe],Ae[Ze]=re.x,Ae[Ze+1]=re.y,Ae[Ze+2]=re.z,Ae[Ze+3]=oe.x,Ae[Ze+4]=oe.y,Ae[Ze+5]=oe.z,Ae[Ze+6]=se.x,Ae[Ze+7]=se.y,Ae[Ze+8]=se.z,F.morphNormals&&(N?(Fe=Ci[Pe].vertexNormals[Ie],ce=Fe.a,ue=Fe.b,de=Fe.c):de=ue=ce=Ci[Pe].faceNormals[Ie],Le=li[Pe],Le[Ze]=ce.x,Le[Ze+1]=ce.y,Le[Ze+2]=ce.z,Le[Ze+3]=ue.x,Le[Ze+4]=ue.y,Le[Ze+5]=ue.z,Le[Ze+6]=de.x,Le[Ze+7]=de.y,Le[Ze+8]=de.z),Ze+=9;J.bindBuffer(J.ARRAY_BUFFER,k.__webglMorphTargetsBuffers[Pe]),J.bufferData(J.ARRAY_BUFFER,ai[Pe],L),F.morphNormals&&(J.bindBuffer(J.ARRAY_BUFFER,k.__webglMorphNormalsBuffers[Pe]),J.bufferData(J.ARRAY_BUFFER,li[Pe],L))}if(Si.length){for(z=0,B=_i.length;B>z;z++)U=Ti[_i[z]],ge=Si[U.a],ve=Si[U.b],ye=Si[U.c],oi[Xe]=ge.x,oi[Xe+1]=ge.y,oi[Xe+2]=ge.z,oi[Xe+3]=ge.w,oi[Xe+4]=ve.x,oi[Xe+5]=ve.y,oi[Xe+6]=ve.z,oi[Xe+7]=ve.w,oi[Xe+8]=ye.x,oi[Xe+9]=ye.y,oi[Xe+10]=ye.z,oi[Xe+11]=ye.w,Ee=Ri[U.a],be=Ri[U.b],_e=Ri[U.c],ri[Xe]=Ee.x,ri[Xe+1]=Ee.y,ri[Xe+2]=Ee.z,ri[Xe+3]=Ee.w,ri[Xe+4]=be.x,ri[Xe+5]=be.y,ri[Xe+6]=be.z,ri[Xe+7]=be.w,ri[Xe+8]=_e.x,ri[Xe+9]=_e.y,ri[Xe+10]=_e.z,ri[Xe+11]=_e.w,Xe+=12;Xe>0&&(J.bindBuffer(J.ARRAY_BUFFER,k.__webglSkinIndicesBuffer),J.bufferData(J.ARRAY_BUFFER,ri,L),J.bindBuffer(J.ARRAY_BUFFER,k.__webglSkinWeightsBuffer),J.bufferData(J.ARRAY_BUFFER,oi,L))}if(yi){for(z=0,B=_i.length;B>z;z++)U=Ti[_i[z]],W=U.vertexColors,te=U.color,3===W.length&&F.vertexColors===THREE.VertexColors?(pe=W[0],fe=W[1],me=W[2]):me=fe=pe=te,ni[Ge]=pe.r,ni[Ge+1]=pe.g,ni[Ge+2]=pe.b,ni[Ge+3]=fe.r,ni[Ge+4]=fe.g,ni[Ge+5]=fe.b,ni[Ge+6]=me.r,ni[Ge+7]=me.g,ni[Ge+8]=me.b,Ge+=9;Ge>0&&(J.bindBuffer(J.ARRAY_BUFFER,k.__webglColorBuffer),J.bufferData(J.ARRAY_BUFFER,ni,L))}if(vi&&pi.hasTangents){for(z=0,B=_i.length;B>z;z++)U=Ti[_i[z]],ee=U.vertexTangents,ae=ee[0],le=ee[1],he=ee[2],ii[je]=ae.x,ii[je+1]=ae.y,ii[je+2]=ae.z,ii[je+3]=ae.w,ii[je+4]=le.x,ii[je+5]=le.y,ii[je+6]=le.z,ii[je+7]=le.w,ii[je+8]=he.x,ii[je+9]=he.y,ii[je+10]=he.z,ii[je+11]=he.w,je+=12;J.bindBuffer(J.ARRAY_BUFFER,k.__webglTangentBuffer),J.bufferData(J.ARRAY_BUFFER,ii,L)}if(gi){for(z=0,B=_i.length;B>z;z++)if(U=Ti[_i[z]],V=U.vertexNormals,j=U.normal,3===V.length&&N)for(Te=0;3>Te;Te++)we=V[Te],ei[Ve]=we.x,ei[Ve+1]=we.y,ei[Ve+2]=we.z,Ve+=3;else for(Te=0;3>Te;Te++)ei[Ve]=j.x,ei[Ve+1]=j.y,ei[Ve+2]=j.z,Ve+=3;J.bindBuffer(J.ARRAY_BUFFER,k.__webglNormalBuffer),J.bufferData(J.ARRAY_BUFFER,ei,L)}if(mi&&xi){for(z=0,B=_i.length;B>z;z++)if(O=_i[z],ie=xi[O],void 0!==ie)for(Te=0;3>Te;Te++)Re=ie[Te],Ke[Be]=Re.x,Ke[Be+1]=Re.y,Be+=2;Be>0&&(J.bindBuffer(J.ARRAY_BUFFER,k.__webglUVBuffer),J.bufferData(J.ARRAY_BUFFER,Ke,L))}if(mi&&wi){for(z=0,B=_i.length;B>z;z++)if(O=_i[z],ne=wi[O],void 0!==ne)for(Te=0;3>Te;Te++)Se=ne[Te],Je[Oe]=Se.x,Je[Oe+1]=Se.y,Oe+=2;Oe>0&&(J.bindBuffer(J.ARRAY_BUFFER,k.__webglUV2Buffer),J.bufferData(J.ARRAY_BUFFER,Je,L))}if(fi){for(z=0,B=_i.length;B>z;z++)ui[Ue]=Ne,ui[Ue+1]=Ne+1,ui[Ue+2]=Ne+2,Ue+=3,di[We]=Ne,di[We+1]=Ne+1,di[We+2]=Ne,di[We+3]=Ne+2,di[We+4]=Ne+1,di[We+5]=Ne+2,We+=6,Ne+=3;J.bindBuffer(J.ELEMENT_ARRAY_BUFFER,k.__webglFaceBuffer),J.bufferData(J.ELEMENT_ARRAY_BUFFER,ui,L),J.bindBuffer(J.ELEMENT_ARRAY_BUFFER,k.__webglLineBuffer),J.bufferData(J.ELEMENT_ARRAY_BUFFER,di,L)}if(hi)for(Te=0,xe=hi.length;xe>Te;Te++)if(ci=hi[Te],ci.__original.needsUpdate){if(Ye=0,1===ci.size){if(void 0===ci.boundTo||"vertices"===ci.boundTo)for(z=0,B=_i.length;B>z;z++)U=Ti[_i[z]],ci.array[Ye]=ci.value[U.a],ci.array[Ye+1]=ci.value[U.b],ci.array[Ye+2]=ci.value[U.c],Ye+=3;else if("faces"===ci.boundTo)for(z=0,B=_i.length;B>z;z++)qe=ci.value[_i[z]],ci.array[Ye]=qe,ci.array[Ye+1]=qe,ci.array[Ye+2]=qe,Ye+=3}else if(2===ci.size){if(void 0===ci.boundTo||"vertices"===ci.boundTo)for(z=0,B=_i.length;B>z;z++)U=Ti[_i[z]],re=ci.value[U.a],oe=ci.value[U.b],se=ci.value[U.c],ci.array[Ye]=re.x,ci.array[Ye+1]=re.y,ci.array[Ye+2]=oe.x,ci.array[Ye+3]=oe.y,ci.array[Ye+4]=se.x,ci.array[Ye+5]=se.y,Ye+=6;else if("faces"===ci.boundTo)for(z=0,B=_i.length;B>z;z++)se=oe=re=qe=ci.value[_i[z]],ci.array[Ye]=re.x,ci.array[Ye+1]=re.y,ci.array[Ye+2]=oe.x,ci.array[Ye+3]=oe.y,ci.array[Ye+4]=se.x,ci.array[Ye+5]=se.y,Ye+=6}else if(3===ci.size){var Hi;if(Hi="c"===ci.type?["r","g","b"]:["x","y","z"],void 0===ci.boundTo||"vertices"===ci.boundTo)for(z=0,B=_i.length;B>z;z++)U=Ti[_i[z]],re=ci.value[U.a],oe=ci.value[U.b],se=ci.value[U.c],ci.array[Ye]=re[Hi[0]],ci.array[Ye+1]=re[Hi[1]],ci.array[Ye+2]=re[Hi[2]],ci.array[Ye+3]=oe[Hi[0]],ci.array[Ye+4]=oe[Hi[1]],ci.array[Ye+5]=oe[Hi[2]],ci.array[Ye+6]=se[Hi[0]],ci.array[Ye+7]=se[Hi[1]],ci.array[Ye+8]=se[Hi[2]],Ye+=9;else if("faces"===ci.boundTo)for(z=0,B=_i.length;B>z;z++)se=oe=re=qe=ci.value[_i[z]],ci.array[Ye]=re[Hi[0]],ci.array[Ye+1]=re[Hi[1]],ci.array[Ye+2]=re[Hi[2]],ci.array[Ye+3]=oe[Hi[0]],ci.array[Ye+4]=oe[Hi[1]],ci.array[Ye+5]=oe[Hi[2]],ci.array[Ye+6]=se[Hi[0]],ci.array[Ye+7]=se[Hi[1]],ci.array[Ye+8]=se[Hi[2]],Ye+=9;else if("faceVertices"===ci.boundTo)for(z=0,B=_i.length;B>z;z++)qe=ci.value[_i[z]],re=qe[0],oe=qe[1],se=qe[2],ci.array[Ye]=re[Hi[0]],ci.array[Ye+1]=re[Hi[1]],ci.array[Ye+2]=re[Hi[2]],ci.array[Ye+3]=oe[Hi[0]],ci.array[Ye+4]=oe[Hi[1]],ci.array[Ye+5]=oe[Hi[2]],ci.array[Ye+6]=se[Hi[0]],ci.array[Ye+7]=se[Hi[1]],ci.array[Ye+8]=se[Hi[2]],Ye+=9}else if(4===ci.size)if(void 0===ci.boundTo||"vertices"===ci.boundTo)for(z=0,B=_i.length;B>z;z++)U=Ti[_i[z]],re=ci.value[U.a],oe=ci.value[U.b],se=ci.value[U.c],ci.array[Ye]=re.x,ci.array[Ye+1]=re.y,ci.array[Ye+2]=re.z,ci.array[Ye+3]=re.w,ci.array[Ye+4]=oe.x,ci.array[Ye+5]=oe.y,ci.array[Ye+6]=oe.z,ci.array[Ye+7]=oe.w,ci.array[Ye+8]=se.x,ci.array[Ye+9]=se.y,ci.array[Ye+10]=se.z,ci.array[Ye+11]=se.w,Ye+=12;else if("faces"===ci.boundTo)for(z=0,B=_i.length;B>z;z++)se=oe=re=qe=ci.value[_i[z]],ci.array[Ye]=re.x,ci.array[Ye+1]=re.y,ci.array[Ye+2]=re.z,ci.array[Ye+3]=re.w,ci.array[Ye+4]=oe.x,ci.array[Ye+5]=oe.y,ci.array[Ye+6]=oe.z,ci.array[Ye+7]=oe.w,ci.array[Ye+8]=se.x,ci.array[Ye+9]=se.y,ci.array[Ye+10]=se.z,ci.array[Ye+11]=se.w,Ye+=12;else if("faceVertices"===ci.boundTo)for(z=0,B=_i.length;B>z;z++)qe=ci.value[_i[z]],re=qe[0],oe=qe[1],se=qe[2],ci.array[Ye]=re.x,ci.array[Ye+1]=re.y,ci.array[Ye+2]=re.z,ci.array[Ye+3]=re.w,ci.array[Ye+4]=oe.x,ci.array[Ye+5]=oe.y,ci.array[Ye+6]=oe.z,ci.array[Ye+7]=oe.w,ci.array[Ye+8]=se.x,ci.array[Ye+9]=se.y,ci.array[Ye+10]=se.z,ci.array[Ye+11]=se.w,Ye+=12;J.bindBuffer(J.ARRAY_BUFFER,ci.buffer),J.bufferData(J.ARRAY_BUFFER,ci.array,L)}I&&(delete k.__inittedArrays,delete k.__colorArray,delete k.__normalArray,delete k.__tangentArray,delete k.__uvArray,delete k.__uv2Array,delete k.__faceArray,delete k.__vertexArray,delete k.__lineArray,delete k.__skinIndexArray,delete k.__skinWeightArray)}}}b.verticesNeedUpdate=!1,b.morphTargetsNeedUpdate=!1,b.elementsNeedUpdate=!1,b.uvsNeedUpdate=!1,b.normalsNeedUpdate=!1,b.colorsNeedUpdate=!1,b.tangentsNeedUpdate=!1,E.attributes&&y(E)}else if(r instanceof THREE.Line){if(E=n(r,b),f=E.attributes&&v(E),b.verticesNeedUpdate||b.colorsNeedUpdate||b.lineDistancesNeedUpdate||f){var Di,Pi,ki,Ai,Li,Ii,Fi,Ni,zi,Bi,Oi,Ui,Vi=J.DYNAMIC_DRAW,ji=b.vertices,Wi=b.colors,Gi=b.lineDistances,Xi=ji.length,Zi=Wi.length,Yi=Gi.length,qi=b.__vertexArray,$i=b.__colorArray,Ki=b.__lineDistanceArray,Ji=b.colorsNeedUpdate,Qi=b.lineDistancesNeedUpdate,tn=b.__webglCustomAttributesList;if(b.verticesNeedUpdate){for(Di=0;Xi>Di;Di++)Ai=ji[Di],Li=3*Di,qi[Li]=Ai.x,qi[Li+1]=Ai.y,qi[Li+2]=Ai.z;J.bindBuffer(J.ARRAY_BUFFER,b.__webglVertexBuffer),J.bufferData(J.ARRAY_BUFFER,qi,Vi)}if(Ji){for(Pi=0;Zi>Pi;Pi++)Ii=Wi[Pi],Li=3*Pi,$i[Li]=Ii.r,$i[Li+1]=Ii.g,$i[Li+2]=Ii.b;J.bindBuffer(J.ARRAY_BUFFER,b.__webglColorBuffer),J.bufferData(J.ARRAY_BUFFER,$i,Vi)}if(Qi){for(ki=0;Yi>ki;ki++)Ki[ki]=Gi[ki];J.bindBuffer(J.ARRAY_BUFFER,b.__webglLineDistanceBuffer),J.bufferData(J.ARRAY_BUFFER,Ki,Vi)}if(tn)for(Fi=0,Ni=tn.length;Ni>Fi;Fi++)if(Ui=tn[Fi],Ui.needsUpdate&&(void 0===Ui.boundTo||"vertices"===Ui.boundTo)){if(Li=0,Bi=Ui.value.length,1===Ui.size)for(zi=0;Bi>zi;zi++)Ui.array[zi]=Ui.value[zi];else if(2===Ui.size)for(zi=0;Bi>zi;zi++)Oi=Ui.value[zi],Ui.array[Li]=Oi.x,Ui.array[Li+1]=Oi.y,Li+=2;else if(3===Ui.size)if("c"===Ui.type)for(zi=0;Bi>zi;zi++)Oi=Ui.value[zi],Ui.array[Li]=Oi.r,Ui.array[Li+1]=Oi.g,Ui.array[Li+2]=Oi.b,Li+=3;else for(zi=0;Bi>zi;zi++)Oi=Ui.value[zi],Ui.array[Li]=Oi.x,Ui.array[Li+1]=Oi.y,Ui.array[Li+2]=Oi.z,Li+=3;else if(4===Ui.size)for(zi=0;Bi>zi;zi++)Oi=Ui.value[zi],Ui.array[Li]=Oi.x,Ui.array[Li+1]=Oi.y,Ui.array[Li+2]=Oi.z,Ui.array[Li+3]=Oi.w,Li+=4;J.bindBuffer(J.ARRAY_BUFFER,Ui.buffer),J.bufferData(J.ARRAY_BUFFER,Ui.array,Vi)}}b.verticesNeedUpdate=!1,b.colorsNeedUpdate=!1,b.lineDistancesNeedUpdate=!1,E.attributes&&y(E)}else if(r instanceof THREE.PointCloud){if(E=n(r,b),f=E.attributes&&v(E),b.verticesNeedUpdate||b.colorsNeedUpdate||r.sortParticles||f){var en,nn,rn,on,sn,an,ln,hn,cn,un,dn,pn,fn=J.DYNAMIC_DRAW,mn=b.vertices,gn=mn.length,vn=b.colors,yn=vn.length,En=b.__vertexArray,bn=b.__colorArray,_n=b.__sortArray,Tn=b.verticesNeedUpdate,xn=b.colorsNeedUpdate,wn=b.__webglCustomAttributesList;if(r.sortParticles){for(He.copy(Ce),He.multiply(r.matrixWorld),en=0;gn>en;en++)rn=mn[en],De.copy(rn),De.applyProjection(He),_n[en]=[De.z,en];for(_n.sort(c),en=0;gn>en;en++)rn=mn[_n[en][1]],on=3*en,En[on]=rn.x,En[on+1]=rn.y,En[on+2]=rn.z;for(nn=0;yn>nn;nn++)on=3*nn,an=vn[_n[nn][1]],bn[on]=an.r,bn[on+1]=an.g,bn[on+2]=an.b;if(wn)for(ln=0,hn=wn.length;hn>ln;ln++)if(pn=wn[ln],void 0===pn.boundTo||"vertices"===pn.boundTo)if(on=0,un=pn.value.length,1===pn.size)for(cn=0;un>cn;cn++)sn=_n[cn][1],pn.array[cn]=pn.value[sn];else if(2===pn.size)for(cn=0;un>cn;cn++)sn=_n[cn][1],dn=pn.value[sn],pn.array[on]=dn.x,pn.array[on+1]=dn.y,on+=2;else if(3===pn.size)if("c"===pn.type)for(cn=0;un>cn;cn++)sn=_n[cn][1],dn=pn.value[sn],pn.array[on]=dn.r,pn.array[on+1]=dn.g,pn.array[on+2]=dn.b,on+=3;else for(cn=0;un>cn;cn++)sn=_n[cn][1],dn=pn.value[sn],pn.array[on]=dn.x,pn.array[on+1]=dn.y,pn.array[on+2]=dn.z,on+=3;else if(4===pn.size)for(cn=0;un>cn;cn++)sn=_n[cn][1],dn=pn.value[sn],pn.array[on]=dn.x,pn.array[on+1]=dn.y,pn.array[on+2]=dn.z,pn.array[on+3]=dn.w,on+=4}else{if(Tn)for(en=0;gn>en;en++)rn=mn[en],on=3*en,En[on]=rn.x,En[on+1]=rn.y,En[on+2]=rn.z;if(xn)for(nn=0;yn>nn;nn++)an=vn[nn],on=3*nn,bn[on]=an.r,bn[on+1]=an.g,bn[on+2]=an.b;if(wn)for(ln=0,hn=wn.length;hn>ln;ln++)if(pn=wn[ln],pn.needsUpdate&&(void 0===pn.boundTo||"vertices"===pn.boundTo))if(un=pn.value.length,on=0,1===pn.size)for(cn=0;un>cn;cn++)pn.array[cn]=pn.value[cn];else if(2===pn.size)for(cn=0;un>cn;cn++)dn=pn.value[cn],pn.array[on]=dn.x,pn.array[on+1]=dn.y,on+=2;else if(3===pn.size)if("c"===pn.type)for(cn=0;un>cn;cn++)dn=pn.value[cn],pn.array[on]=dn.r,pn.array[on+1]=dn.g,pn.array[on+2]=dn.b,on+=3;else for(cn=0;un>cn;cn++)dn=pn.value[cn],pn.array[on]=dn.x,pn.array[on+1]=dn.y,pn.array[on+2]=dn.z,on+=3;else if(4===pn.size)for(cn=0;un>cn;cn++)dn=pn.value[cn],pn.array[on]=dn.x,pn.array[on+1]=dn.y,pn.array[on+2]=dn.z,pn.array[on+3]=dn.w,on+=4}if((Tn||r.sortParticles)&&(J.bindBuffer(J.ARRAY_BUFFER,b.__webglVertexBuffer),J.bufferData(J.ARRAY_BUFFER,En,fn)),(xn||r.sortParticles)&&(J.bindBuffer(J.ARRAY_BUFFER,b.__webglColorBuffer),J.bufferData(J.ARRAY_BUFFER,bn,fn)),wn)for(ln=0,hn=wn.length;hn>ln;ln++)pn=wn[ln],(pn.needsUpdate||r.sortParticles)&&(J.bindBuffer(J.ARRAY_BUFFER,pn.buffer),J.bufferData(J.ARRAY_BUFFER,pn.array,fn))}b.verticesNeedUpdate=!1,b.colorsNeedUpdate=!1,E.attributes&&y(E)}for(var Rn=0,Sn=p.length;Sn>Rn;Rn++){var Mn=p[Rn],Cn=Mn,Hn=Cn.object,Dn=Cn.buffer,Pn=Hn.geometry,kn=Hn.material;kn instanceof THREE.MeshFaceMaterial?(kn=kn.materials[Pn instanceof THREE.BufferGeometry?0:Dn.materialIndex],Cn.material=kn,kn.transparent?q.push(Cn):Y.push(Cn)):kn&&(Cn.material=kn,kn.transparent?q.push(Cn):Y.push(Cn)),Mn.render=!0,!0===Q.sortObjects&&(null!==r.renderDepth?Mn.z=r.renderDepth:(De.setFromMatrixPosition(r.matrixWorld),De.applyProjection(Ce),Mn.z=De.z))}}}}for(Rn=0,Sn=r.children.length;Sn>Rn;Rn++)u(t,r.children[Rn])}}function d(t,e,i,n,r,o){for(var s,a=t.length-1;-1!==a;a--){s=t[a];var l=s.object,h=s.buffer;if(T(l,e),o)s=o;else{if(s=s.material,!s)continue;r&&Q.setBlending(s.blending,s.blendEquation,s.blendSrc,s.blendDst),Q.setDepthTest(s.depthTest),Q.setDepthWrite(s.depthWrite),S(s.polygonOffset,s.polygonOffsetFactor,s.polygonOffsetUnits)}Q.setMaterialFaces(s),h instanceof THREE.BufferGeometry?Q.renderBufferDirect(e,i,n,s,h,l):Q.renderBuffer(e,i,n,s,h,l)}}function p(t,e,i,n,r,o,s){for(var a,l=0,h=t.length;h>l;l++){a=t[l];var c=a.object;if(c.visible){if(s)a=s;else{if(a=a[e],!a)continue;o&&Q.setBlending(a.blending,a.blendEquation,a.blendSrc,a.blendDst),Q.setDepthTest(a.depthTest),Q.setDepthWrite(a.depthWrite),S(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)}Q.renderImmediateObject(i,n,r,a,c)}}}function f(t){var e=t.object.material;e.transparent?(t.transparent=e,t.opaque=null):(t.opaque=e,t.transparent=null)}function m(t,e,n){var r=e.material,o=!1;if(void 0===si[n.id]||!0===n.groupsNeedUpdate){delete X[e.id],t=si;for(var s,a,l=n.id,r=r instanceof THREE.MeshFaceMaterial,h=Fe.get("OES_element_index_uint")?4294967296:65535,o={},c=n.morphTargets.length,u=n.morphNormals.length,d={},p=[],f=0,m=n.faces.length;m>f;f++){s=n.faces[f];var v=r?s.materialIndex:0;v in o||(o[v]={hash:v,counter:0}),s=o[v].hash+"_"+o[v].counter,s in d||(a={id:ai++,faces3:[],materialIndex:v,vertices:0,numMorphTargets:c,numMorphNormals:u},d[s]=a,p.push(a)),d[s].vertices+3>h&&(o[v].counter+=1,s=o[v].hash+"_"+o[v].counter,s in d||(a={id:ai++,faces3:[],materialIndex:v,vertices:0,numMorphTargets:c,numMorphNormals:u},d[s]=a,p.push(a))),d[s].faces3.push(f),d[s].vertices+=3}t[l]=p,n.groupsNeedUpdate=!1}for(t=si[n.id],l=0,r=t.length;r>l;l++){if(h=t[l],void 0===h.__webglVertexBuffer){if(o=h,o.__webglVertexBuffer=J.createBuffer(),o.__webglNormalBuffer=J.createBuffer(),o.__webglTangentBuffer=J.createBuffer(),o.__webglColorBuffer=J.createBuffer(),o.__webglUVBuffer=J.createBuffer(),o.__webglUV2Buffer=J.createBuffer(),o.__webglSkinIndicesBuffer=J.createBuffer(),o.__webglSkinWeightsBuffer=J.createBuffer(),o.__webglFaceBuffer=J.createBuffer(),o.__webglLineBuffer=J.createBuffer(),u=c=void 0,o.numMorphTargets)for(o.__webglMorphTargetsBuffers=[],c=0,u=o.numMorphTargets;u>c;c++)o.__webglMorphTargetsBuffers.push(J.createBuffer());if(o.numMorphNormals)for(o.__webglMorphNormalsBuffers=[],c=0,u=o.numMorphNormals;u>c;c++)o.__webglMorphNormalsBuffers.push(J.createBuffer());Q.info.memory.geometries++,i(h,e),n.verticesNeedUpdate=!0,n.morphTargetsNeedUpdate=!0,n.elementsNeedUpdate=!0,n.uvsNeedUpdate=!0,n.normalsNeedUpdate=!0,n.tangentsNeedUpdate=!0,o=n.colorsNeedUpdate=!0}else o=!1;(o||void 0===e.__webglActive)&&g(X,h,e)}e.__webglActive=!0}function g(t,e,i){var n=i.id;t[n]=t[n]||[],t[n].push({id:n,buffer:e,object:i,material:null,z:0})}function v(t){for(var e in t.attributes)if(t.attributes[e].needsUpdate)return!0;return!1}function y(t){for(var e in t.attributes)t.attributes[e].needsUpdate=!1}function E(t,e,i,n,r){var o,s,a,l;if(se=0,n.needsUpdate){n.program&&oi(n),n.addEventListener("dispose",ni);var h;if(n instanceof THREE.MeshDepthMaterial?h="depth":n instanceof THREE.MeshNormalMaterial?h="normal":n instanceof THREE.MeshBasicMaterial?h="basic":n instanceof THREE.MeshLambertMaterial?h="lambert":n instanceof THREE.MeshPhongMaterial?h="phong":n instanceof THREE.LineBasicMaterial?h="basic":n instanceof THREE.LineDashedMaterial?h="dashed":n instanceof THREE.PointCloudMaterial&&(h="particle_basic"),h){var c=THREE.ShaderLib[h];n.__webglShader={uniforms:THREE.UniformsUtils.clone(c.uniforms),vertexShader:c.vertexShader,fragmentShader:c.fragmentShader}}else n.__webglShader={uniforms:n.uniforms,vertexShader:n.vertexShader,fragmentShader:n.fragmentShader};for(var u=0,d=0,p=0,f=0,m=0,g=e.length;g>m;m++){var v=e[m];v.onlyShadow||!1===v.visible||(v instanceof THREE.DirectionalLight&&u++,v instanceof THREE.PointLight&&d++,v instanceof THREE.SpotLight&&p++,v instanceof THREE.HemisphereLight&&f++)}o=u,s=d,a=p,l=f;for(var y,E=0,T=0,R=e.length;R>T;T++){var S=e[T];S.castShadow&&(S instanceof THREE.SpotLight&&E++,S instanceof THREE.DirectionalLight&&!S.shadowCascade&&E++)}y=E;var H;if(Ve&&r&&r.skeleton&&r.skeleton.useVertexTexture)H=1024;else{var D=J.getParameter(J.MAX_VERTEX_UNIFORM_VECTORS),P=Math.floor((D-20)/4);void 0!==r&&r instanceof THREE.SkinnedMesh&&(P=Math.min(r.skeleton.bones.length,P),P<r.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+r.skeleton.bones.length+", this GPU supports just "+P+" (try OpenGL instead of ANGLE)")),H=P}var L={precision:I,supportsVertexTextures:Ue,map:!!n.map,envMap:!!n.envMap,lightMap:!!n.lightMap,bumpMap:!!n.bumpMap,normalMap:!!n.normalMap,specularMap:!!n.specularMap,alphaMap:!!n.alphaMap,vertexColors:n.vertexColors,fog:i,useFog:n.fog,fogExp:i instanceof THREE.FogExp2,sizeAttenuation:n.sizeAttenuation,logarithmicDepthBuffer:V,skinning:n.skinning,maxBones:H,useVertexTexture:Ve&&r&&r.skeleton&&r.skeleton.useVertexTexture,morphTargets:n.morphTargets,morphNormals:n.morphNormals,maxMorphTargets:Q.maxMorphTargets,maxMorphNormals:Q.maxMorphNormals,maxDirLights:o,maxPointLights:s,maxSpotLights:a,maxHemiLights:l,maxShadows:y,shadowMapEnabled:Q.shadowMapEnabled&&r.receiveShadow&&y>0,shadowMapType:Q.shadowMapType,shadowMapDebug:Q.shadowMapDebug,shadowMapCascade:Q.shadowMapCascade,alphaTest:n.alphaTest,metal:n.metal,wrapAround:n.wrapAround,doubleSided:n.side===THREE.DoubleSide,flipSided:n.side===THREE.BackSide},F=[];if(h?F.push(h):(F.push(n.fragmentShader),F.push(n.vertexShader)),void 0!==n.defines)for(var N in n.defines)F.push(N),F.push(n.defines[N]);for(N in L)F.push(N),F.push(L[N]);for(var z,B=F.join(),O=0,U=te.length;U>O;O++){var j=te[O];if(j.code===B){z=j,z.usedTimes++;break}}void 0===z&&(z=new THREE.WebGLProgram(Q,B,n,L),te.push(z),Q.info.memory.programs=te.length),n.program=z;var W=z.attributes;if(n.morphTargets){n.numSupportedMorphTargets=0;for(var G,X="morphTarget",Z=0;Z<Q.maxMorphTargets;Z++)G=X+Z,0<=W[G]&&n.numSupportedMorphTargets++}if(n.morphNormals)for(n.numSupportedMorphNormals=0,X="morphNormal",Z=0;Z<Q.maxMorphNormals;Z++)G=X+Z,0<=W[G]&&n.numSupportedMorphNormals++;n.uniformsList=[];for(var Y in n.__webglShader.uniforms){var q=n.program.uniforms[Y];q&&n.uniformsList.push([n.__webglShader.uniforms[Y],q])}n.needsUpdate=!1}n.morphTargets&&!r.__webglMorphTargetInfluences&&(r.__webglMorphTargetInfluences=new Float32Array(Q.maxMorphTargets));var $=!1,K=!1,ie=!1,re=n.program,ae=re.uniforms,le=n.__webglShader.uniforms;if(re.id!==ee&&(J.useProgram(re.program),ee=re.id,ie=K=$=!0),n.id!==ne&&(-1===ne&&(ie=!0),ne=n.id,K=!0),($||t!==oe)&&(J.uniformMatrix4fv(ae.projectionMatrix,!1,t.projectionMatrix.elements),V&&J.uniform1f(ae.logDepthBufFC,2/(Math.log(t.far+1)/Math.LN2)),t!==oe&&(oe=t),(n instanceof THREE.ShaderMaterial||n instanceof THREE.MeshPhongMaterial||n.envMap)&&null!==ae.cameraPosition&&(De.setFromMatrixPosition(t.matrixWorld),J.uniform3f(ae.cameraPosition,De.x,De.y,De.z)),(n instanceof THREE.MeshPhongMaterial||n instanceof THREE.MeshLambertMaterial||n instanceof THREE.ShaderMaterial||n.skinning)&&null!==ae.viewMatrix&&J.uniformMatrix4fv(ae.viewMatrix,!1,t.matrixWorldInverse.elements)),n.skinning)if(r.bindMatrix&&null!==ae.bindMatrix&&J.uniformMatrix4fv(ae.bindMatrix,!1,r.bindMatrix.elements),r.bindMatrixInverse&&null!==ae.bindMatrixInverse&&J.uniformMatrix4fv(ae.bindMatrixInverse,!1,r.bindMatrixInverse.elements),Ve&&r.skeleton&&r.skeleton.useVertexTexture){if(null!==ae.boneTexture){var he=_();J.uniform1i(ae.boneTexture,he),Q.setTexture(r.skeleton.boneTexture,he)}null!==ae.boneTextureWidth&&J.uniform1i(ae.boneTextureWidth,r.skeleton.boneTextureWidth),null!==ae.boneTextureHeight&&J.uniform1i(ae.boneTextureHeight,r.skeleton.boneTextureHeight)}else r.skeleton&&r.skeleton.boneMatrices&&null!==ae.boneGlobalMatrices&&J.uniformMatrix4fv(ae.boneGlobalMatrices,!1,r.skeleton.boneMatrices);if(K){if(i&&n.fog&&(le.fogColor.value=i.color,i instanceof THREE.Fog?(le.fogNear.value=i.near,le.fogFar.value=i.far):i instanceof THREE.FogExp2&&(le.fogDensity.value=i.density)),n instanceof THREE.MeshPhongMaterial||n instanceof THREE.MeshLambertMaterial||n.lights){if(ke){var ce,ue,de,pe,fe,me,ge,ve,ye,ie=!0,Ee=0,be=0,_e=0,Te=Ae,xe=Te.directional.colors,we=Te.directional.positions,Re=Te.point.colors,Se=Te.point.positions,Me=Te.point.distances,Ce=Te.spot.colors,He=Te.spot.positions,Le=Te.spot.distances,Ie=Te.spot.directions,Fe=Te.spot.anglesCos,Ne=Te.spot.exponents,ze=Te.hemi.skyColors,Be=Te.hemi.groundColors,je=Te.hemi.positions,We=0,Ge=0,Xe=0,Ye=0,qe=0,$e=0,Ke=0,Je=0,Qe=0,ti=0,ii=0,ri=0;for(ce=0,ue=e.length;ue>ce;ce++)de=e[ce],de.onlyShadow||(pe=de.color,ge=de.intensity,ye=de.distance,de instanceof THREE.AmbientLight?de.visible&&(Q.gammaInput?(Ee+=pe.r*pe.r,be+=pe.g*pe.g,_e+=pe.b*pe.b):(Ee+=pe.r,be+=pe.g,_e+=pe.b)):de instanceof THREE.DirectionalLight?(qe+=1,de.visible&&(Pe.setFromMatrixPosition(de.matrixWorld),De.setFromMatrixPosition(de.target.matrixWorld),Pe.sub(De),Pe.normalize(),Qe=3*We,we[Qe]=Pe.x,we[Qe+1]=Pe.y,we[Qe+2]=Pe.z,Q.gammaInput?x(xe,Qe,pe,ge*ge):w(xe,Qe,pe,ge),We+=1)):de instanceof THREE.PointLight?($e+=1,de.visible&&(ti=3*Ge,Q.gammaInput?x(Re,ti,pe,ge*ge):w(Re,ti,pe,ge),De.setFromMatrixPosition(de.matrixWorld),Se[ti]=De.x,Se[ti+1]=De.y,Se[ti+2]=De.z,Me[Ge]=ye,Ge+=1)):de instanceof THREE.SpotLight?(Ke+=1,de.visible&&(ii=3*Xe,Q.gammaInput?x(Ce,ii,pe,ge*ge):w(Ce,ii,pe,ge),Pe.setFromMatrixPosition(de.matrixWorld),He[ii]=Pe.x,He[ii+1]=Pe.y,He[ii+2]=Pe.z,Le[Xe]=ye,De.setFromMatrixPosition(de.target.matrixWorld),Pe.sub(De),Pe.normalize(),Ie[ii]=Pe.x,Ie[ii+1]=Pe.y,Ie[ii+2]=Pe.z,Fe[Xe]=Math.cos(de.angle),Ne[Xe]=de.exponent,Xe+=1)):de instanceof THREE.HemisphereLight&&(Je+=1,de.visible&&(Pe.setFromMatrixPosition(de.matrixWorld),Pe.normalize(),ri=3*Ye,je[ri]=Pe.x,je[ri+1]=Pe.y,je[ri+2]=Pe.z,fe=de.color,me=de.groundColor,Q.gammaInput?(ve=ge*ge,x(ze,ri,fe,ve),x(Be,ri,me,ve)):(w(ze,ri,fe,ge),w(Be,ri,me,ge)),Ye+=1)));for(ce=3*We,ue=Math.max(xe.length,3*qe);ue>ce;ce++)xe[ce]=0;for(ce=3*Ge,ue=Math.max(Re.length,3*$e);ue>ce;ce++)Re[ce]=0;for(ce=3*Xe,ue=Math.max(Ce.length,3*Ke);ue>ce;ce++)Ce[ce]=0;for(ce=3*Ye,ue=Math.max(ze.length,3*Je);ue>ce;ce++)ze[ce]=0;for(ce=3*Ye,ue=Math.max(Be.length,3*Je);ue>ce;ce++)Be[ce]=0;Te.directional.length=We,Te.point.length=Ge,Te.spot.length=Xe,Te.hemi.length=Ye,Te.ambient[0]=Ee,Te.ambient[1]=be,Te.ambient[2]=_e,ke=!1}if(ie){var si=Ae;le.ambientLightColor.value=si.ambient,le.directionalLightColor.value=si.directional.colors,le.directionalLightDirection.value=si.directional.positions,le.pointLightColor.value=si.point.colors,le.pointLightPosition.value=si.point.positions,le.pointLightDistance.value=si.point.distances,le.spotLightColor.value=si.spot.colors,le.spotLightPosition.value=si.spot.positions,le.spotLightDistance.value=si.spot.distances,le.spotLightDirection.value=si.spot.directions,le.spotLightAngleCos.value=si.spot.anglesCos,le.spotLightExponent.value=si.spot.exponents,le.hemisphereLightSkyColor.value=si.hemi.skyColors,le.hemisphereLightGroundColor.value=si.hemi.groundColors,le.hemisphereLightDirection.value=si.hemi.positions,b(le,!0)}else b(le,!1)}if(n instanceof THREE.MeshBasicMaterial||n instanceof THREE.MeshLambertMaterial||n instanceof THREE.MeshPhongMaterial){le.opacity.value=n.opacity,Q.gammaInput?le.diffuse.value.copyGammaToLinear(n.color):le.diffuse.value=n.color,le.map.value=n.map,le.lightMap.value=n.lightMap,le.specularMap.value=n.specularMap,le.alphaMap.value=n.alphaMap,n.bumpMap&&(le.bumpMap.value=n.bumpMap,le.bumpScale.value=n.bumpScale),n.normalMap&&(le.normalMap.value=n.normalMap,le.normalScale.value.copy(n.normalScale));var ai;if(n.map?ai=n.map:n.specularMap?ai=n.specularMap:n.normalMap?ai=n.normalMap:n.bumpMap?ai=n.bumpMap:n.alphaMap&&(ai=n.alphaMap),void 0!==ai){var li=ai.offset,hi=ai.repeat;le.offsetRepeat.value.set(li.x,li.y,hi.x,hi.y)}le.envMap.value=n.envMap,le.flipEnvMap.value=n.envMap instanceof THREE.WebGLRenderTargetCube?1:-1,le.reflectivity.value=n.reflectivity,le.refractionRatio.value=n.refractionRatio,le.combine.value=n.combine,le.useRefract.value=n.envMap&&n.envMap.mapping instanceof THREE.CubeRefractionMapping}if(n instanceof THREE.LineBasicMaterial?(le.diffuse.value=n.color,le.opacity.value=n.opacity):n instanceof THREE.LineDashedMaterial?(le.diffuse.value=n.color,le.opacity.value=n.opacity,le.dashSize.value=n.dashSize,le.totalSize.value=n.dashSize+n.gapSize,le.scale.value=n.scale):n instanceof THREE.PointCloudMaterial?(le.psColor.value=n.color,le.opacity.value=n.opacity,le.size.value=n.size,le.scale.value=A.height/2,le.map.value=n.map):n instanceof THREE.MeshPhongMaterial?(le.shininess.value=n.shininess,Q.gammaInput?(le.ambient.value.copyGammaToLinear(n.ambient),le.emissive.value.copyGammaToLinear(n.emissive),le.specular.value.copyGammaToLinear(n.specular)):(le.ambient.value=n.ambient,le.emissive.value=n.emissive,le.specular.value=n.specular),n.wrapAround&&le.wrapRGB.value.copy(n.wrapRGB)):n instanceof THREE.MeshLambertMaterial?(Q.gammaInput?(le.ambient.value.copyGammaToLinear(n.ambient),le.emissive.value.copyGammaToLinear(n.emissive)):(le.ambient.value=n.ambient,le.emissive.value=n.emissive),n.wrapAround&&le.wrapRGB.value.copy(n.wrapRGB)):n instanceof THREE.MeshDepthMaterial?(le.mNear.value=t.near,le.mFar.value=t.far,le.opacity.value=n.opacity):n instanceof THREE.MeshNormalMaterial&&(le.opacity.value=n.opacity),r.receiveShadow&&!n._shadowPass&&le.shadowMatrix)for(var ci=0,ui=0,di=e.length;di>ui;ui++){var pi=e[ui];pi.castShadow&&(pi instanceof THREE.SpotLight||pi instanceof THREE.DirectionalLight&&!pi.shadowCascade)&&(le.shadowMap.value[ci]=pi.shadowMap,le.shadowMapSize.value[ci]=pi.shadowMapSize,le.shadowMatrix.value[ci]=pi.shadowMatrix,le.shadowDarkness.value[ci]=pi.shadowDarkness,le.shadowBias.value[ci]=pi.shadowBias,ci++)}for(var fi,mi,gi,vi=n.uniformsList,yi=0,Ei=vi.length;Ei>yi;yi++){var bi=vi[yi][0];if(!1!==bi.needsUpdate){var _i=bi.type,Ti=bi.value,xi=vi[yi][1];switch(_i){case"1i":J.uniform1i(xi,Ti);break;case"1f":J.uniform1f(xi,Ti);break;case"2f":J.uniform2f(xi,Ti[0],Ti[1]);break;case"3f":J.uniform3f(xi,Ti[0],Ti[1],Ti[2]);break;case"4f":J.uniform4f(xi,Ti[0],Ti[1],Ti[2],Ti[3]);break;case"1iv":J.uniform1iv(xi,Ti);break;case"3iv":J.uniform3iv(xi,Ti);break;case"1fv":J.uniform1fv(xi,Ti);break;case"2fv":J.uniform2fv(xi,Ti);break;case"3fv":J.uniform3fv(xi,Ti);break;case"4fv":J.uniform4fv(xi,Ti);break;case"Matrix3fv":J.uniformMatrix3fv(xi,!1,Ti);break;case"Matrix4fv":J.uniformMatrix4fv(xi,!1,Ti);break;case"i":J.uniform1i(xi,Ti);break;case"f":J.uniform1f(xi,Ti);break;case"v2":J.uniform2f(xi,Ti.x,Ti.y);break;case"v3":J.uniform3f(xi,Ti.x,Ti.y,Ti.z);break;case"v4":J.uniform4f(xi,Ti.x,Ti.y,Ti.z,Ti.w);break;case"c":J.uniform3f(xi,Ti.r,Ti.g,Ti.b);break;case"iv1":J.uniform1iv(xi,Ti);break;case"iv":J.uniform3iv(xi,Ti);break;case"fv1":J.uniform1fv(xi,Ti);break;case"fv":J.uniform3fv(xi,Ti);break;case"v2v":void 0===bi._array&&(bi._array=new Float32Array(2*Ti.length));for(var wi=0,Ri=Ti.length;Ri>wi;wi++)gi=2*wi,bi._array[gi]=Ti[wi].x,bi._array[gi+1]=Ti[wi].y;J.uniform2fv(xi,bi._array);break;case"v3v":for(void 0===bi._array&&(bi._array=new Float32Array(3*Ti.length)),wi=0,Ri=Ti.length;Ri>wi;wi++)gi=3*wi,bi._array[gi]=Ti[wi].x,bi._array[gi+1]=Ti[wi].y,bi._array[gi+2]=Ti[wi].z;J.uniform3fv(xi,bi._array);break;case"v4v":for(void 0===bi._array&&(bi._array=new Float32Array(4*Ti.length)),wi=0,Ri=Ti.length;Ri>wi;wi++)gi=4*wi,bi._array[gi]=Ti[wi].x,bi._array[gi+1]=Ti[wi].y,bi._array[gi+2]=Ti[wi].z,bi._array[gi+3]=Ti[wi].w;J.uniform4fv(xi,bi._array);break;case"m3":J.uniformMatrix3fv(xi,!1,Ti.elements);break;case"m3v":for(void 0===bi._array&&(bi._array=new Float32Array(9*Ti.length)),wi=0,Ri=Ti.length;Ri>wi;wi++)Ti[wi].flattenToArrayOffset(bi._array,9*wi);J.uniformMatrix3fv(xi,!1,bi._array);
  30. break;case"m4":J.uniformMatrix4fv(xi,!1,Ti.elements);break;case"m4v":for(void 0===bi._array&&(bi._array=new Float32Array(16*Ti.length)),wi=0,Ri=Ti.length;Ri>wi;wi++)Ti[wi].flattenToArrayOffset(bi._array,16*wi);J.uniformMatrix4fv(xi,!1,bi._array);break;case"t":if(fi=Ti,mi=_(),J.uniform1i(xi,mi),!fi)continue;if(fi instanceof THREE.CubeTexture||fi.image instanceof Array&&6===fi.image.length){var Si=fi,Mi=mi;if(6===Si.image.length)if(Si.needsUpdate){Si.image.__webglTextureCube||(Si.addEventListener("dispose",ei),Si.image.__webglTextureCube=J.createTexture(),Q.info.memory.textures++),J.activeTexture(J.TEXTURE0+Mi),J.bindTexture(J.TEXTURE_CUBE_MAP,Si.image.__webglTextureCube),J.pixelStorei(J.UNPACK_FLIP_Y_WEBGL,Si.flipY);for(var Ci=Si instanceof THREE.CompressedTexture,Hi=Si.image[0]instanceof THREE.DataTexture,Di=[],Pi=0;6>Pi;Pi++)Di[Pi]=!Q.autoScaleCubemaps||Ci||Hi?Hi?Si.image[Pi].image:Si.image[Pi]:C(Si.image[Pi],Oe);var ki=Di[0],Ai=THREE.Math.isPowerOfTwo(ki.width)&&THREE.Math.isPowerOfTwo(ki.height),Li=k(Si.format),Ii=k(Si.type);for(M(J.TEXTURE_CUBE_MAP,Si,Ai),Pi=0;6>Pi;Pi++)if(Ci)for(var Fi,Ni=Di[Pi].mipmaps,zi=0,Bi=Ni.length;Bi>zi;zi++)Fi=Ni[zi],Si.format!==THREE.RGBAFormat&&Si.format!==THREE.RGBFormat?-1<Ze().indexOf(Li)?J.compressedTexImage2D(J.TEXTURE_CUBE_MAP_POSITIVE_X+Pi,zi,Li,Fi.width,Fi.height,0,Fi.data):console.warn("Attempt to load unsupported compressed texture format"):J.texImage2D(J.TEXTURE_CUBE_MAP_POSITIVE_X+Pi,zi,Li,Fi.width,Fi.height,0,Li,Ii,Fi.data);else Hi?J.texImage2D(J.TEXTURE_CUBE_MAP_POSITIVE_X+Pi,0,Li,Di[Pi].width,Di[Pi].height,0,Li,Ii,Di[Pi].data):J.texImage2D(J.TEXTURE_CUBE_MAP_POSITIVE_X+Pi,0,Li,Li,Ii,Di[Pi]);Si.generateMipmaps&&Ai&&J.generateMipmap(J.TEXTURE_CUBE_MAP),Si.needsUpdate=!1,Si.onUpdate&&Si.onUpdate()}else J.activeTexture(J.TEXTURE0+Mi),J.bindTexture(J.TEXTURE_CUBE_MAP,Si.image.__webglTextureCube)}else if(fi instanceof THREE.WebGLRenderTargetCube){var Oi=fi;J.activeTexture(J.TEXTURE0+mi),J.bindTexture(J.TEXTURE_CUBE_MAP,Oi.__webglTexture)}else Q.setTexture(fi,mi);break;case"tv":for(void 0===bi._array&&(bi._array=[]),wi=0,Ri=bi.value.length;Ri>wi;wi++)bi._array[wi]=_();for(J.uniform1iv(xi,bi._array),wi=0,Ri=bi.value.length;Ri>wi;wi++)fi=bi.value[wi],mi=bi._array[wi],fi&&Q.setTexture(fi,mi);break;default:console.warn("THREE.WebGLRenderer: Unknown uniform type: "+_i)}}}}return J.uniformMatrix4fv(ae.modelViewMatrix,!1,r._modelViewMatrix.elements),ae.normalMatrix&&J.uniformMatrix3fv(ae.normalMatrix,!1,r._normalMatrix.elements),null!==ae.modelMatrix&&J.uniformMatrix4fv(ae.modelMatrix,!1,r.matrixWorld.elements),re}function b(t,e){t.ambientLightColor.needsUpdate=e,t.directionalLightColor.needsUpdate=e,t.directionalLightDirection.needsUpdate=e,t.pointLightColor.needsUpdate=e,t.pointLightPosition.needsUpdate=e,t.pointLightDistance.needsUpdate=e,t.spotLightColor.needsUpdate=e,t.spotLightPosition.needsUpdate=e,t.spotLightDistance.needsUpdate=e,t.spotLightDirection.needsUpdate=e,t.spotLightAngleCos.needsUpdate=e,t.spotLightExponent.needsUpdate=e,t.hemisphereLightSkyColor.needsUpdate=e,t.hemisphereLightGroundColor.needsUpdate=e,t.hemisphereLightDirection.needsUpdate=e}function _(){var t=se;return t>=Ne&&console.warn("WebGLRenderer: trying to use "+t+" texture units while this GPU supports only "+Ne),se+=1,t}function T(t,e){t._modelViewMatrix.multiplyMatrices(e.matrixWorldInverse,t.matrixWorld),t._normalMatrix.getNormalMatrix(t._modelViewMatrix)}function x(t,e,i,n){t[e]=i.r*i.r*n,t[e+1]=i.g*i.g*n,t[e+2]=i.b*i.b*n}function w(t,e,i,n){t[e]=i.r*n,t[e+1]=i.g*n,t[e+2]=i.b*n}function R(t){t!==ye&&(J.lineWidth(t),ye=t)}function S(t,e,i){me!==t&&(t?J.enable(J.POLYGON_OFFSET_FILL):J.disable(J.POLYGON_OFFSET_FILL),me=t),!t||ge===e&&ve===i||(J.polygonOffset(e,i),ge=e,ve=i)}function M(t,e,i){i?(J.texParameteri(t,J.TEXTURE_WRAP_S,k(e.wrapS)),J.texParameteri(t,J.TEXTURE_WRAP_T,k(e.wrapT)),J.texParameteri(t,J.TEXTURE_MAG_FILTER,k(e.magFilter)),J.texParameteri(t,J.TEXTURE_MIN_FILTER,k(e.minFilter))):(J.texParameteri(t,J.TEXTURE_WRAP_S,J.CLAMP_TO_EDGE),J.texParameteri(t,J.TEXTURE_WRAP_T,J.CLAMP_TO_EDGE),J.texParameteri(t,J.TEXTURE_MAG_FILTER,P(e.magFilter)),J.texParameteri(t,J.TEXTURE_MIN_FILTER,P(e.minFilter))),(i=Fe.get("EXT_texture_filter_anisotropic"))&&e.type!==THREE.FloatType&&(1<e.anisotropy||e.__oldAnisotropy)&&(J.texParameterf(t,i.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(e.anisotropy,Q.getMaxAnisotropy())),e.__oldAnisotropy=e.anisotropy)}function C(t,e){if(t.width>e||t.height>e){var i=e/Math.max(t.width,t.height),n=document.createElement("canvas");return n.width=Math.floor(t.width*i),n.height=Math.floor(t.height*i),n.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height),console.log("THREE.WebGLRenderer:",t,"is too big ("+t.width+"x"+t.height+"). Resized to "+n.width+"x"+n.height+"."),n}return t}function H(t,e){J.bindRenderbuffer(J.RENDERBUFFER,t),e.depthBuffer&&!e.stencilBuffer?(J.renderbufferStorage(J.RENDERBUFFER,J.DEPTH_COMPONENT16,e.width,e.height),J.framebufferRenderbuffer(J.FRAMEBUFFER,J.DEPTH_ATTACHMENT,J.RENDERBUFFER,t)):e.depthBuffer&&e.stencilBuffer?(J.renderbufferStorage(J.RENDERBUFFER,J.DEPTH_STENCIL,e.width,e.height),J.framebufferRenderbuffer(J.FRAMEBUFFER,J.DEPTH_STENCIL_ATTACHMENT,J.RENDERBUFFER,t)):J.renderbufferStorage(J.RENDERBUFFER,J.RGBA4,e.width,e.height)}function D(t){t instanceof THREE.WebGLRenderTargetCube?(J.bindTexture(J.TEXTURE_CUBE_MAP,t.__webglTexture),J.generateMipmap(J.TEXTURE_CUBE_MAP),J.bindTexture(J.TEXTURE_CUBE_MAP,null)):(J.bindTexture(J.TEXTURE_2D,t.__webglTexture),J.generateMipmap(J.TEXTURE_2D),J.bindTexture(J.TEXTURE_2D,null))}function P(t){return t===THREE.NearestFilter||t===THREE.NearestMipMapNearestFilter||t===THREE.NearestMipMapLinearFilter?J.NEAREST:J.LINEAR}function k(t){var e;if(t===THREE.RepeatWrapping)return J.REPEAT;if(t===THREE.ClampToEdgeWrapping)return J.CLAMP_TO_EDGE;if(t===THREE.MirroredRepeatWrapping)return J.MIRRORED_REPEAT;if(t===THREE.NearestFilter)return J.NEAREST;if(t===THREE.NearestMipMapNearestFilter)return J.NEAREST_MIPMAP_NEAREST;if(t===THREE.NearestMipMapLinearFilter)return J.NEAREST_MIPMAP_LINEAR;if(t===THREE.LinearFilter)return J.LINEAR;if(t===THREE.LinearMipMapNearestFilter)return J.LINEAR_MIPMAP_NEAREST;if(t===THREE.LinearMipMapLinearFilter)return J.LINEAR_MIPMAP_LINEAR;if(t===THREE.UnsignedByteType)return J.UNSIGNED_BYTE;if(t===THREE.UnsignedShort4444Type)return J.UNSIGNED_SHORT_4_4_4_4;if(t===THREE.UnsignedShort5551Type)return J.UNSIGNED_SHORT_5_5_5_1;if(t===THREE.UnsignedShort565Type)return J.UNSIGNED_SHORT_5_6_5;if(t===THREE.ByteType)return J.BYTE;if(t===THREE.ShortType)return J.SHORT;if(t===THREE.UnsignedShortType)return J.UNSIGNED_SHORT;if(t===THREE.IntType)return J.INT;if(t===THREE.UnsignedIntType)return J.UNSIGNED_INT;if(t===THREE.FloatType)return J.FLOAT;if(t===THREE.AlphaFormat)return J.ALPHA;if(t===THREE.RGBFormat)return J.RGB;if(t===THREE.RGBAFormat)return J.RGBA;if(t===THREE.LuminanceFormat)return J.LUMINANCE;if(t===THREE.LuminanceAlphaFormat)return J.LUMINANCE_ALPHA;if(t===THREE.AddEquation)return J.FUNC_ADD;if(t===THREE.SubtractEquation)return J.FUNC_SUBTRACT;if(t===THREE.ReverseSubtractEquation)return J.FUNC_REVERSE_SUBTRACT;if(t===THREE.ZeroFactor)return J.ZERO;if(t===THREE.OneFactor)return J.ONE;if(t===THREE.SrcColorFactor)return J.SRC_COLOR;if(t===THREE.OneMinusSrcColorFactor)return J.ONE_MINUS_SRC_COLOR;if(t===THREE.SrcAlphaFactor)return J.SRC_ALPHA;if(t===THREE.OneMinusSrcAlphaFactor)return J.ONE_MINUS_SRC_ALPHA;if(t===THREE.DstAlphaFactor)return J.DST_ALPHA;if(t===THREE.OneMinusDstAlphaFactor)return J.ONE_MINUS_DST_ALPHA;if(t===THREE.DstColorFactor)return J.DST_COLOR;if(t===THREE.OneMinusDstColorFactor)return J.ONE_MINUS_DST_COLOR;if(t===THREE.SrcAlphaSaturateFactor)return J.SRC_ALPHA_SATURATE;if(e=Fe.get("WEBGL_compressed_texture_s3tc"),null!==e){if(t===THREE.RGB_S3TC_DXT1_Format)return e.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===THREE.RGBA_S3TC_DXT1_Format)return e.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===THREE.RGBA_S3TC_DXT3_Format)return e.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===THREE.RGBA_S3TC_DXT5_Format)return e.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(e=Fe.get("WEBGL_compressed_texture_pvrtc"),null!==e){if(t===THREE.RGB_PVRTC_4BPPV1_Format)return e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===THREE.RGB_PVRTC_2BPPV1_Format)return e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===THREE.RGBA_PVRTC_4BPPV1_Format)return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===THREE.RGBA_PVRTC_2BPPV1_Format)return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(e=Fe.get("EXT_blend_minmax"),null!==e){if(t===THREE.MinEquation)return e.MIN_EXT;if(t===THREE.MaxEquation)return e.MAX_EXT}return 0}console.log("THREE.WebGLRenderer",THREE.REVISION),t=t||{};var A=void 0!==t.canvas?t.canvas:document.createElement("canvas"),L=void 0!==t.context?t.context:null,I=void 0!==t.precision?t.precision:"highp",F=void 0!==t.alpha?t.alpha:!1,N=void 0!==t.depth?t.depth:!0,z=void 0!==t.stencil?t.stencil:!0,B=void 0!==t.antialias?t.antialias:!1,O=void 0!==t.premultipliedAlpha?t.premultipliedAlpha:!0,U=void 0!==t.preserveDrawingBuffer?t.preserveDrawingBuffer:!1,V=void 0!==t.logarithmicDepthBuffer?t.logarithmicDepthBuffer:!1,j=new THREE.Color(0),W=0,G=[],X={},Z=[],Y=[],q=[],$=[],K=[];this.domElement=A,this.context=null,this.devicePixelRatio=void 0!==t.devicePixelRatio?t.devicePixelRatio:void 0!==self.devicePixelRatio?self.devicePixelRatio:1,this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0,this.shadowMapEnabled=this.gammaOutput=this.gammaInput=!1,this.shadowMapType=THREE.PCFShadowMap,this.shadowMapCullFace=THREE.CullFaceFront,this.shadowMapCascade=this.shadowMapDebug=!1,this.maxMorphTargets=8,this.maxMorphNormals=4,this.autoScaleCubemaps=!0,this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}};var J,Q=this,te=[],ee=null,ie=null,ne=-1,re=-1,oe=null,se=0,ae=-1,le=-1,he=-1,ce=-1,ue=-1,de=-1,pe=-1,fe=-1,me=null,ge=null,ve=null,ye=null,Ee=0,be=0,_e=A.width,Te=A.height,xe=0,we=0,Re=new Uint8Array(16),Se=new Uint8Array(16),Me=new THREE.Frustum,Ce=new THREE.Matrix4,He=new THREE.Matrix4,De=new THREE.Vector3,Pe=new THREE.Vector3,ke=!0,Ae={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}};try{var Le={alpha:F,depth:N,stencil:z,antialias:B,premultipliedAlpha:O,preserveDrawingBuffer:U};if(J=L||A.getContext("webgl",Le)||A.getContext("experimental-webgl",Le),null===J){if(null!==A.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context."}}catch(Ie){console.error(Ie)}void 0===J.getShaderPrecisionFormat&&(J.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});var Fe=new THREE.WebGLExtensions(J);Fe.get("OES_texture_float"),Fe.get("OES_texture_float_linear"),Fe.get("OES_standard_derivatives"),V&&Fe.get("EXT_frag_depth"),J.clearColor(0,0,0,1),J.clearDepth(1),J.clearStencil(0),J.enable(J.DEPTH_TEST),J.depthFunc(J.LEQUAL),J.frontFace(J.CCW),J.cullFace(J.BACK),J.enable(J.CULL_FACE),J.enable(J.BLEND),J.blendEquation(J.FUNC_ADD),J.blendFunc(J.SRC_ALPHA,J.ONE_MINUS_SRC_ALPHA),J.viewport(Ee,be,_e,Te),J.clearColor(j.r,j.g,j.b,W),this.context=J;var Ne=J.getParameter(J.MAX_TEXTURE_IMAGE_UNITS),ze=J.getParameter(J.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Be=J.getParameter(J.MAX_TEXTURE_SIZE),Oe=J.getParameter(J.MAX_CUBE_MAP_TEXTURE_SIZE),Ue=ze>0,Ve=Ue&&Fe.get("OES_texture_float"),je=J.getShaderPrecisionFormat(J.VERTEX_SHADER,J.HIGH_FLOAT),We=J.getShaderPrecisionFormat(J.VERTEX_SHADER,J.MEDIUM_FLOAT);J.getShaderPrecisionFormat(J.VERTEX_SHADER,J.LOW_FLOAT);var Ge=J.getShaderPrecisionFormat(J.FRAGMENT_SHADER,J.HIGH_FLOAT),Xe=J.getShaderPrecisionFormat(J.FRAGMENT_SHADER,J.MEDIUM_FLOAT);J.getShaderPrecisionFormat(J.FRAGMENT_SHADER,J.LOW_FLOAT);var Ze=function(){var t;return function(){if(void 0!==t)return t;if(t=[],Fe.get("WEBGL_compressed_texture_pvrtc")||Fe.get("WEBGL_compressed_texture_s3tc"))for(var e=J.getParameter(J.COMPRESSED_TEXTURE_FORMATS),i=0;i<e.length;i++)t.push(e[i]);return t}}(),Ye=0<je.precision&&0<Ge.precision,qe=0<We.precision&&0<Xe.precision;"highp"!==I||Ye||(qe?(I="mediump",console.warn("THREE.WebGLRenderer: highp not supported, using mediump.")):(I="lowp",console.warn("THREE.WebGLRenderer: highp and mediump not supported, using lowp."))),"mediump"!==I||qe||(I="lowp",console.warn("THREE.WebGLRenderer: mediump not supported, using lowp."));var $e=new THREE.ShadowMapPlugin(this,G,X,Z),Ke=new THREE.SpritePlugin(this,$),Je=new THREE.LensFlarePlugin(this,K);this.getContext=function(){return J},this.supportsVertexTextures=function(){return Ue},this.supportsFloatTextures=function(){return Fe.get("OES_texture_float")},this.supportsStandardDerivatives=function(){return Fe.get("OES_standard_derivatives")},this.supportsCompressedTextureS3TC=function(){return Fe.get("WEBGL_compressed_texture_s3tc")},this.supportsCompressedTexturePVRTC=function(){return Fe.get("WEBGL_compressed_texture_pvrtc")},this.supportsBlendMinMax=function(){return Fe.get("EXT_blend_minmax")},this.getMaxAnisotropy=function(){var t;return function(){if(void 0!==t)return t;var e=Fe.get("EXT_texture_filter_anisotropic");return t=null!==e?J.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}}(),this.getPrecision=function(){return I},this.setSize=function(t,e,i){A.width=t*this.devicePixelRatio,A.height=e*this.devicePixelRatio,!1!==i&&(A.style.width=t+"px",A.style.height=e+"px"),this.setViewport(0,0,t,e)},this.setViewport=function(t,e,i,n){Ee=t*this.devicePixelRatio,be=e*this.devicePixelRatio,_e=i*this.devicePixelRatio,Te=n*this.devicePixelRatio,J.viewport(Ee,be,_e,Te)},this.setScissor=function(t,e,i,n){J.scissor(t*this.devicePixelRatio,e*this.devicePixelRatio,i*this.devicePixelRatio,n*this.devicePixelRatio)},this.enableScissorTest=function(t){t?J.enable(J.SCISSOR_TEST):J.disable(J.SCISSOR_TEST)},this.setClearColor=function(t,e){j.set(t),W=void 0!==e?e:1,J.clearColor(j.r,j.g,j.b,W)},this.setClearColorHex=function(t,e){console.warn("THREE.WebGLRenderer: .setClearColorHex() is being removed. Use .setClearColor() instead."),this.setClearColor(t,e)},this.getClearColor=function(){return j},this.getClearAlpha=function(){return W},this.clear=function(t,e,i){var n=0;(void 0===t||t)&&(n|=J.COLOR_BUFFER_BIT),(void 0===e||e)&&(n|=J.DEPTH_BUFFER_BIT),(void 0===i||i)&&(n|=J.STENCIL_BUFFER_BIT),J.clear(n)},this.clearColor=function(){J.clear(J.COLOR_BUFFER_BIT)},this.clearDepth=function(){J.clear(J.DEPTH_BUFFER_BIT)},this.clearStencil=function(){J.clear(J.STENCIL_BUFFER_BIT)},this.clearTarget=function(t,e,i,n){this.setRenderTarget(t),this.clear(e,i,n)},this.resetGLState=function(){oe=ee=null,ne=re=le=ae=fe=pe=he=-1,ke=!0};var Qe=function(t){t.target.traverse(function(t){if(t.removeEventListener("remove",Qe),t instanceof THREE.Mesh||t instanceof THREE.PointCloud||t instanceof THREE.Line)delete X[t.id];else if(t instanceof THREE.ImmediateRenderObject||t.immediateRenderCallback)for(var e=Z,i=e.length-1;i>=0;i--)e[i].object===t&&e.splice(i,1);delete t.__webglInit,delete t._modelViewMatrix,delete t._normalMatrix,delete t.__webglActive})},ti=function(t){if(t=t.target,t.removeEventListener("dispose",ti),delete t.__webglInit,t instanceof THREE.BufferGeometry){for(var e in t.attributes){var i=t.attributes[e];void 0!==i.buffer&&(J.deleteBuffer(i.buffer),delete i.buffer)}Q.info.memory.geometries--}else if(e=si[t.id],void 0!==e){for(var i=0,n=e.length;n>i;i++){var r=e[i];if(void 0!==r.numMorphTargets){for(var o=0,s=r.numMorphTargets;s>o;o++)J.deleteBuffer(r.__webglMorphTargetsBuffers[o]);delete r.__webglMorphTargetsBuffers}if(void 0!==r.numMorphNormals){for(o=0,s=r.numMorphNormals;s>o;o++)J.deleteBuffer(r.__webglMorphNormalsBuffers[o]);delete r.__webglMorphNormalsBuffers}ri(r)}delete si[t.id]}else ri(t);re=-1},ei=function(t){t=t.target,t.removeEventListener("dispose",ei),t.image&&t.image.__webglTextureCube?(J.deleteTexture(t.image.__webglTextureCube),delete t.image.__webglTextureCube):void 0!==t.__webglInit&&(J.deleteTexture(t.__webglTexture),delete t.__webglTexture,delete t.__webglInit),Q.info.memory.textures--},ii=function(t){if(t=t.target,t.removeEventListener("dispose",ii),t&&void 0!==t.__webglTexture){if(J.deleteTexture(t.__webglTexture),delete t.__webglTexture,t instanceof THREE.WebGLRenderTargetCube)for(var e=0;6>e;e++)J.deleteFramebuffer(t.__webglFramebuffer[e]),J.deleteRenderbuffer(t.__webglRenderbuffer[e]);else J.deleteFramebuffer(t.__webglFramebuffer),J.deleteRenderbuffer(t.__webglRenderbuffer);delete t.__webglFramebuffer,delete t.__webglRenderbuffer}Q.info.memory.textures--},ni=function(t){t=t.target,t.removeEventListener("dispose",ni),oi(t)},ri=function(t){for(var e="__webglVertexBuffer __webglNormalBuffer __webglTangentBuffer __webglColorBuffer __webglUVBuffer __webglUV2Buffer __webglSkinIndicesBuffer __webglSkinWeightsBuffer __webglFaceBuffer __webglLineBuffer __webglLineDistanceBuffer".split(" "),i=0,n=e.length;n>i;i++){var r=e[i];void 0!==t[r]&&(J.deleteBuffer(t[r]),delete t[r])}if(void 0!==t.__webglCustomAttributesList){for(r in t.__webglCustomAttributesList)J.deleteBuffer(t.__webglCustomAttributesList[r].buffer);delete t.__webglCustomAttributesList}Q.info.memory.geometries--},oi=function(t){var e=t.program.program;if(void 0!==e){t.program=void 0;var i,n,r=!1;for(t=0,i=te.length;i>t;t++)if(n=te[t],n.program===e){n.usedTimes--,0===n.usedTimes&&(r=!0);break}if(!0===r){for(r=[],t=0,i=te.length;i>t;t++)n=te[t],n.program!==e&&r.push(n);te=r,J.deleteProgram(e),Q.info.memory.programs--}}};this.renderBufferImmediate=function(t,e,i){if(o(),t.hasPositions&&!t.__webglVertexBuffer&&(t.__webglVertexBuffer=J.createBuffer()),t.hasNormals&&!t.__webglNormalBuffer&&(t.__webglNormalBuffer=J.createBuffer()),t.hasUvs&&!t.__webglUvBuffer&&(t.__webglUvBuffer=J.createBuffer()),t.hasColors&&!t.__webglColorBuffer&&(t.__webglColorBuffer=J.createBuffer()),t.hasPositions&&(J.bindBuffer(J.ARRAY_BUFFER,t.__webglVertexBuffer),J.bufferData(J.ARRAY_BUFFER,t.positionArray,J.DYNAMIC_DRAW),s(e.attributes.position),J.vertexAttribPointer(e.attributes.position,3,J.FLOAT,!1,0,0)),t.hasNormals){if(J.bindBuffer(J.ARRAY_BUFFER,t.__webglNormalBuffer),i.shading===THREE.FlatShading){var n,r,l,h,c,u,d,p,f,m,g,v=3*t.count;for(g=0;v>g;g+=9)m=t.normalArray,n=m[g],r=m[g+1],l=m[g+2],h=m[g+3],u=m[g+4],p=m[g+5],c=m[g+6],d=m[g+7],f=m[g+8],n=(n+h+c)/3,r=(r+u+d)/3,l=(l+p+f)/3,m[g]=n,m[g+1]=r,m[g+2]=l,m[g+3]=n,m[g+4]=r,m[g+5]=l,m[g+6]=n,m[g+7]=r,m[g+8]=l}J.bufferData(J.ARRAY_BUFFER,t.normalArray,J.DYNAMIC_DRAW),s(e.attributes.normal),J.vertexAttribPointer(e.attributes.normal,3,J.FLOAT,!1,0,0)}t.hasUvs&&i.map&&(J.bindBuffer(J.ARRAY_BUFFER,t.__webglUvBuffer),J.bufferData(J.ARRAY_BUFFER,t.uvArray,J.DYNAMIC_DRAW),s(e.attributes.uv),J.vertexAttribPointer(e.attributes.uv,2,J.FLOAT,!1,0,0)),t.hasColors&&i.vertexColors!==THREE.NoColors&&(J.bindBuffer(J.ARRAY_BUFFER,t.__webglColorBuffer),J.bufferData(J.ARRAY_BUFFER,t.colorArray,J.DYNAMIC_DRAW),s(e.attributes.color),J.vertexAttribPointer(e.attributes.color,3,J.FLOAT,!1,0,0)),a(),J.drawArrays(J.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,i,n,s,a){if(!1!==n.visible)if(t=E(t,e,i,n,a),e=!1,i=16777215*s.id+2*t.id+(n.wireframe?1:0),i!==re&&(re=i,e=!0),e&&o(),a instanceof THREE.Mesh)if(a=!0===n.wireframe?J.LINES:J.TRIANGLES,i=s.attributes.index){var l,h;i.array instanceof Uint32Array&&Fe.get("OES_element_index_uint")?(l=J.UNSIGNED_INT,h=4):(l=J.UNSIGNED_SHORT,h=2);var c=s.offsets;if(0===c.length)e&&(r(n,t,s,0),J.bindBuffer(J.ELEMENT_ARRAY_BUFFER,i.buffer)),J.drawElements(a,i.array.length,l,0),Q.info.render.calls++,Q.info.render.vertices+=i.array.length,Q.info.render.faces+=i.array.length/3;else{e=!0;for(var u=0,d=c.length;d>u;u++){var p=c[u].index;e&&(r(n,t,s,p),J.bindBuffer(J.ELEMENT_ARRAY_BUFFER,i.buffer)),J.drawElements(a,c[u].count,l,c[u].start*h),Q.info.render.calls++,Q.info.render.vertices+=c[u].count,Q.info.render.faces+=c[u].count/3}}}else e&&r(n,t,s,0),n=s.attributes.position,J.drawArrays(a,0,n.array.length/3),Q.info.render.calls++,Q.info.render.vertices+=n.array.length/3,Q.info.render.faces+=n.array.length/9;else if(a instanceof THREE.PointCloud)e&&r(n,t,s,0),n=s.attributes.position,J.drawArrays(J.POINTS,0,n.array.length/3),Q.info.render.calls++,Q.info.render.points+=n.array.length/3;else if(a instanceof THREE.Line)if(a=a.mode===THREE.LineStrip?J.LINE_STRIP:J.LINES,R(n.linewidth),i=s.attributes.index)if(i.array instanceof Uint32Array?(l=J.UNSIGNED_INT,h=4):(l=J.UNSIGNED_SHORT,h=2),c=s.offsets,0===c.length)e&&(r(n,t,s,0),J.bindBuffer(J.ELEMENT_ARRAY_BUFFER,i.buffer)),J.drawElements(a,i.array.length,l,0),Q.info.render.calls++,Q.info.render.vertices+=i.array.length;else for(1<c.length&&(e=!0),u=0,d=c.length;d>u;u++)p=c[u].index,e&&(r(n,t,s,p),J.bindBuffer(J.ELEMENT_ARRAY_BUFFER,i.buffer)),J.drawElements(a,c[u].count,l,c[u].start*h),Q.info.render.calls++,Q.info.render.vertices+=c[u].count;else e&&r(n,t,s,0),n=s.attributes.position,J.drawArrays(a,0,n.array.length/3),Q.info.render.calls++,Q.info.render.points+=n.array.length/3},this.renderBuffer=function(t,e,i,n,r,l){if(!1!==n.visible){if(i=E(t,e,i,n,l),e=i.attributes,t=!1,i=16777215*r.id+2*i.id+(n.wireframe?1:0),i!==re&&(re=i,t=!0),t&&o(),!n.morphTargets&&0<=e.position)t&&(J.bindBuffer(J.ARRAY_BUFFER,r.__webglVertexBuffer),s(e.position),J.vertexAttribPointer(e.position,3,J.FLOAT,!1,0,0));else if(l.morphTargetBase){if(i=n.program.attributes,-1!==l.morphTargetBase&&0<=i.position?(J.bindBuffer(J.ARRAY_BUFFER,r.__webglMorphTargetsBuffers[l.morphTargetBase]),s(i.position),J.vertexAttribPointer(i.position,3,J.FLOAT,!1,0,0)):0<=i.position&&(J.bindBuffer(J.ARRAY_BUFFER,r.__webglVertexBuffer),s(i.position),J.vertexAttribPointer(i.position,3,J.FLOAT,!1,0,0)),l.morphTargetForcedOrder.length)for(var h=0,u=l.morphTargetForcedOrder,d=l.morphTargetInfluences;h<n.numSupportedMorphTargets&&h<u.length;)0<=i["morphTarget"+h]&&(J.bindBuffer(J.ARRAY_BUFFER,r.__webglMorphTargetsBuffers[u[h]]),s(i["morphTarget"+h]),J.vertexAttribPointer(i["morphTarget"+h],3,J.FLOAT,!1,0,0)),0<=i["morphNormal"+h]&&n.morphNormals&&(J.bindBuffer(J.ARRAY_BUFFER,r.__webglMorphNormalsBuffers[u[h]]),s(i["morphNormal"+h]),J.vertexAttribPointer(i["morphNormal"+h],3,J.FLOAT,!1,0,0)),l.__webglMorphTargetInfluences[h]=d[u[h]],h++;else{var p,u=[],d=l.morphTargetInfluences,f=d.length;for(p=0;f>p;p++)h=d[p],h>0&&u.push([h,p]);for(u.length>n.numSupportedMorphTargets?(u.sort(c),u.length=n.numSupportedMorphTargets):u.length>n.numSupportedMorphNormals?u.sort(c):0===u.length&&u.push([0,0]),h=0;h<n.numSupportedMorphTargets;)u[h]?(p=u[h][1],0<=i["morphTarget"+h]&&(J.bindBuffer(J.ARRAY_BUFFER,r.__webglMorphTargetsBuffers[p]),s(i["morphTarget"+h]),J.vertexAttribPointer(i["morphTarget"+h],3,J.FLOAT,!1,0,0)),0<=i["morphNormal"+h]&&n.morphNormals&&(J.bindBuffer(J.ARRAY_BUFFER,r.__webglMorphNormalsBuffers[p]),s(i["morphNormal"+h]),J.vertexAttribPointer(i["morphNormal"+h],3,J.FLOAT,!1,0,0)),l.__webglMorphTargetInfluences[h]=d[p]):l.__webglMorphTargetInfluences[h]=0,h++}null!==n.program.uniforms.morphTargetInfluences&&J.uniform1fv(n.program.uniforms.morphTargetInfluences,l.__webglMorphTargetInfluences)}if(t){if(r.__webglCustomAttributesList)for(i=0,d=r.__webglCustomAttributesList.length;d>i;i++)u=r.__webglCustomAttributesList[i],0<=e[u.buffer.belongsToAttribute]&&(J.bindBuffer(J.ARRAY_BUFFER,u.buffer),s(e[u.buffer.belongsToAttribute]),J.vertexAttribPointer(e[u.buffer.belongsToAttribute],u.size,J.FLOAT,!1,0,0));0<=e.color&&(0<l.geometry.colors.length||0<l.geometry.faces.length?(J.bindBuffer(J.ARRAY_BUFFER,r.__webglColorBuffer),s(e.color),J.vertexAttribPointer(e.color,3,J.FLOAT,!1,0,0)):void 0!==n.defaultAttributeValues&&J.vertexAttrib3fv(e.color,n.defaultAttributeValues.color)),0<=e.normal&&(J.bindBuffer(J.ARRAY_BUFFER,r.__webglNormalBuffer),s(e.normal),J.vertexAttribPointer(e.normal,3,J.FLOAT,!1,0,0)),0<=e.tangent&&(J.bindBuffer(J.ARRAY_BUFFER,r.__webglTangentBuffer),s(e.tangent),J.vertexAttribPointer(e.tangent,4,J.FLOAT,!1,0,0)),0<=e.uv&&(l.geometry.faceVertexUvs[0]?(J.bindBuffer(J.ARRAY_BUFFER,r.__webglUVBuffer),s(e.uv),J.vertexAttribPointer(e.uv,2,J.FLOAT,!1,0,0)):void 0!==n.defaultAttributeValues&&J.vertexAttrib2fv(e.uv,n.defaultAttributeValues.uv)),0<=e.uv2&&(l.geometry.faceVertexUvs[1]?(J.bindBuffer(J.ARRAY_BUFFER,r.__webglUV2Buffer),s(e.uv2),J.vertexAttribPointer(e.uv2,2,J.FLOAT,!1,0,0)):void 0!==n.defaultAttributeValues&&J.vertexAttrib2fv(e.uv2,n.defaultAttributeValues.uv2)),n.skinning&&0<=e.skinIndex&&0<=e.skinWeight&&(J.bindBuffer(J.ARRAY_BUFFER,r.__webglSkinIndicesBuffer),s(e.skinIndex),J.vertexAttribPointer(e.skinIndex,4,J.FLOAT,!1,0,0),J.bindBuffer(J.ARRAY_BUFFER,r.__webglSkinWeightsBuffer),s(e.skinWeight),J.vertexAttribPointer(e.skinWeight,4,J.FLOAT,!1,0,0)),0<=e.lineDistance&&(J.bindBuffer(J.ARRAY_BUFFER,r.__webglLineDistanceBuffer),s(e.lineDistance),J.vertexAttribPointer(e.lineDistance,1,J.FLOAT,!1,0,0))}a(),l instanceof THREE.Mesh?(l=r.__typeArray===Uint32Array?J.UNSIGNED_INT:J.UNSIGNED_SHORT,n.wireframe?(R(n.wireframeLinewidth),t&&J.bindBuffer(J.ELEMENT_ARRAY_BUFFER,r.__webglLineBuffer),J.drawElements(J.LINES,r.__webglLineCount,l,0)):(t&&J.bindBuffer(J.ELEMENT_ARRAY_BUFFER,r.__webglFaceBuffer),J.drawElements(J.TRIANGLES,r.__webglFaceCount,l,0)),Q.info.render.calls++,Q.info.render.vertices+=r.__webglFaceCount,Q.info.render.faces+=r.__webglFaceCount/3):l instanceof THREE.Line?(l=l.mode===THREE.LineStrip?J.LINE_STRIP:J.LINES,R(n.linewidth),J.drawArrays(l,0,r.__webglLineCount),Q.info.render.calls++):l instanceof THREE.PointCloud&&(J.drawArrays(J.POINTS,0,r.__webglParticleCount),Q.info.render.calls++,Q.info.render.points+=r.__webglParticleCount)}},this.render=function(t,e,i,n){if(!1==e instanceof THREE.Camera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{var r=t.fog;ne=re=-1,oe=null,ke=!0,!0===t.autoUpdate&&t.updateMatrixWorld(),void 0===e.parent&&e.updateMatrixWorld(),t.traverse(function(t){t instanceof THREE.SkinnedMesh&&t.skeleton.update()}),e.matrixWorldInverse.getInverse(e.matrixWorld),Ce.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),Me.setFromMatrix(Ce),G.length=0,Y.length=0,q.length=0,$.length=0,K.length=0,u(t,t),!0===Q.sortObjects&&(Y.sort(l),q.sort(h)),$e.render(t,e),Q.info.render.calls=0,Q.info.render.vertices=0,Q.info.render.faces=0,Q.info.render.points=0,this.setRenderTarget(i),(this.autoClear||n)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil),n=0;for(var o=Z.length;o>n;n++){var s=Z[n],a=s.object;a.visible&&(T(a,e),f(s))}t.overrideMaterial?(n=t.overrideMaterial,this.setBlending(n.blending,n.blendEquation,n.blendSrc,n.blendDst),this.setDepthTest(n.depthTest),this.setDepthWrite(n.depthWrite),S(n.polygonOffset,n.polygonOffsetFactor,n.polygonOffsetUnits),d(Y,e,G,r,!0,n),d(q,e,G,r,!0,n),p(Z,"",e,G,r,!1,n)):(n=null,this.setBlending(THREE.NoBlending),d(Y,e,G,r,!1,n),p(Z,"opaque",e,G,r,!1,n),d(q,e,G,r,!0,n),p(Z,"transparent",e,G,r,!0,n)),Ke.render(t,e),Je.render(t,e,xe,we),i&&i.generateMipmaps&&i.minFilter!==THREE.NearestFilter&&i.minFilter!==THREE.LinearFilter&&D(i),this.setDepthTest(!0),this.setDepthWrite(!0)}},this.renderImmediateObject=function(t,e,i,n,r){var o=E(t,e,i,n,r);re=-1,Q.setMaterialFaces(n),r.immediateRenderCallback?r.immediateRenderCallback(o,J,Me):r.render(function(t){Q.renderBufferImmediate(t,o,n)})};var si={},ai=0;this.setFaceCulling=function(t,e){t===THREE.CullFaceNone?J.disable(J.CULL_FACE):(J.frontFace(e===THREE.FrontFaceDirectionCW?J.CW:J.CCW),J.cullFace(t===THREE.CullFaceBack?J.BACK:t===THREE.CullFaceFront?J.FRONT:J.FRONT_AND_BACK),J.enable(J.CULL_FACE))},this.setMaterialFaces=function(t){var e=t.side===THREE.DoubleSide;t=t.side===THREE.BackSide,ae!==e&&(e?J.disable(J.CULL_FACE):J.enable(J.CULL_FACE),ae=e),le!==t&&(J.frontFace(t?J.CW:J.CCW),le=t)},this.setDepthTest=function(t){pe!==t&&(t?J.enable(J.DEPTH_TEST):J.disable(J.DEPTH_TEST),pe=t)},this.setDepthWrite=function(t){fe!==t&&(J.depthMask(t),fe=t)},this.setBlending=function(t,e,i,n){t!==he&&(t===THREE.NoBlending?J.disable(J.BLEND):t===THREE.AdditiveBlending?(J.enable(J.BLEND),J.blendEquation(J.FUNC_ADD),J.blendFunc(J.SRC_ALPHA,J.ONE)):t===THREE.SubtractiveBlending?(J.enable(J.BLEND),J.blendEquation(J.FUNC_ADD),J.blendFunc(J.ZERO,J.ONE_MINUS_SRC_COLOR)):t===THREE.MultiplyBlending?(J.enable(J.BLEND),J.blendEquation(J.FUNC_ADD),J.blendFunc(J.ZERO,J.SRC_COLOR)):t===THREE.CustomBlending?J.enable(J.BLEND):(J.enable(J.BLEND),J.blendEquationSeparate(J.FUNC_ADD,J.FUNC_ADD),J.blendFuncSeparate(J.SRC_ALPHA,J.ONE_MINUS_SRC_ALPHA,J.ONE,J.ONE_MINUS_SRC_ALPHA)),he=t),t===THREE.CustomBlending?(e!==ce&&(J.blendEquation(k(e)),ce=e),(i!==ue||n!==de)&&(J.blendFunc(k(i),k(n)),ue=i,de=n)):de=ue=ce=null},this.uploadTexture=function(t){void 0===t.__webglInit&&(t.__webglInit=!0,t.addEventListener("dispose",ei),t.__webglTexture=J.createTexture(),Q.info.memory.textures++),J.bindTexture(J.TEXTURE_2D,t.__webglTexture),J.pixelStorei(J.UNPACK_FLIP_Y_WEBGL,t.flipY),J.pixelStorei(J.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),J.pixelStorei(J.UNPACK_ALIGNMENT,t.unpackAlignment),t.image=C(t.image,Be);var e=t.image,i=THREE.Math.isPowerOfTwo(e.width)&&THREE.Math.isPowerOfTwo(e.height),n=k(t.format),r=k(t.type);M(J.TEXTURE_2D,t,i);var o=t.mipmaps;if(t instanceof THREE.DataTexture)if(0<o.length&&i){for(var s=0,a=o.length;a>s;s++)e=o[s],J.texImage2D(J.TEXTURE_2D,s,n,e.width,e.height,0,n,r,e.data);t.generateMipmaps=!1}else J.texImage2D(J.TEXTURE_2D,0,n,e.width,e.height,0,n,r,e.data);else if(t instanceof THREE.CompressedTexture)for(s=0,a=o.length;a>s;s++)e=o[s],t.format!==THREE.RGBAFormat&&t.format!==THREE.RGBFormat?-1<Ze().indexOf(n)?J.compressedTexImage2D(J.TEXTURE_2D,s,n,e.width,e.height,0,e.data):console.warn("Attempt to load unsupported compressed texture format"):J.texImage2D(J.TEXTURE_2D,s,n,e.width,e.height,0,n,r,e.data);else if(0<o.length&&i){for(s=0,a=o.length;a>s;s++)e=o[s],J.texImage2D(J.TEXTURE_2D,s,n,n,r,e);t.generateMipmaps=!1}else J.texImage2D(J.TEXTURE_2D,0,n,n,r,t.image);t.generateMipmaps&&i&&J.generateMipmap(J.TEXTURE_2D),t.needsUpdate=!1,t.onUpdate&&t.onUpdate()},this.setTexture=function(t,e){J.activeTexture(J.TEXTURE0+e),t.needsUpdate?Q.uploadTexture(t):J.bindTexture(J.TEXTURE_2D,t.__webglTexture)},this.setRenderTarget=function(t){var e=t instanceof THREE.WebGLRenderTargetCube;if(t&&void 0===t.__webglFramebuffer){void 0===t.depthBuffer&&(t.depthBuffer=!0),void 0===t.stencilBuffer&&(t.stencilBuffer=!0),t.addEventListener("dispose",ii),t.__webglTexture=J.createTexture(),Q.info.memory.textures++;var i=THREE.Math.isPowerOfTwo(t.width)&&THREE.Math.isPowerOfTwo(t.height),n=k(t.format),r=k(t.type);if(e){t.__webglFramebuffer=[],t.__webglRenderbuffer=[],J.bindTexture(J.TEXTURE_CUBE_MAP,t.__webglTexture),M(J.TEXTURE_CUBE_MAP,t,i);for(var o=0;6>o;o++){t.__webglFramebuffer[o]=J.createFramebuffer(),t.__webglRenderbuffer[o]=J.createRenderbuffer(),J.texImage2D(J.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,n,t.width,t.height,0,n,r,null);var s=t,a=J.TEXTURE_CUBE_MAP_POSITIVE_X+o;J.bindFramebuffer(J.FRAMEBUFFER,t.__webglFramebuffer[o]),J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,a,s.__webglTexture,0),H(t.__webglRenderbuffer[o],t)}i&&J.generateMipmap(J.TEXTURE_CUBE_MAP)}else t.__webglFramebuffer=J.createFramebuffer(),t.__webglRenderbuffer=t.shareDepthFrom?t.shareDepthFrom.__webglRenderbuffer:J.createRenderbuffer(),J.bindTexture(J.TEXTURE_2D,t.__webglTexture),M(J.TEXTURE_2D,t,i),J.texImage2D(J.TEXTURE_2D,0,n,t.width,t.height,0,n,r,null),n=J.TEXTURE_2D,J.bindFramebuffer(J.FRAMEBUFFER,t.__webglFramebuffer),J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,n,t.__webglTexture,0),t.shareDepthFrom?t.depthBuffer&&!t.stencilBuffer?J.framebufferRenderbuffer(J.FRAMEBUFFER,J.DEPTH_ATTACHMENT,J.RENDERBUFFER,t.__webglRenderbuffer):t.depthBuffer&&t.stencilBuffer&&J.framebufferRenderbuffer(J.FRAMEBUFFER,J.DEPTH_STENCIL_ATTACHMENT,J.RENDERBUFFER,t.__webglRenderbuffer):H(t.__webglRenderbuffer,t),i&&J.generateMipmap(J.TEXTURE_2D);
  31. e?J.bindTexture(J.TEXTURE_CUBE_MAP,null):J.bindTexture(J.TEXTURE_2D,null),J.bindRenderbuffer(J.RENDERBUFFER,null),J.bindFramebuffer(J.FRAMEBUFFER,null)}t?(e=e?t.__webglFramebuffer[t.activeCubeFace]:t.__webglFramebuffer,i=t.width,t=t.height,r=n=0):(e=null,i=_e,t=Te,n=Ee,r=be),e!==ie&&(J.bindFramebuffer(J.FRAMEBUFFER,e),J.viewport(n,r,i,t),ie=e),xe=i,we=t},this.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},this.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},this.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},this.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")}},THREE.WebGLRenderTarget=function(t,e,i){this.width=t,this.height=e,i=i||{},this.wrapS=void 0!==i.wrapS?i.wrapS:THREE.ClampToEdgeWrapping,this.wrapT=void 0!==i.wrapT?i.wrapT:THREE.ClampToEdgeWrapping,this.magFilter=void 0!==i.magFilter?i.magFilter:THREE.LinearFilter,this.minFilter=void 0!==i.minFilter?i.minFilter:THREE.LinearMipMapLinearFilter,this.anisotropy=void 0!==i.anisotropy?i.anisotropy:1,this.offset=new THREE.Vector2(0,0),this.repeat=new THREE.Vector2(1,1),this.format=void 0!==i.format?i.format:THREE.RGBAFormat,this.type=void 0!==i.type?i.type:THREE.UnsignedByteType,this.depthBuffer=void 0!==i.depthBuffer?i.depthBuffer:!0,this.stencilBuffer=void 0!==i.stencilBuffer?i.stencilBuffer:!0,this.generateMipmaps=!0,this.shareDepthFrom=null},THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,setSize:function(t,e){this.width=t,this.height=e},clone:function(){var t=new THREE.WebGLRenderTarget(this.width,this.height);return t.wrapS=this.wrapS,t.wrapT=this.wrapT,t.magFilter=this.magFilter,t.minFilter=this.minFilter,t.anisotropy=this.anisotropy,t.offset.copy(this.offset),t.repeat.copy(this.repeat),t.format=this.format,t.type=this.type,t.depthBuffer=this.depthBuffer,t.stencilBuffer=this.stencilBuffer,t.generateMipmaps=this.generateMipmaps,t.shareDepthFrom=this.shareDepthFrom,t},dispose:function(){this.dispatchEvent({type:"dispose"})}},THREE.EventDispatcher.prototype.apply(THREE.WebGLRenderTarget.prototype),THREE.WebGLRenderTargetCube=function(t,e,i){THREE.WebGLRenderTarget.call(this,t,e,i),this.activeCubeFace=0},THREE.WebGLRenderTargetCube.prototype=Object.create(THREE.WebGLRenderTarget.prototype),THREE.WebGLExtensions=function(t){var e={};this.get=function(i){if(void 0!==e[i])return e[i];var n;switch(i){case"OES_texture_float":n=t.getExtension("OES_texture_float");break;case"OES_texture_float_linear":n=t.getExtension("OES_texture_float_linear");break;case"OES_standard_derivatives":n=t.getExtension("OES_standard_derivatives");break;case"EXT_texture_filter_anisotropic":n=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"OES_element_index_uint":n=t.getExtension("OES_element_index_uint");break;case"EXT_blend_minmax":n=t.getExtension("EXT_blend_minmax");break;case"EXT_frag_depth":n=t.getExtension("EXT_frag_depth")}return null===n&&console.log("THREE.WebGLRenderer: "+i+" extension not supported."),e[i]=n}},THREE.WebGLProgram=function(){var t=0;return function(e,i,n,r){var o=e.context,s=n.defines,a=n.__webglShader.uniforms,l=n.attributes,h=n.__webglShader.vertexShader,c=n.__webglShader.fragmentShader,u=n.index0AttributeName;void 0===u&&!0===r.morphTargets&&(u="position");var d="SHADOWMAP_TYPE_BASIC";r.shadowMapType===THREE.PCFShadowMap?d="SHADOWMAP_TYPE_PCF":r.shadowMapType===THREE.PCFSoftShadowMap&&(d="SHADOWMAP_TYPE_PCF_SOFT");var p,f;p=[];for(var m in s)f=s[m],!1!==f&&(f="#define "+m+" "+f,p.push(f));p=p.join("\n"),s=o.createProgram(),n instanceof THREE.RawShaderMaterial?e=n="":(n=["precision "+r.precision+" float;","precision "+r.precision+" int;",p,r.supportsVertexTextures?"#define VERTEX_TEXTURES":"",e.gammaInput?"#define GAMMA_INPUT":"",e.gammaOutput?"#define GAMMA_OUTPUT":"","#define MAX_DIR_LIGHTS "+r.maxDirLights,"#define MAX_POINT_LIGHTS "+r.maxPointLights,"#define MAX_SPOT_LIGHTS "+r.maxSpotLights,"#define MAX_HEMI_LIGHTS "+r.maxHemiLights,"#define MAX_SHADOWS "+r.maxShadows,"#define MAX_BONES "+r.maxBones,r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.lightMap?"#define USE_LIGHTMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.vertexColors?"#define USE_COLOR":"",r.skinning?"#define USE_SKINNING":"",r.useVertexTexture?"#define BONE_TEXTURE":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals?"#define USE_MORPHNORMALS":"",r.wrapAround?"#define WRAP_AROUND":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+d:"",r.shadowMapDebug?"#define SHADOWMAP_DEBUG":"",r.shadowMapCascade?"#define SHADOWMAP_CASCADE":"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 cameraPosition;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\nattribute vec2 uv2;\n#ifdef USE_COLOR\n attribute vec3 color;\n#endif\n#ifdef USE_MORPHTARGETS\n attribute vec3 morphTarget0;\n attribute vec3 morphTarget1;\n attribute vec3 morphTarget2;\n attribute vec3 morphTarget3;\n #ifdef USE_MORPHNORMALS\n attribute vec3 morphNormal0;\n attribute vec3 morphNormal1;\n attribute vec3 morphNormal2;\n attribute vec3 morphNormal3;\n #else\n attribute vec3 morphTarget4;\n attribute vec3 morphTarget5;\n attribute vec3 morphTarget6;\n attribute vec3 morphTarget7;\n #endif\n#endif\n#ifdef USE_SKINNING\n attribute vec4 skinIndex;\n attribute vec4 skinWeight;\n#endif\n"].join("\n"),e=["precision "+r.precision+" float;","precision "+r.precision+" int;",r.bumpMap||r.normalMap?"#extension GL_OES_standard_derivatives : enable":"",p,"#define MAX_DIR_LIGHTS "+r.maxDirLights,"#define MAX_POINT_LIGHTS "+r.maxPointLights,"#define MAX_SPOT_LIGHTS "+r.maxSpotLights,"#define MAX_HEMI_LIGHTS "+r.maxHemiLights,"#define MAX_SHADOWS "+r.maxShadows,r.alphaTest?"#define ALPHATEST "+r.alphaTest:"",e.gammaInput?"#define GAMMA_INPUT":"",e.gammaOutput?"#define GAMMA_OUTPUT":"",r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.lightMap?"#define USE_LIGHTMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.vertexColors?"#define USE_COLOR":"",r.metal?"#define METAL":"",r.wrapAround?"#define WRAP_AROUND":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+d:"",r.shadowMapDebug?"#define SHADOWMAP_DEBUG":"",r.shadowMapCascade?"#define SHADOWMAP_CASCADE":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;\nuniform vec3 cameraPosition;\n"].join("\n")),h=new THREE.WebGLShader(o,o.VERTEX_SHADER,n+h),c=new THREE.WebGLShader(o,o.FRAGMENT_SHADER,e+c),o.attachShader(s,h),o.attachShader(s,c),void 0!==u&&o.bindAttribLocation(s,0,u),o.linkProgram(s),!1===o.getProgramParameter(s,o.LINK_STATUS)&&(console.error("THREE.WebGLProgram: Could not initialise shader."),console.error("gl.VALIDATE_STATUS",o.getProgramParameter(s,o.VALIDATE_STATUS)),console.error("gl.getError()",o.getError())),""!==o.getProgramInfoLog(s)&&console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",o.getProgramInfoLog(s)),o.deleteShader(h),o.deleteShader(c),u="viewMatrix modelViewMatrix projectionMatrix normalMatrix modelMatrix cameraPosition morphTargetInfluences bindMatrix bindMatrixInverse".split(" "),r.useVertexTexture?(u.push("boneTexture"),u.push("boneTextureWidth"),u.push("boneTextureHeight")):u.push("boneGlobalMatrices"),r.logarithmicDepthBuffer&&u.push("logDepthBufFC");for(var g in a)u.push(g);for(a=u,g={},u=0,e=a.length;e>u;u++)d=a[u],g[d]=o.getUniformLocation(s,d);for(this.uniforms=g,u="position normal uv uv2 tangent color skinIndex skinWeight lineDistance".split(" "),a=0;a<r.maxMorphTargets;a++)u.push("morphTarget"+a);for(a=0;a<r.maxMorphNormals;a++)u.push("morphNormal"+a);for(var v in l)u.push(v);for(r=u,l={},v=0,a=r.length;a>v;v++)g=r[v],l[g]=o.getAttribLocation(s,g);return this.attributes=l,this.attributesKeys=Object.keys(this.attributes),this.id=t++,this.code=i,this.usedTimes=1,this.program=s,this.vertexShader=h,this.fragmentShader=c,this}}(),THREE.WebGLShader=function(){var t=function(t){t=t.split("\n");for(var e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join("\n")};return function(e,i,n){return i=e.createShader(i),e.shaderSource(i,n),e.compileShader(i),!1===e.getShaderParameter(i,e.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==e.getShaderInfoLog(i)&&(console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e.getShaderInfoLog(i)),console.warn(t(n))),i}}(),THREE.LensFlarePlugin=function(t,e){var i,n,r,o,s,a,l,h,c,u,d,p,f,m,g,v,y=t.context;this.render=function(E,b,_,T){if(0!==e.length){E=new THREE.Vector3;var x=T/_,w=.5*_,R=.5*T,S=16/T,M=new THREE.Vector2(S*x,S),C=new THREE.Vector3(1,1,0),H=new THREE.Vector2(1,1);if(void 0===f){var S=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),D=new Uint16Array([0,1,2,0,2,3]);d=y.createBuffer(),p=y.createBuffer(),y.bindBuffer(y.ARRAY_BUFFER,d),y.bufferData(y.ARRAY_BUFFER,S,y.STATIC_DRAW),y.bindBuffer(y.ELEMENT_ARRAY_BUFFER,p),y.bufferData(y.ELEMENT_ARRAY_BUFFER,D,y.STATIC_DRAW),g=y.createTexture(),v=y.createTexture(),y.bindTexture(y.TEXTURE_2D,g),y.texImage2D(y.TEXTURE_2D,0,y.RGB,16,16,0,y.RGB,y.UNSIGNED_BYTE,null),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_S,y.CLAMP_TO_EDGE),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_T,y.CLAMP_TO_EDGE),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MAG_FILTER,y.NEAREST),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MIN_FILTER,y.NEAREST),y.bindTexture(y.TEXTURE_2D,v),y.texImage2D(y.TEXTURE_2D,0,y.RGBA,16,16,0,y.RGBA,y.UNSIGNED_BYTE,null),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_S,y.CLAMP_TO_EDGE),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_T,y.CLAMP_TO_EDGE),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MAG_FILTER,y.NEAREST),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MIN_FILTER,y.NEAREST);var S=(m=0<y.getParameter(y.MAX_VERTEX_TEXTURE_IMAGE_UNITS))?{vertexShader:"uniform lowp int renderType;\nuniform vec3 screenPosition;\nuniform vec2 scale;\nuniform float rotation;\nuniform sampler2D occlusionMap;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvarying float vVisibility;\nvoid main() {\nvUV = uv;\nvec2 pos = position;\nif( renderType == 2 ) {\nvec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );\nvVisibility = visibility.r / 9.0;\nvVisibility *= 1.0 - visibility.g / 9.0;\nvVisibility *= visibility.b / 9.0;\nvVisibility *= 1.0 - visibility.a / 9.0;\npos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\npos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n}\ngl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );\n}",fragmentShader:"uniform lowp int renderType;\nuniform sampler2D map;\nuniform float opacity;\nuniform vec3 color;\nvarying vec2 vUV;\nvarying float vVisibility;\nvoid main() {\nif( renderType == 0 ) {\ngl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );\n} else if( renderType == 1 ) {\ngl_FragColor = texture2D( map, vUV );\n} else {\nvec4 texture = texture2D( map, vUV );\ntexture.a *= opacity * vVisibility;\ngl_FragColor = texture;\ngl_FragColor.rgb *= color;\n}\n}"}:{vertexShader:"uniform lowp int renderType;\nuniform vec3 screenPosition;\nuniform vec2 scale;\nuniform float rotation;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvoid main() {\nvUV = uv;\nvec2 pos = position;\nif( renderType == 2 ) {\npos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\npos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n}\ngl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );\n}",fragmentShader:"precision mediump float;\nuniform lowp int renderType;\nuniform sampler2D map;\nuniform sampler2D occlusionMap;\nuniform float opacity;\nuniform vec3 color;\nvarying vec2 vUV;\nvoid main() {\nif( renderType == 0 ) {\ngl_FragColor = vec4( texture2D( map, vUV ).rgb, 0.0 );\n} else if( renderType == 1 ) {\ngl_FragColor = texture2D( map, vUV );\n} else {\nfloat visibility = texture2D( occlusionMap, vec2( 0.5, 0.1 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) ).a;\nvisibility = ( 1.0 - visibility / 4.0 );\nvec4 texture = texture2D( map, vUV );\ntexture.a *= opacity * visibility;\ngl_FragColor = texture;\ngl_FragColor.rgb *= color;\n}\n}"},D=y.createProgram(),P=y.createShader(y.FRAGMENT_SHADER),k=y.createShader(y.VERTEX_SHADER),A="precision "+t.getPrecision()+" float;\n";y.shaderSource(P,A+S.fragmentShader),y.shaderSource(k,A+S.vertexShader),y.compileShader(P),y.compileShader(k),y.attachShader(D,P),y.attachShader(D,k),y.linkProgram(D),f=D,c=y.getAttribLocation(f,"position"),u=y.getAttribLocation(f,"uv"),i=y.getUniformLocation(f,"renderType"),n=y.getUniformLocation(f,"map"),r=y.getUniformLocation(f,"occlusionMap"),o=y.getUniformLocation(f,"opacity"),s=y.getUniformLocation(f,"color"),a=y.getUniformLocation(f,"scale"),l=y.getUniformLocation(f,"rotation"),h=y.getUniformLocation(f,"screenPosition")}for(y.useProgram(f),y.enableVertexAttribArray(c),y.enableVertexAttribArray(u),y.uniform1i(r,0),y.uniform1i(n,1),y.bindBuffer(y.ARRAY_BUFFER,d),y.vertexAttribPointer(c,2,y.FLOAT,!1,16,0),y.vertexAttribPointer(u,2,y.FLOAT,!1,16,8),y.bindBuffer(y.ELEMENT_ARRAY_BUFFER,p),y.disable(y.CULL_FACE),y.depthMask(!1),D=0,P=e.length;P>D;D++)if(S=16/T,M.set(S*x,S),k=e[D],E.set(k.matrixWorld.elements[12],k.matrixWorld.elements[13],k.matrixWorld.elements[14]),E.applyMatrix4(b.matrixWorldInverse),E.applyProjection(b.projectionMatrix),C.copy(E),H.x=C.x*w+w,H.y=C.y*R+R,m||0<H.x&&H.x<_&&0<H.y&&H.y<T){y.activeTexture(y.TEXTURE1),y.bindTexture(y.TEXTURE_2D,g),y.copyTexImage2D(y.TEXTURE_2D,0,y.RGB,H.x-8,H.y-8,16,16,0),y.uniform1i(i,0),y.uniform2f(a,M.x,M.y),y.uniform3f(h,C.x,C.y,C.z),y.disable(y.BLEND),y.enable(y.DEPTH_TEST),y.drawElements(y.TRIANGLES,6,y.UNSIGNED_SHORT,0),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,v),y.copyTexImage2D(y.TEXTURE_2D,0,y.RGBA,H.x-8,H.y-8,16,16,0),y.uniform1i(i,1),y.disable(y.DEPTH_TEST),y.activeTexture(y.TEXTURE1),y.bindTexture(y.TEXTURE_2D,g),y.drawElements(y.TRIANGLES,6,y.UNSIGNED_SHORT,0),k.positionScreen.copy(C),k.customUpdateCallback?k.customUpdateCallback(k):k.updateLensFlares(),y.uniform1i(i,2),y.enable(y.BLEND);for(var A=0,L=k.lensFlares.length;L>A;A++){var I=k.lensFlares[A];.001<I.opacity&&.001<I.scale&&(C.x=I.x,C.y=I.y,C.z=I.z,S=I.size*I.scale/T,M.x=S*x,M.y=S,y.uniform3f(h,C.x,C.y,C.z),y.uniform2f(a,M.x,M.y),y.uniform1f(l,I.rotation),y.uniform1f(o,I.opacity),y.uniform3f(s,I.color.r,I.color.g,I.color.b),t.setBlending(I.blending,I.blendEquation,I.blendSrc,I.blendDst),t.setTexture(I.texture,1),y.drawElements(y.TRIANGLES,6,y.UNSIGNED_SHORT,0))}}y.enable(y.CULL_FACE),y.enable(y.DEPTH_TEST),y.depthMask(!0),t.resetGLState()}}},THREE.ShadowMapPlugin=function(t,e,i,n){function r(t,e,n){if(e.visible){var o=i[e.id];if(o&&e.castShadow&&(!1===e.frustumCulled||!0===c.intersectsObject(e)))for(var s=0,a=o.length;a>s;s++){var l=o[s];e._modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),m.push(l)}for(s=0,a=e.children.length;a>s;s++)r(t,e.children[s],n)}}var o,s,a,l,h=t.context,c=new THREE.Frustum,u=new THREE.Matrix4,d=new THREE.Vector3,p=new THREE.Vector3,f=new THREE.Vector3,m=[],g=THREE.ShaderLib.depthRGBA,v=THREE.UniformsUtils.clone(g.uniforms);o=new THREE.ShaderMaterial({uniforms:v,vertexShader:g.vertexShader,fragmentShader:g.fragmentShader}),s=new THREE.ShaderMaterial({uniforms:v,vertexShader:g.vertexShader,fragmentShader:g.fragmentShader,morphTargets:!0}),a=new THREE.ShaderMaterial({uniforms:v,vertexShader:g.vertexShader,fragmentShader:g.fragmentShader,skinning:!0}),l=new THREE.ShaderMaterial({uniforms:v,vertexShader:g.vertexShader,fragmentShader:g.fragmentShader,morphTargets:!0,skinning:!0}),o._shadowPass=!0,s._shadowPass=!0,a._shadowPass=!0,l._shadowPass=!0,this.render=function(i,g){if(!1!==t.shadowMapEnabled){var v,y,E,b,_,T,x,w,R=[];for(b=0,h.clearColor(1,1,1,1),h.disable(h.BLEND),h.enable(h.CULL_FACE),h.frontFace(h.CCW),h.cullFace(t.shadowMapCullFace===THREE.CullFaceFront?h.FRONT:h.BACK),t.setDepthTest(!0),v=0,y=e.length;y>v;v++)if(E=e[v],E.castShadow)if(E instanceof THREE.DirectionalLight&&E.shadowCascade)for(_=0;_<E.shadowCascadeCount;_++){var S;if(E.shadowCascadeArray[_])S=E.shadowCascadeArray[_];else{x=E;var M=_;S=new THREE.DirectionalLight,S.isVirtual=!0,S.onlyShadow=!0,S.castShadow=!0,S.shadowCameraNear=x.shadowCameraNear,S.shadowCameraFar=x.shadowCameraFar,S.shadowCameraLeft=x.shadowCameraLeft,S.shadowCameraRight=x.shadowCameraRight,S.shadowCameraBottom=x.shadowCameraBottom,S.shadowCameraTop=x.shadowCameraTop,S.shadowCameraVisible=x.shadowCameraVisible,S.shadowDarkness=x.shadowDarkness,S.shadowBias=x.shadowCascadeBias[M],S.shadowMapWidth=x.shadowCascadeWidth[M],S.shadowMapHeight=x.shadowCascadeHeight[M],S.pointsWorld=[],S.pointsFrustum=[],w=S.pointsWorld,T=S.pointsFrustum;for(var C=0;8>C;C++)w[C]=new THREE.Vector3,T[C]=new THREE.Vector3;w=x.shadowCascadeNearZ[M],x=x.shadowCascadeFarZ[M],T[0].set(-1,-1,w),T[1].set(1,-1,w),T[2].set(-1,1,w),T[3].set(1,1,w),T[4].set(-1,-1,x),T[5].set(1,-1,x),T[6].set(-1,1,x),T[7].set(1,1,x),S.originalCamera=g,T=new THREE.Gyroscope,T.position.copy(E.shadowCascadeOffset),T.add(S),T.add(S.target),g.add(T),E.shadowCascadeArray[_]=S,console.log("Created virtualLight",S)}M=E,w=_,x=M.shadowCascadeArray[w],x.position.copy(M.position),x.target.position.copy(M.target.position),x.lookAt(x.target),x.shadowCameraVisible=M.shadowCameraVisible,x.shadowDarkness=M.shadowDarkness,x.shadowBias=M.shadowCascadeBias[w],T=M.shadowCascadeNearZ[w],M=M.shadowCascadeFarZ[w],x=x.pointsFrustum,x[0].z=T,x[1].z=T,x[2].z=T,x[3].z=T,x[4].z=M,x[5].z=M,x[6].z=M,x[7].z=M,R[b]=S,b++}else R[b]=E,b++;for(v=0,y=R.length;y>v;v++){if(E=R[v],E.shadowMap||(_=THREE.LinearFilter,t.shadowMapType===THREE.PCFSoftShadowMap&&(_=THREE.NearestFilter),E.shadowMap=new THREE.WebGLRenderTarget(E.shadowMapWidth,E.shadowMapHeight,{minFilter:_,magFilter:_,format:THREE.RGBAFormat}),E.shadowMapSize=new THREE.Vector2(E.shadowMapWidth,E.shadowMapHeight),E.shadowMatrix=new THREE.Matrix4),!E.shadowCamera){if(E instanceof THREE.SpotLight)E.shadowCamera=new THREE.PerspectiveCamera(E.shadowCameraFov,E.shadowMapWidth/E.shadowMapHeight,E.shadowCameraNear,E.shadowCameraFar);else{if(!(E instanceof THREE.DirectionalLight)){console.error("Unsupported light type for shadow");continue}E.shadowCamera=new THREE.OrthographicCamera(E.shadowCameraLeft,E.shadowCameraRight,E.shadowCameraTop,E.shadowCameraBottom,E.shadowCameraNear,E.shadowCameraFar)}i.add(E.shadowCamera),!0===i.autoUpdate&&i.updateMatrixWorld()}if(E.shadowCameraVisible&&!E.cameraHelper&&(E.cameraHelper=new THREE.CameraHelper(E.shadowCamera),i.add(E.cameraHelper)),E.isVirtual&&S.originalCamera==g){for(_=g,b=E.shadowCamera,T=E.pointsFrustum,x=E.pointsWorld,d.set(1/0,1/0,1/0),p.set(-1/0,-1/0,-1/0),M=0;8>M;M++)w=x[M],w.copy(T[M]),w.unproject(_),w.applyMatrix4(b.matrixWorldInverse),w.x<d.x&&(d.x=w.x),w.x>p.x&&(p.x=w.x),w.y<d.y&&(d.y=w.y),w.y>p.y&&(p.y=w.y),w.z<d.z&&(d.z=w.z),w.z>p.z&&(p.z=w.z);b.left=d.x,b.right=p.x,b.top=p.y,b.bottom=d.y,b.updateProjectionMatrix()}for(b=E.shadowMap,T=E.shadowMatrix,_=E.shadowCamera,_.position.setFromMatrixPosition(E.matrixWorld),f.setFromMatrixPosition(E.target.matrixWorld),_.lookAt(f),_.updateMatrixWorld(),_.matrixWorldInverse.getInverse(_.matrixWorld),E.cameraHelper&&(E.cameraHelper.visible=E.shadowCameraVisible),E.shadowCameraVisible&&E.cameraHelper.update(),T.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),T.multiply(_.projectionMatrix),T.multiply(_.matrixWorldInverse),u.multiplyMatrices(_.projectionMatrix,_.matrixWorldInverse),c.setFromMatrix(u),t.setRenderTarget(b),t.clear(),m.length=0,r(i,i,_),E=0,b=m.length;b>E;E++)x=m[E],T=x.object,x=x.buffer,M=T.material instanceof THREE.MeshFaceMaterial?T.material.materials[0]:T.material,w=void 0!==T.geometry.morphTargets&&0<T.geometry.morphTargets.length&&M.morphTargets,C=T instanceof THREE.SkinnedMesh&&M.skinning,w=T.customDepthMaterial?T.customDepthMaterial:C?w?l:a:w?s:o,t.setMaterialFaces(M),x instanceof THREE.BufferGeometry?t.renderBufferDirect(_,e,null,w,x,T):t.renderBuffer(_,e,null,w,x,T);for(E=0,b=n.length;b>E;E++)x=n[E],T=x.object,T.visible&&T.castShadow&&(T._modelViewMatrix.multiplyMatrices(_.matrixWorldInverse,T.matrixWorld),t.renderImmediateObject(_,e,null,o,T))}v=t.getClearColor(),y=t.getClearAlpha(),h.clearColor(v.r,v.g,v.b,y),h.enable(h.BLEND),t.shadowMapCullFace===THREE.CullFaceFront&&h.cullFace(h.BACK),t.resetGLState()}}},THREE.SpritePlugin=function(t,e){function i(t,e){return t.z!==e.z?e.z-t.z:e.id-t.id}var n,r,o,s,a,l,h,c,u,d,p,f,m,g,v,y,E,b,_,T,x,w=t.context;this.render=function(R,S){if(0!==e.length){if(void 0===T){var M=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),C=new Uint16Array([0,1,2,0,2,3]);b=w.createBuffer(),_=w.createBuffer(),w.bindBuffer(w.ARRAY_BUFFER,b),w.bufferData(w.ARRAY_BUFFER,M,w.STATIC_DRAW),w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,_),w.bufferData(w.ELEMENT_ARRAY_BUFFER,C,w.STATIC_DRAW);var M=w.createProgram(),C=w.createShader(w.VERTEX_SHADER),H=w.createShader(w.FRAGMENT_SHADER);w.shaderSource(C,["precision "+t.getPrecision()+" float;","uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvoid main() {\nvUV = uvOffset + uv * uvScale;\nvec2 alignedPosition = position * scale;\nvec2 rotatedPosition;\nrotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\nrotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\nvec4 finalPosition;\nfinalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\nfinalPosition.xy += rotatedPosition;\nfinalPosition = projectionMatrix * finalPosition;\ngl_Position = finalPosition;\n}"].join("\n")),w.shaderSource(H,["precision "+t.getPrecision()+" float;","uniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\nvarying vec2 vUV;\nvoid main() {\nvec4 texture = texture2D( map, vUV );\nif ( texture.a < alphaTest ) discard;\ngl_FragColor = vec4( color * texture.xyz, texture.a * opacity );\nif ( fogType > 0 ) {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat fogFactor = 0.0;\nif ( fogType == 1 ) {\nfogFactor = smoothstep( fogNear, fogFar, depth );\n} else {\nconst float LOG2 = 1.442695;\nfloat fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n}\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}\n}"].join("\n")),w.compileShader(C),w.compileShader(H),w.attachShader(M,C),w.attachShader(M,H),w.linkProgram(M),T=M,y=w.getAttribLocation(T,"position"),E=w.getAttribLocation(T,"uv"),n=w.getUniformLocation(T,"uvOffset"),r=w.getUniformLocation(T,"uvScale"),o=w.getUniformLocation(T,"rotation"),s=w.getUniformLocation(T,"scale"),a=w.getUniformLocation(T,"color"),l=w.getUniformLocation(T,"map"),h=w.getUniformLocation(T,"opacity"),c=w.getUniformLocation(T,"modelViewMatrix"),u=w.getUniformLocation(T,"projectionMatrix"),d=w.getUniformLocation(T,"fogType"),p=w.getUniformLocation(T,"fogDensity"),f=w.getUniformLocation(T,"fogNear"),m=w.getUniformLocation(T,"fogFar"),g=w.getUniformLocation(T,"fogColor"),v=w.getUniformLocation(T,"alphaTest"),M=document.createElement("canvas"),M.width=8,M.height=8,C=M.getContext("2d"),C.fillStyle="white",C.fillRect(0,0,8,8),x=new THREE.Texture(M),x.needsUpdate=!0}w.useProgram(T),w.enableVertexAttribArray(y),w.enableVertexAttribArray(E),w.disable(w.CULL_FACE),w.enable(w.BLEND),w.bindBuffer(w.ARRAY_BUFFER,b),w.vertexAttribPointer(y,2,w.FLOAT,!1,16,0),w.vertexAttribPointer(E,2,w.FLOAT,!1,16,8),w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,_),w.uniformMatrix4fv(u,!1,S.projectionMatrix.elements),w.activeTexture(w.TEXTURE0),w.uniform1i(l,0),C=M=0,(H=R.fog)?(w.uniform3f(g,H.color.r,H.color.g,H.color.b),H instanceof THREE.Fog?(w.uniform1f(f,H.near),w.uniform1f(m,H.far),w.uniform1i(d,1),C=M=1):H instanceof THREE.FogExp2&&(w.uniform1f(p,H.density),w.uniform1i(d,2),C=M=2)):(w.uniform1i(d,0),C=M=0);for(var H=0,D=e.length;D>H;H++){var P=e[H];P._modelViewMatrix.multiplyMatrices(S.matrixWorldInverse,P.matrixWorld),P.z=null===P.renderDepth?-P._modelViewMatrix.elements[14]:P.renderDepth}e.sort(i);for(var k=[],H=0,D=e.length;D>H;H++){var P=e[H],A=P.material;w.uniform1f(v,A.alphaTest),w.uniformMatrix4fv(c,!1,P._modelViewMatrix.elements),k[0]=P.scale.x,k[1]=P.scale.y,P=0,R.fog&&A.fog&&(P=C),M!==P&&(w.uniform1i(d,P),M=P),null!==A.map?(w.uniform2f(n,A.map.offset.x,A.map.offset.y),w.uniform2f(r,A.map.repeat.x,A.map.repeat.y)):(w.uniform2f(n,0,0),w.uniform2f(r,1,1)),w.uniform1f(h,A.opacity),w.uniform3f(a,A.color.r,A.color.g,A.color.b),w.uniform1f(o,A.rotation),w.uniform2fv(s,k),t.setBlending(A.blending,A.blendEquation,A.blendSrc,A.blendDst),t.setDepthTest(A.depthTest),t.setDepthWrite(A.depthWrite),A.map&&A.map.image&&A.map.image.width?t.setTexture(A.map,0):t.setTexture(x,0),w.drawElements(w.TRIANGLES,6,w.UNSIGNED_SHORT,0)}w.enable(w.CULL_FACE),t.resetGLState()}}},THREE.GeometryUtils={merge:function(t,e,i){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var n;e instanceof THREE.Mesh&&(e.matrixAutoUpdate&&e.updateMatrix(),n=e.matrix,e=e.geometry),t.merge(e,n,i)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},THREE.ImageUtils={crossOrigin:void 0,loadTexture:function(t,e,i,n){var r=new THREE.ImageLoader;r.crossOrigin=this.crossOrigin;var o=new THREE.Texture(void 0,e);return r.load(t,function(t){o.image=t,o.needsUpdate=!0,i&&i(o)},void 0,function(t){n&&n(t)}),o.sourceFile=t,o},loadTextureCube:function(t,e,i,n){var r=new THREE.ImageLoader;r.crossOrigin=this.crossOrigin;var o=new THREE.CubeTexture([],e);o.flipY=!1;var s=0;e=function(e){r.load(t[e],function(t){o.images[e]=t,s+=1,6===s&&(o.needsUpdate=!0,i&&i(o))})},n=0;for(var a=t.length;a>n;++n)e(n);return o},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},getNormalMap:function(t,e){var i=function(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);return[t[0]/e,t[1]/e,t[2]/e]};e|=1;var n=t.width,r=t.height,o=document.createElement("canvas");o.width=n,o.height=r;var s=o.getContext("2d");s.drawImage(t,0,0);for(var a=s.getImageData(0,0,n,r).data,l=s.createImageData(n,r),h=l.data,c=0;n>c;c++)for(var u=0;r>u;u++){var d=0>u-1?0:u-1,p=u+1>r-1?r-1:u+1,f=0>c-1?0:c-1,m=c+1>n-1?n-1:c+1,g=[],v=[0,0,a[4*(u*n+c)]/255*e];for(g.push([-1,0,a[4*(u*n+f)]/255*e]),g.push([-1,-1,a[4*(d*n+f)]/255*e]),g.push([0,-1,a[4*(d*n+c)]/255*e]),g.push([1,-1,a[4*(d*n+m)]/255*e]),g.push([1,0,a[4*(u*n+m)]/255*e]),g.push([1,1,a[4*(p*n+m)]/255*e]),g.push([0,1,a[4*(p*n+c)]/255*e]),g.push([-1,1,a[4*(p*n+f)]/255*e]),d=[],f=g.length,p=0;f>p;p++){var m=g[p],y=g[(p+1)%f],m=[m[0]-v[0],m[1]-v[1],m[2]-v[2]],y=[y[0]-v[0],y[1]-v[1],y[2]-v[2]];d.push(i([m[1]*y[2]-m[2]*y[1],m[2]*y[0]-m[0]*y[2],m[0]*y[1]-m[1]*y[0]]))}for(g=[0,0,0],p=0;p<d.length;p++)g[0]+=d[p][0],g[1]+=d[p][1],g[2]+=d[p][2];g[0]/=d.length,g[1]/=d.length,g[2]/=d.length,v=4*(u*n+c),h[v]=(g[0]+1)/2*255|0,h[v+1]=(g[1]+1)/2*255|0,h[v+2]=255*g[2]|0,h[v+3]=255}return s.putImageData(l,0,0),o},generateDataTexture:function(t,e,i){var n=t*e,r=new Uint8Array(3*n),o=Math.floor(255*i.r),s=Math.floor(255*i.g);i=Math.floor(255*i.b);for(var a=0;n>a;a++)r[3*a]=o,r[3*a+1]=s,r[3*a+2]=i;return t=new THREE.DataTexture(r,t,e,THREE.RGBFormat),t.needsUpdate=!0,t}},THREE.SceneUtils={createMultiMaterialObject:function(t,e){for(var i=new THREE.Object3D,n=0,r=e.length;r>n;n++)i.add(new THREE.Mesh(t,e[n]));return i},detach:function(t,e,i){t.applyMatrix(e.matrixWorld),e.remove(t),i.add(t)},attach:function(t,e,i){var n=new THREE.Matrix4;n.getInverse(i.matrixWorld),t.applyMatrix(n),e.remove(t),i.add(t)}},THREE.FontUtils={faces:{},face:"helvetiker",weight:"normal",style:"normal",size:150,divisions:10,getFace:function(){try{return this.faces[this.face][this.weight][this.style]}catch(t){throw"The font "+this.face+" with "+this.weight+" weight and "+this.style+" style is missing."}},loadFace:function(t){var e=t.familyName.toLowerCase();return this.faces[e]=this.faces[e]||{},this.faces[e][t.cssFontWeight]=this.faces[e][t.cssFontWeight]||{},this.faces[e][t.cssFontWeight][t.cssFontStyle]=t,this.faces[e][t.cssFontWeight][t.cssFontStyle]=t},drawText:function(t){var e=this.getFace(),i=this.size/e.resolution,n=0,r=String(t).split(""),o=r.length,s=[];for(t=0;o>t;t++){var a=new THREE.Path,a=this.extractGlyphPoints(r[t],e,i,n,a),n=n+a.offset;s.push(a.path)}return{paths:s,offset:n/2}},extractGlyphPoints:function(t,e,i,n,r){var o,s,a,l,h,c,u,d,p,f,m,g=[],v=e.glyphs[t]||e.glyphs["?"];if(v){if(v.o)for(e=v._cachedOutline||(v._cachedOutline=v.o.split(" ")),l=e.length,t=0;l>t;)switch(a=e[t++]){case"m":a=e[t++]*i+n,h=e[t++]*i,r.moveTo(a,h);break;case"l":a=e[t++]*i+n,h=e[t++]*i,r.lineTo(a,h);break;case"q":if(a=e[t++]*i+n,h=e[t++]*i,d=e[t++]*i+n,p=e[t++]*i,r.quadraticCurveTo(d,p,a,h),o=g[g.length-1])for(c=o.x,u=o.y,o=1,s=this.divisions;s>=o;o++){var y=o/s;THREE.Shape.Utils.b2(y,c,d,a),THREE.Shape.Utils.b2(y,u,p,h)}break;case"b":if(a=e[t++]*i+n,h=e[t++]*i,d=e[t++]*i+n,p=e[t++]*i,f=e[t++]*i+n,m=e[t++]*i,r.bezierCurveTo(d,p,f,m,a,h),o=g[g.length-1])for(c=o.x,u=o.y,o=1,s=this.divisions;s>=o;o++)y=o/s,THREE.Shape.Utils.b3(y,c,d,f,a),THREE.Shape.Utils.b3(y,u,p,m,h)}return{offset:v.ha*i,path:r}}}},THREE.FontUtils.generateShapes=function(t,e){e=e||{};var i=void 0!==e.curveSegments?e.curveSegments:4,n=void 0!==e.font?e.font:"helvetiker",r=void 0!==e.weight?e.weight:"normal",o=void 0!==e.style?e.style:"normal";for(THREE.FontUtils.size=void 0!==e.size?e.size:100,THREE.FontUtils.divisions=i,THREE.FontUtils.face=n,THREE.FontUtils.weight=r,THREE.FontUtils.style=o,i=THREE.FontUtils.drawText(t).paths,n=[],r=0,o=i.length;o>r;r++)Array.prototype.push.apply(n,i[r].toShapes());
  32. return n},function(t){var e=function(t){for(var e=t.length,i=0,n=e-1,r=0;e>r;n=r++)i+=t[n].x*t[r].y-t[r].x*t[n].y;return.5*i};return t.Triangulate=function(t,i){var n=t.length;if(3>n)return null;var r,o,s,a=[],l=[],h=[];if(0<e(t))for(o=0;n>o;o++)l[o]=o;else for(o=0;n>o;o++)l[o]=n-1-o;var c=2*n;for(o=n-1;n>2;){if(0>=c--){console.log("Warning, unable to triangulate polygon!");break}r=o,r>=n&&(r=0),o=r+1,o>=n&&(o=0),s=o+1,s>=n&&(s=0);var u;t:{var d=u=void 0,p=void 0,f=void 0,m=void 0,g=void 0,v=void 0,y=void 0,E=void 0,d=t[l[r]].x,p=t[l[r]].y,f=t[l[o]].x,m=t[l[o]].y,g=t[l[s]].x,v=t[l[s]].y;if(1e-10>(f-d)*(v-p)-(m-p)*(g-d))u=!1;else{var b=void 0,_=void 0,T=void 0,x=void 0,w=void 0,R=void 0,S=void 0,M=void 0,C=void 0,H=void 0,C=M=S=E=y=void 0,b=g-f,_=v-m,T=d-g,x=p-v,w=f-d,R=m-p;for(u=0;n>u;u++)if(y=t[l[u]].x,E=t[l[u]].y,!(y===d&&E===p||y===f&&E===m||y===g&&E===v)&&(S=y-d,M=E-p,C=y-f,H=E-m,y-=g,E-=v,C=b*H-_*C,S=w*M-R*S,M=T*E-x*y,C>=-1e-10&&M>=-1e-10&&S>=-1e-10)){u=!1;break t}u=!0}}if(u){for(a.push([t[l[r]],t[l[o]],t[l[s]]]),h.push([l[r],l[o],l[s]]),r=o,s=o+1;n>s;r++,s++)l[r]=l[s];n--,c=2*n}}return i?h:a},t.Triangulate.area=e,t}(THREE.FontUtils),self._typeface_js={faces:THREE.FontUtils.faces,loadFace:THREE.FontUtils.loadFace},THREE.typeface_js=self._typeface_js,THREE.Audio=function(t){THREE.Object3D.call(this),this.type="Audio",this.context=t.context,this.source=this.context.createBufferSource(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.panner=this.context.createPanner(),this.panner.connect(this.gain)},THREE.Audio.prototype=Object.create(THREE.Object3D.prototype),THREE.Audio.prototype.load=function(t){var e=this,i=new XMLHttpRequest;return i.open("GET",t,!0),i.responseType="arraybuffer",i.onload=function(){e.context.decodeAudioData(this.response,function(t){e.source.buffer=t,e.source.connect(e.panner),e.source.start(0)})},i.send(),this},THREE.Audio.prototype.setLoop=function(t){this.source.loop=t},THREE.Audio.prototype.setRefDistance=function(t){this.panner.refDistance=t},THREE.Audio.prototype.setRolloffFactor=function(t){this.panner.rolloffFactor=t},THREE.Audio.prototype.updateMatrixWorld=function(){var t=new THREE.Vector3;return function(e){THREE.Object3D.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}(),THREE.AudioListener=function(){THREE.Object3D.call(this),this.type="AudioListener",this.context=new(window.AudioContext||window.webkitAudioContext)},THREE.AudioListener.prototype=Object.create(THREE.Object3D.prototype),THREE.AudioListener.prototype.updateMatrixWorld=function(){var t=new THREE.Vector3,e=new THREE.Quaternion,i=new THREE.Vector3,n=new THREE.Vector3,r=new THREE.Vector3,o=new THREE.Vector3;return function(s){THREE.Object3D.prototype.updateMatrixWorld.call(this,s),s=this.context.listener,this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),r.subVectors(t,o),s.setPosition(t.x,t.y,t.z),s.setOrientation(n.x,n.y,n.z,this.up.x,this.up.y,this.up.z),s.setVelocity(r.x,r.y,r.z),o.copy(t)}}(),THREE.Curve=function(){},THREE.Curve.prototype.getPoint=function(){return console.log("Warning, getPoint() not implemented!"),null},THREE.Curve.prototype.getPointAt=function(t){return t=this.getUtoTmapping(t),this.getPoint(t)},THREE.Curve.prototype.getPoints=function(t){t||(t=5);var e,i=[];for(e=0;t>=e;e++)i.push(this.getPoint(e/t));return i},THREE.Curve.prototype.getSpacedPoints=function(t){t||(t=5);var e,i=[];for(e=0;t>=e;e++)i.push(this.getPointAt(e/t));return i},THREE.Curve.prototype.getLength=function(){var t=this.getLengths();return t[t.length-1]},THREE.Curve.prototype.getLengths=function(t){if(t||(t=this.__arcLengthDivisions?this.__arcLengthDivisions:200),this.cacheArcLengths&&this.cacheArcLengths.length==t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i,n=[],r=this.getPoint(0),o=0;for(n.push(0),i=1;t>=i;i++)e=this.getPoint(i/t),o+=e.distanceTo(r),n.push(o),r=e;return this.cacheArcLengths=n},THREE.Curve.prototype.updateArcLengths=function(){this.needsUpdate=!0,this.getLengths()},THREE.Curve.prototype.getUtoTmapping=function(t,e){var i,n=this.getLengths(),r=0,o=n.length;i=e?e:t*n[o-1];for(var s,a=0,l=o-1;l>=a;)if(r=Math.floor(a+(l-a)/2),s=n[r]-i,0>s)a=r+1;else{if(!(s>0)){l=r;break}l=r-1}return r=l,n[r]==i?r/(o-1):(a=n[r],n=(r+(i-a)/(n[r+1]-a))/(o-1))},THREE.Curve.prototype.getTangent=function(t){var e=t-1e-4;return t+=1e-4,0>e&&(e=0),t>1&&(t=1),e=this.getPoint(e),this.getPoint(t).clone().sub(e).normalize()},THREE.Curve.prototype.getTangentAt=function(t){return t=this.getUtoTmapping(t),this.getTangent(t)},THREE.Curve.Utils={tangentQuadraticBezier:function(t,e,i,n){return 2*(1-t)*(i-e)+2*t*(n-i)},tangentCubicBezier:function(t,e,i,n,r){return-3*e*(1-t)*(1-t)+3*i*(1-t)*(1-t)-6*t*i*(1-t)+6*t*n*(1-t)-3*t*t*n+3*t*t*r},tangentSpline:function(t){return 6*t*t-6*t+(3*t*t-4*t+1)+(-6*t*t+6*t)+(3*t*t-2*t)},interpolate:function(t,e,i,n,r){t=.5*(i-t),n=.5*(n-e);var o=r*r;return(2*e-2*i+t+n)*r*o+(-3*e+3*i-2*t-n)*o+t*r+e}},THREE.Curve.create=function(t,e){return t.prototype=Object.create(THREE.Curve.prototype),t.prototype.getPoint=e,t},THREE.CurvePath=function(){this.curves=[],this.bends=[],this.autoClose=!1},THREE.CurvePath.prototype=Object.create(THREE.Curve.prototype),THREE.CurvePath.prototype.add=function(t){this.curves.push(t)},THREE.CurvePath.prototype.checkConnection=function(){},THREE.CurvePath.prototype.closePath=function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new THREE.LineCurve(e,t))},THREE.CurvePath.prototype.getPoint=function(t){var e=t*this.getLength(),i=this.getCurveLengths();for(t=0;t<i.length;){if(i[t]>=e)return e=i[t]-e,t=this.curves[t],e=1-e/t.getLength(),t.getPointAt(e);t++}return null},THREE.CurvePath.prototype.getLength=function(){var t=this.getCurveLengths();return t[t.length-1]},THREE.CurvePath.prototype.getCurveLengths=function(){if(this.cacheLengths&&this.cacheLengths.length==this.curves.length)return this.cacheLengths;var t,e=[],i=0,n=this.curves.length;for(t=0;n>t;t++)i+=this.curves[t].getLength(),e.push(i);return this.cacheLengths=e},THREE.CurvePath.prototype.getBoundingBox=function(){var t,e,i,n,r,o,s=this.getPoints();t=e=Number.NEGATIVE_INFINITY,n=r=Number.POSITIVE_INFINITY;var a,l,h,c,u=s[0]instanceof THREE.Vector3;for(c=u?new THREE.Vector3:new THREE.Vector2,l=0,h=s.length;h>l;l++)a=s[l],a.x>t?t=a.x:a.x<n&&(n=a.x),a.y>e?e=a.y:a.y<r&&(r=a.y),u&&(a.z>i?i=a.z:a.z<o&&(o=a.z)),c.add(a);return s={minX:n,minY:r,maxX:t,maxY:e},u&&(s.maxZ=i,s.minZ=o),s},THREE.CurvePath.prototype.createPointsGeometry=function(t){return t=this.getPoints(t,!0),this.createGeometry(t)},THREE.CurvePath.prototype.createSpacedPointsGeometry=function(t){return t=this.getSpacedPoints(t,!0),this.createGeometry(t)},THREE.CurvePath.prototype.createGeometry=function(t){for(var e=new THREE.Geometry,i=0;i<t.length;i++)e.vertices.push(new THREE.Vector3(t[i].x,t[i].y,t[i].z||0));return e},THREE.CurvePath.prototype.addWrapPath=function(t){this.bends.push(t)},THREE.CurvePath.prototype.getTransformedPoints=function(t,e){var i,n,r=this.getPoints(t);for(e||(e=this.bends),i=0,n=e.length;n>i;i++)r=this.getWrapPoints(r,e[i]);return r},THREE.CurvePath.prototype.getTransformedSpacedPoints=function(t,e){var i,n,r=this.getSpacedPoints(t);for(e||(e=this.bends),i=0,n=e.length;n>i;i++)r=this.getWrapPoints(r,e[i]);return r},THREE.CurvePath.prototype.getWrapPoints=function(t,e){var i,n,r,o,s,a,l=this.getBoundingBox();for(i=0,n=t.length;n>i;i++)r=t[i],o=r.x,s=r.y,a=o/l.maxX,a=e.getUtoTmapping(a,o),o=e.getPoint(a),a=e.getTangent(a),a.set(-a.y,a.x).multiplyScalar(s),r.x=o.x+a.x,r.y=o.y+a.y;return t},THREE.Gyroscope=function(){THREE.Object3D.call(this)},THREE.Gyroscope.prototype=Object.create(THREE.Object3D.prototype),THREE.Gyroscope.prototype.updateMatrixWorld=function(){var t=new THREE.Vector3,e=new THREE.Quaternion,i=new THREE.Vector3,n=new THREE.Vector3,r=new THREE.Quaternion,o=new THREE.Vector3;return function(s){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||s)&&(this.parent?(this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.decompose(n,r,o),this.matrix.decompose(t,e,i),this.matrixWorld.compose(n,e,o)):this.matrixWorld.copy(this.matrix),this.matrixWorldNeedsUpdate=!1,s=!0);for(var a=0,l=this.children.length;l>a;a++)this.children[a].updateMatrixWorld(s)}}(),THREE.Path=function(t){THREE.CurvePath.call(this),this.actions=[],t&&this.fromPoints(t)},THREE.Path.prototype=Object.create(THREE.CurvePath.prototype),THREE.PathActions={MOVE_TO:"moveTo",LINE_TO:"lineTo",QUADRATIC_CURVE_TO:"quadraticCurveTo",BEZIER_CURVE_TO:"bezierCurveTo",CSPLINE_THRU:"splineThru",ARC:"arc",ELLIPSE:"ellipse"},THREE.Path.prototype.fromPoints=function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;i>e;e++)this.lineTo(t[e].x,t[e].y)},THREE.Path.prototype.moveTo=function(){var t=Array.prototype.slice.call(arguments);this.actions.push({action:THREE.PathActions.MOVE_TO,args:t})},THREE.Path.prototype.lineTo=function(t,e){var i=Array.prototype.slice.call(arguments),n=this.actions[this.actions.length-1].args,n=new THREE.LineCurve(new THREE.Vector2(n[n.length-2],n[n.length-1]),new THREE.Vector2(t,e));this.curves.push(n),this.actions.push({action:THREE.PathActions.LINE_TO,args:i})},THREE.Path.prototype.quadraticCurveTo=function(t,e,i,n){var r=Array.prototype.slice.call(arguments),o=this.actions[this.actions.length-1].args,o=new THREE.QuadraticBezierCurve(new THREE.Vector2(o[o.length-2],o[o.length-1]),new THREE.Vector2(t,e),new THREE.Vector2(i,n));this.curves.push(o),this.actions.push({action:THREE.PathActions.QUADRATIC_CURVE_TO,args:r})},THREE.Path.prototype.bezierCurveTo=function(t,e,i,n,r,o){var s=Array.prototype.slice.call(arguments),a=this.actions[this.actions.length-1].args,a=new THREE.CubicBezierCurve(new THREE.Vector2(a[a.length-2],a[a.length-1]),new THREE.Vector2(t,e),new THREE.Vector2(i,n),new THREE.Vector2(r,o));this.curves.push(a),this.actions.push({action:THREE.PathActions.BEZIER_CURVE_TO,args:s})},THREE.Path.prototype.splineThru=function(t){var e=Array.prototype.slice.call(arguments),i=this.actions[this.actions.length-1].args,i=[new THREE.Vector2(i[i.length-2],i[i.length-1])];Array.prototype.push.apply(i,t),i=new THREE.SplineCurve(i),this.curves.push(i),this.actions.push({action:THREE.PathActions.CSPLINE_THRU,args:e})},THREE.Path.prototype.arc=function(t,e,i,n,r,o){var s=this.actions[this.actions.length-1].args;this.absarc(t+s[s.length-2],e+s[s.length-1],i,n,r,o)},THREE.Path.prototype.absarc=function(t,e,i,n,r,o){this.absellipse(t,e,i,i,n,r,o)},THREE.Path.prototype.ellipse=function(t,e,i,n,r,o,s){var a=this.actions[this.actions.length-1].args;this.absellipse(t+a[a.length-2],e+a[a.length-1],i,n,r,o,s)},THREE.Path.prototype.absellipse=function(t,e,i,n,r,o,s){var a=Array.prototype.slice.call(arguments),l=new THREE.EllipseCurve(t,e,i,n,r,o,s);this.curves.push(l),l=l.getPoint(1),a.push(l.x),a.push(l.y),this.actions.push({action:THREE.PathActions.ELLIPSE,args:a})},THREE.Path.prototype.getSpacedPoints=function(t){t||(t=40);for(var e=[],i=0;t>i;i++)e.push(this.getPoint(i/t));return e},THREE.Path.prototype.getPoints=function(t,e){if(this.useSpacedPoints)return console.log("tata"),this.getSpacedPoints(t,e);t=t||12;var i,n,r,o,s,a,l,h,c,u,d,p,f,m=[];for(i=0,n=this.actions.length;n>i;i++)switch(r=this.actions[i],o=r.action,r=r.args,o){case THREE.PathActions.MOVE_TO:m.push(new THREE.Vector2(r[0],r[1]));break;case THREE.PathActions.LINE_TO:m.push(new THREE.Vector2(r[0],r[1]));break;case THREE.PathActions.QUADRATIC_CURVE_TO:for(s=r[2],a=r[3],c=r[0],u=r[1],0<m.length?(o=m[m.length-1],d=o.x,p=o.y):(o=this.actions[i-1].args,d=o[o.length-2],p=o[o.length-1]),r=1;t>=r;r++)f=r/t,o=THREE.Shape.Utils.b2(f,d,c,s),f=THREE.Shape.Utils.b2(f,p,u,a),m.push(new THREE.Vector2(o,f));break;case THREE.PathActions.BEZIER_CURVE_TO:for(s=r[4],a=r[5],c=r[0],u=r[1],l=r[2],h=r[3],0<m.length?(o=m[m.length-1],d=o.x,p=o.y):(o=this.actions[i-1].args,d=o[o.length-2],p=o[o.length-1]),r=1;t>=r;r++)f=r/t,o=THREE.Shape.Utils.b3(f,d,c,l,s),f=THREE.Shape.Utils.b3(f,p,u,h,a),m.push(new THREE.Vector2(o,f));break;case THREE.PathActions.CSPLINE_THRU:for(o=this.actions[i-1].args,f=[new THREE.Vector2(o[o.length-2],o[o.length-1])],o=t*r[0].length,f=f.concat(r[0]),f=new THREE.SplineCurve(f),r=1;o>=r;r++)m.push(f.getPointAt(r/o));break;case THREE.PathActions.ARC:for(s=r[0],a=r[1],u=r[2],l=r[3],o=r[4],c=!!r[5],d=o-l,p=2*t,r=1;p>=r;r++)f=r/p,c||(f=1-f),f=l+f*d,o=s+u*Math.cos(f),f=a+u*Math.sin(f),m.push(new THREE.Vector2(o,f));break;case THREE.PathActions.ELLIPSE:for(s=r[0],a=r[1],u=r[2],h=r[3],l=r[4],o=r[5],c=!!r[6],d=o-l,p=2*t,r=1;p>=r;r++)f=r/p,c||(f=1-f),f=l+f*d,o=s+u*Math.cos(f),f=a+h*Math.sin(f),m.push(new THREE.Vector2(o,f))}return i=m[m.length-1],1e-10>Math.abs(i.x-m[0].x)&&1e-10>Math.abs(i.y-m[0].y)&&m.splice(m.length-1,1),e&&m.push(m[0]),m},THREE.Path.prototype.toShapes=function(t,e){function i(t){for(var e=[],i=0,n=t.length;n>i;i++){var r=t[i],o=new THREE.Shape;o.actions=r.actions,o.curves=r.curves,e.push(o)}return e}function n(t,e){for(var i=e.length,n=!1,r=i-1,o=0;i>o;r=o++){var s=e[r],a=e[o],l=a.x-s.x,h=a.y-s.y;if(1e-10<Math.abs(h)){if(0>h&&(s=e[o],l=-l,a=e[r],h=-h),!(t.y<s.y||t.y>a.y))if(t.y==s.y){if(t.x==s.x)return!0}else{if(r=h*(t.x-s.x)-l*(t.y-s.y),0==r)return!0;0>r||(n=!n)}}else if(t.y==s.y&&(a.x<=t.x&&t.x<=s.x||s.x<=t.x&&t.x<=a.x))return!0}return n}var r=function(t){var e,i,n,r,o=[],s=new THREE.Path;for(e=0,i=t.length;i>e;e++)n=t[e],r=n.args,n=n.action,n==THREE.PathActions.MOVE_TO&&0!=s.actions.length&&(o.push(s),s=new THREE.Path),s[n].apply(s,r);return 0!=s.actions.length&&o.push(s),o}(this.actions);if(0==r.length)return[];if(!0===e)return i(r);var o,s,a,l=[];if(1==r.length)return s=r[0],a=new THREE.Shape,a.actions=s.actions,a.curves=s.curves,l.push(a),l;var h=!THREE.Shape.Utils.isClockWise(r[0].getPoints()),h=t?!h:h;a=[];var c,u=[],d=[],p=0;u[p]=void 0,d[p]=[];var f,m;for(f=0,m=r.length;m>f;f++)s=r[f],c=s.getPoints(),o=THREE.Shape.Utils.isClockWise(c),(o=t?!o:o)?(!h&&u[p]&&p++,u[p]={s:new THREE.Shape,p:c},u[p].s.actions=s.actions,u[p].s.curves=s.curves,h&&p++,d[p]=[]):d[p].push({h:s,p:c[0]});if(!u[0])return i(r);if(1<u.length){for(f=!1,m=[],s=0,r=u.length;r>s;s++)a[s]=[];for(s=0,r=u.length;r>s;s++)for(o=d[s],h=0;h<o.length;h++){p=o[h],c=!0;for(var g=0;g<u.length;g++)n(p.p,u[g].p)&&(s!=g&&m.push({froms:s,tos:g,hole:h}),c?(c=!1,a[g].push(p)):f=!0);c&&a[s].push(p)}0<m.length&&(f||(d=a))}for(f=0,m=u.length;m>f;f++)for(a=u[f].s,l.push(a),s=d[f],r=0,o=s.length;o>r;r++)a.holes.push(s[r].h);return l},THREE.Shape=function(){THREE.Path.apply(this,arguments),this.holes=[]},THREE.Shape.prototype=Object.create(THREE.Path.prototype),THREE.Shape.prototype.extrude=function(t){return new THREE.ExtrudeGeometry(this,t)},THREE.Shape.prototype.makeGeometry=function(t){return new THREE.ShapeGeometry(this,t)},THREE.Shape.prototype.getPointsHoles=function(t){var e,i=this.holes.length,n=[];for(e=0;i>e;e++)n[e]=this.holes[e].getTransformedPoints(t,this.bends);return n},THREE.Shape.prototype.getSpacedPointsHoles=function(t){var e,i=this.holes.length,n=[];for(e=0;i>e;e++)n[e]=this.holes[e].getTransformedSpacedPoints(t,this.bends);return n},THREE.Shape.prototype.extractAllPoints=function(t){return{shape:this.getTransformedPoints(t),holes:this.getPointsHoles(t)}},THREE.Shape.prototype.extractPoints=function(t){return this.useSpacedPoints?this.extractAllSpacedPoints(t):this.extractAllPoints(t)},THREE.Shape.prototype.extractAllSpacedPoints=function(t){return{shape:this.getTransformedSpacedPoints(t),holes:this.getSpacedPointsHoles(t)}},THREE.Shape.Utils={triangulateShape:function(t,e){function i(t,e,i){return t.x!=e.x?t.x<e.x?t.x<=i.x&&i.x<=e.x:e.x<=i.x&&i.x<=t.x:t.y<e.y?t.y<=i.y&&i.y<=e.y:e.y<=i.y&&i.y<=t.y}function n(t,e,n,r,o){var s=e.x-t.x,a=e.y-t.y,l=r.x-n.x,h=r.y-n.y,c=t.x-n.x,u=t.y-n.y,d=a*l-s*h,p=a*c-s*u;if(1e-10<Math.abs(d)){if(d>0){if(0>p||p>d)return[];if(l=h*c-l*u,0>l||l>d)return[]}else{if(p>0||d>p)return[];if(l=h*c-l*u,l>0||d>l)return[]}return 0==l?!o||0!=p&&p!=d?[t]:[]:l==d?!o||0!=p&&p!=d?[e]:[]:0==p?[n]:p==d?[r]:(o=l/d,[{x:t.x+o*s,y:t.y+o*a}])}return 0!=p||h*c!=l*u?[]:(a=0==s&&0==a,l=0==l&&0==h,a&&l?t.x!=n.x||t.y!=n.y?[]:[t]:a?i(n,r,t)?[t]:[]:l?i(t,e,n)?[n]:[]:(0!=s?(t.x<e.x?(s=t,l=t.x,a=e,t=e.x):(s=e,l=e.x,a=t,t=t.x),n.x<r.x?(e=n,d=n.x,h=r,n=r.x):(e=r,d=r.x,h=n,n=n.x)):(t.y<e.y?(s=t,l=t.y,a=e,t=e.y):(s=e,l=e.y,a=t,t=t.y),n.y<r.y?(e=n,d=n.y,h=r,n=r.y):(e=r,d=r.y,h=n,n=n.y)),d>=l?d>t?[]:t==d?o?[]:[e]:n>=t?[e,a]:[e,h]:l>n?[]:l==n?o?[]:[s]:n>=t?[s,a]:[s,h]))}function r(t,e,i,n){var r=e.x-t.x,o=e.y-t.y;e=i.x-t.x,i=i.y-t.y;var s=n.x-t.x;return n=n.y-t.y,t=r*i-o*e,r=r*n-o*s,1e-10<Math.abs(t)?(e=s*i-n*e,t>0?r>=0&&e>=0:r>=0||e>=0):r>0}var o,s,a,l,h,c={};for(a=t.concat(),o=0,s=e.length;s>o;o++)Array.prototype.push.apply(a,e[o]);for(o=0,s=a.length;s>o;o++)h=a[o].x+":"+a[o].y,void 0!==c[h]&&console.log("Duplicate point",h),c[h]=o;o=function(t,e){function i(t,e){var i=g.length-1,n=t-1;0>n&&(n=i);var o=t+1;return o>i&&(o=0),(i=r(g[t],g[n],g[o],a[e]))?(i=a.length-1,n=e-1,0>n&&(n=i),o=e+1,o>i&&(o=0),(i=r(a[e],a[n],a[o],g[t]))?!0:!1):!1}function o(t,e){var i,r;for(i=0;i<g.length;i++)if(r=i+1,r%=g.length,r=n(t,e,g[i],g[r],!0),0<r.length)return!0;return!1}function s(t,i){var r,o,s,a;for(r=0;r<v.length;r++)for(o=e[v[r]],s=0;s<o.length;s++)if(a=s+1,a%=o.length,a=n(t,i,o[s],o[a],!0),0<a.length)return!0;return!1}var a,l,h,c,u,d,p,f,m,g=t.concat(),v=[],y=[],E=0;for(l=e.length;l>E;E++)v.push(E);p=0;for(var b=2*v.length;0<v.length;){if(b--,0>b){console.log("Infinite Loop! Holes left:"+v.length+", Probably Hole outside Shape!");break}for(h=p;h<g.length;h++){for(c=g[h],l=-1,E=0;E<v.length;E++)if(u=v[E],d=c.x+":"+c.y+":"+u,void 0===y[d]){for(a=e[u],f=0;f<a.length;f++)if(u=a[f],i(h,f)&&!o(c,u)&&!s(c,u)){l=f,v.splice(E,1),p=g.slice(0,h+1),u=g.slice(h),f=a.slice(l),m=a.slice(0,l+1),g=p.concat(f).concat(m).concat(u),p=h;break}if(l>=0)break;y[d]=!0}if(l>=0)break}}return g}(t,e);var u=THREE.FontUtils.Triangulate(o,!1);for(o=0,s=u.length;s>o;o++)for(l=u[o],a=0;3>a;a++)h=l[a].x+":"+l[a].y,h=c[h],void 0!==h&&(l[a]=h);return u.concat()},isClockWise:function(t){return 0>THREE.FontUtils.Triangulate.area(t)},b2p0:function(t,e){var i=1-t;return i*i*e},b2p1:function(t,e){return 2*(1-t)*t*e},b2p2:function(t,e){return t*t*e},b2:function(t,e,i,n){return this.b2p0(t,e)+this.b2p1(t,i)+this.b2p2(t,n)},b3p0:function(t,e){var i=1-t;return i*i*i*e},b3p1:function(t,e){var i=1-t;return 3*i*i*t*e},b3p2:function(t,e){return 3*(1-t)*t*t*e},b3p3:function(t,e){return t*t*t*e},b3:function(t,e,i,n,r){return this.b3p0(t,e)+this.b3p1(t,i)+this.b3p2(t,n)+this.b3p3(t,r)}},THREE.LineCurve=function(t,e){this.v1=t,this.v2=e},THREE.LineCurve.prototype=Object.create(THREE.Curve.prototype),THREE.LineCurve.prototype.getPoint=function(t){var e=this.v2.clone().sub(this.v1);return e.multiplyScalar(t).add(this.v1),e},THREE.LineCurve.prototype.getPointAt=function(t){return this.getPoint(t)},THREE.LineCurve.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},THREE.QuadraticBezierCurve=function(t,e,i){this.v0=t,this.v1=e,this.v2=i},THREE.QuadraticBezierCurve.prototype=Object.create(THREE.Curve.prototype),THREE.QuadraticBezierCurve.prototype.getPoint=function(t){var e=new THREE.Vector2;return e.x=THREE.Shape.Utils.b2(t,this.v0.x,this.v1.x,this.v2.x),e.y=THREE.Shape.Utils.b2(t,this.v0.y,this.v1.y,this.v2.y),e},THREE.QuadraticBezierCurve.prototype.getTangent=function(t){var e=new THREE.Vector2;return e.x=THREE.Curve.Utils.tangentQuadraticBezier(t,this.v0.x,this.v1.x,this.v2.x),e.y=THREE.Curve.Utils.tangentQuadraticBezier(t,this.v0.y,this.v1.y,this.v2.y),e.normalize()},THREE.CubicBezierCurve=function(t,e,i,n){this.v0=t,this.v1=e,this.v2=i,this.v3=n},THREE.CubicBezierCurve.prototype=Object.create(THREE.Curve.prototype),THREE.CubicBezierCurve.prototype.getPoint=function(t){var e;return e=THREE.Shape.Utils.b3(t,this.v0.x,this.v1.x,this.v2.x,this.v3.x),t=THREE.Shape.Utils.b3(t,this.v0.y,this.v1.y,this.v2.y,this.v3.y),new THREE.Vector2(e,t)},THREE.CubicBezierCurve.prototype.getTangent=function(t){var e;return e=THREE.Curve.Utils.tangentCubicBezier(t,this.v0.x,this.v1.x,this.v2.x,this.v3.x),t=THREE.Curve.Utils.tangentCubicBezier(t,this.v0.y,this.v1.y,this.v2.y,this.v3.y),e=new THREE.Vector2(e,t),e.normalize(),e},THREE.SplineCurve=function(t){this.points=void 0==t?[]:t},THREE.SplineCurve.prototype=Object.create(THREE.Curve.prototype),THREE.SplineCurve.prototype.getPoint=function(t){var e=this.points;t*=e.length-1;var i=Math.floor(t);t-=i;var n=e[0==i?i:i-1],r=e[i],o=e[i>e.length-2?e.length-1:i+1],e=e[i>e.length-3?e.length-1:i+2],i=new THREE.Vector2;return i.x=THREE.Curve.Utils.interpolate(n.x,r.x,o.x,e.x,t),i.y=THREE.Curve.Utils.interpolate(n.y,r.y,o.y,e.y,t),i},THREE.EllipseCurve=function(t,e,i,n,r,o,s){this.aX=t,this.aY=e,this.xRadius=i,this.yRadius=n,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=s},THREE.EllipseCurve.prototype=Object.create(THREE.Curve.prototype),THREE.EllipseCurve.prototype.getPoint=function(t){var e=this.aEndAngle-this.aStartAngle;return 0>e&&(e+=2*Math.PI),e>2*Math.PI&&(e-=2*Math.PI),t=!0===this.aClockwise?this.aEndAngle+(1-t)*(2*Math.PI-e):this.aStartAngle+t*e,e=new THREE.Vector2,e.x=this.aX+this.xRadius*Math.cos(t),e.y=this.aY+this.yRadius*Math.sin(t),e},THREE.ArcCurve=function(t,e,i,n,r,o){THREE.EllipseCurve.call(this,t,e,i,i,n,r,o)},THREE.ArcCurve.prototype=Object.create(THREE.EllipseCurve.prototype),THREE.LineCurve3=THREE.Curve.create(function(t,e){this.v1=t,this.v2=e},function(t){var e=new THREE.Vector3;return e.subVectors(this.v2,this.v1),e.multiplyScalar(t),e.add(this.v1),e}),THREE.QuadraticBezierCurve3=THREE.Curve.create(function(t,e,i){this.v0=t,this.v1=e,this.v2=i},function(t){var e=new THREE.Vector3;return e.x=THREE.Shape.Utils.b2(t,this.v0.x,this.v1.x,this.v2.x),e.y=THREE.Shape.Utils.b2(t,this.v0.y,this.v1.y,this.v2.y),e.z=THREE.Shape.Utils.b2(t,this.v0.z,this.v1.z,this.v2.z),e}),THREE.CubicBezierCurve3=THREE.Curve.create(function(t,e,i,n){this.v0=t,this.v1=e,this.v2=i,this.v3=n},function(t){var e=new THREE.Vector3;return e.x=THREE.Shape.Utils.b3(t,this.v0.x,this.v1.x,this.v2.x,this.v3.x),e.y=THREE.Shape.Utils.b3(t,this.v0.y,this.v1.y,this.v2.y,this.v3.y),e.z=THREE.Shape.Utils.b3(t,this.v0.z,this.v1.z,this.v2.z,this.v3.z),e}),THREE.SplineCurve3=THREE.Curve.create(function(t){this.points=void 0==t?[]:t},function(t){var e=this.points;t*=e.length-1;var i=Math.floor(t);t-=i;var n=e[0==i?i:i-1],r=e[i],o=e[i>e.length-2?e.length-1:i+1],e=e[i>e.length-3?e.length-1:i+2],i=new THREE.Vector3;return i.x=THREE.Curve.Utils.interpolate(n.x,r.x,o.x,e.x,t),i.y=THREE.Curve.Utils.interpolate(n.y,r.y,o.y,e.y,t),i.z=THREE.Curve.Utils.interpolate(n.z,r.z,o.z,e.z,t),i}),THREE.ClosedSplineCurve3=THREE.Curve.create(function(t){this.points=void 0==t?[]:t},function(t){var e=this.points;t*=e.length-0;var i=Math.floor(t);t-=i;var i=i+(i>0?0:(Math.floor(Math.abs(i)/e.length)+1)*e.length),n=e[(i-1)%e.length],r=e[i%e.length],o=e[(i+1)%e.length],e=e[(i+2)%e.length],i=new THREE.Vector3;return i.x=THREE.Curve.Utils.interpolate(n.x,r.x,o.x,e.x,t),i.y=THREE.Curve.Utils.interpolate(n.y,r.y,o.y,e.y,t),i.z=THREE.Curve.Utils.interpolate(n.z,r.z,o.z,e.z,t),i}),THREE.AnimationHandler={LINEAR:0,CATMULLROM:1,CATMULLROM_FORWARD:2,add:function(){console.warn("THREE.AnimationHandler.add() has been deprecated.")},get:function(){console.warn("THREE.AnimationHandler.get() has been deprecated.")},remove:function(){console.warn("THREE.AnimationHandler.remove() has been deprecated.")},animations:[],init:function(t){if(!0!==t.initialized){for(var e=0;e<t.hierarchy.length;e++){for(var i=0;i<t.hierarchy[e].keys.length;i++)if(0>t.hierarchy[e].keys[i].time&&(t.hierarchy[e].keys[i].time=0),void 0!==t.hierarchy[e].keys[i].rot&&!(t.hierarchy[e].keys[i].rot instanceof THREE.Quaternion)){var n=t.hierarchy[e].keys[i].rot;t.hierarchy[e].keys[i].rot=(new THREE.Quaternion).fromArray(n)}if(t.hierarchy[e].keys.length&&void 0!==t.hierarchy[e].keys[0].morphTargets){for(n={},i=0;i<t.hierarchy[e].keys.length;i++)for(var r=0;r<t.hierarchy[e].keys[i].morphTargets.length;r++){var o=t.hierarchy[e].keys[i].morphTargets[r];n[o]=-1}for(t.hierarchy[e].usedMorphTargets=n,i=0;i<t.hierarchy[e].keys.length;i++){var s={};for(o in n){for(r=0;r<t.hierarchy[e].keys[i].morphTargets.length;r++)if(t.hierarchy[e].keys[i].morphTargets[r]===o){s[o]=t.hierarchy[e].keys[i].morphTargetsInfluences[r];break}r===t.hierarchy[e].keys[i].morphTargets.length&&(s[o]=0)}t.hierarchy[e].keys[i].morphTargetsInfluences=s}}for(i=1;i<t.hierarchy[e].keys.length;i++)t.hierarchy[e].keys[i].time===t.hierarchy[e].keys[i-1].time&&(t.hierarchy[e].keys.splice(i,1),i--);for(i=0;i<t.hierarchy[e].keys.length;i++)t.hierarchy[e].keys[i].index=i}return t.initialized=!0,t}},parse:function(t){var e=function(t,i){i.push(t);for(var n=0;n<t.children.length;n++)e(t.children[n],i)},i=[];if(t instanceof THREE.SkinnedMesh)for(var n=0;n<t.skeleton.bones.length;n++)i.push(t.skeleton.bones[n]);else e(t,i);return i},play:function(t){-1===this.animations.indexOf(t)&&this.animations.push(t)},stop:function(t){t=this.animations.indexOf(t),-1!==t&&this.animations.splice(t,1)},update:function(t){for(var e=0;e<this.animations.length;e++)this.animations[e].resetBlendWeights();for(e=0;e<this.animations.length;e++)this.animations[e].update(t)}},THREE.Animation=function(t,e){this.root=t,this.data=THREE.AnimationHandler.init(e),this.hierarchy=THREE.AnimationHandler.parse(t),this.currentTime=0,this.timeScale=1,this.isPlaying=!1,this.loop=!0,this.weight=0,this.interpolationType=THREE.AnimationHandler.LINEAR},THREE.Animation.prototype.keyTypes=["pos","rot","scl"],THREE.Animation.prototype.play=function(t,e){this.currentTime=void 0!==t?t:0,this.weight=void 0!==e?e:1,this.isPlaying=!0,this.reset(),THREE.AnimationHandler.play(this)},THREE.Animation.prototype.stop=function(){this.isPlaying=!1,THREE.AnimationHandler.stop(this)},THREE.Animation.prototype.reset=function(){for(var t=0,e=this.hierarchy.length;e>t;t++){var i=this.hierarchy[t];i.matrixAutoUpdate=!0,void 0===i.animationCache&&(i.animationCache={animations:{},blending:{positionWeight:0,quaternionWeight:0,scaleWeight:0}}),void 0===i.animationCache.animations[this.data.name]&&(i.animationCache.animations[this.data.name]={},i.animationCache.animations[this.data.name].prevKey={pos:0,rot:0,scl:0},i.animationCache.animations[this.data.name].nextKey={pos:0,rot:0,scl:0},i.animationCache.animations[this.data.name].originalMatrix=i.matrix);for(var i=i.animationCache.animations[this.data.name],n=0;3>n;n++){for(var r=this.keyTypes[n],o=this.data.hierarchy[t].keys[0],s=this.getNextKeyWith(r,t,1);s.time<this.currentTime&&s.index>o.index;)o=s,s=this.getNextKeyWith(r,t,s.index+1);i.prevKey[r]=o,i.nextKey[r]=s}}},THREE.Animation.prototype.resetBlendWeights=function(){for(var t=0,e=this.hierarchy.length;e>t;t++){var i=this.hierarchy[t];void 0!==i.animationCache&&(i.animationCache.blending.positionWeight=0,i.animationCache.blending.quaternionWeight=0,i.animationCache.blending.scaleWeight=0)}},THREE.Animation.prototype.update=function(){var t=[],e=new THREE.Vector3,i=new THREE.Vector3,n=new THREE.Quaternion,r=function(t,e){var i,n,r,s,a,l,h=[],c=[];return i=(t.length-1)*e,n=Math.floor(i),i-=n,h[0]=0===n?n:n-1,h[1]=n,h[2]=n>t.length-2?n:n+1,h[3]=n>t.length-3?n:n+2,n=t[h[0]],s=t[h[1]],a=t[h[2]],l=t[h[3]],h=i*i,r=i*h,c[0]=o(n[0],s[0],a[0],l[0],i,h,r),c[1]=o(n[1],s[1],a[1],l[1],i,h,r),c[2]=o(n[2],s[2],a[2],l[2],i,h,r),c},o=function(t,e,i,n,r,o,s){return t=.5*(i-t),n=.5*(n-e),(2*(e-i)+t+n)*s+(-3*(e-i)-2*t-n)*o+t*r+e};return function(o){if(!1!==this.isPlaying&&(this.currentTime+=o*this.timeScale,0!==this.weight)){if(o=this.data.length,this.currentTime>o||0>this.currentTime){if(!this.loop)return void this.stop();this.currentTime%=o,0>this.currentTime&&(this.currentTime+=o),this.reset()}o=0;for(var s=this.hierarchy.length;s>o;o++)for(var a=this.hierarchy[o],l=a.animationCache.animations[this.data.name],h=a.animationCache.blending,c=0;3>c;c++){var u=this.keyTypes[c],d=l.prevKey[u],p=l.nextKey[u];if(0<this.timeScale&&p.time<=this.currentTime||0>this.timeScale&&d.time>=this.currentTime){for(d=this.data.hierarchy[o].keys[0],p=this.getNextKeyWith(u,o,1);p.time<this.currentTime&&p.index>d.index;)d=p,p=this.getNextKeyWith(u,o,p.index+1);l.prevKey[u]=d,l.nextKey[u]=p}a.matrixAutoUpdate=!0,a.matrixWorldNeedsUpdate=!0;var f=(this.currentTime-d.time)/(p.time-d.time),m=d[u],g=p[u];0>f&&(f=0),f>1&&(f=1),"pos"===u?this.interpolationType===THREE.AnimationHandler.LINEAR?(i.x=m[0]+(g[0]-m[0])*f,i.y=m[1]+(g[1]-m[1])*f,i.z=m[2]+(g[2]-m[2])*f,d=this.weight/(this.weight+h.positionWeight),a.position.lerp(i,d),h.positionWeight+=this.weight):(this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD)&&(t[0]=this.getPrevKeyWith("pos",o,d.index-1).pos,t[1]=m,t[2]=g,t[3]=this.getNextKeyWith("pos",o,p.index+1).pos,f=.33*f+.33,p=r(t,f),d=this.weight/(this.weight+h.positionWeight),h.positionWeight+=this.weight,u=a.position,u.x+=(p[0]-u.x)*d,u.y+=(p[1]-u.y)*d,u.z+=(p[2]-u.z)*d,this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD&&(f=r(t,1.01*f),e.set(f[0],f[1],f[2]),e.sub(u),e.y=0,e.normalize(),f=Math.atan2(e.x,e.z),a.rotation.set(0,f,0))):"rot"===u?(THREE.Quaternion.slerp(m,g,n,f),0===h.quaternionWeight?(a.quaternion.copy(n),h.quaternionWeight=this.weight):(d=this.weight/(this.weight+h.quaternionWeight),THREE.Quaternion.slerp(a.quaternion,n,a.quaternion,d),h.quaternionWeight+=this.weight)):"scl"===u&&(i.x=m[0]+(g[0]-m[0])*f,i.y=m[1]+(g[1]-m[1])*f,i.z=m[2]+(g[2]-m[2])*f,d=this.weight/(this.weight+h.scaleWeight),a.scale.lerp(i,d),h.scaleWeight+=this.weight)}return!0}}}(),THREE.Animation.prototype.getNextKeyWith=function(t,e,i){var n=this.data.hierarchy[e].keys;for(i=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?i<n.length-1?i:n.length-1:i%n.length;i<n.length;i++)if(void 0!==n[i][t])return n[i];return this.data.hierarchy[e].keys[0]},THREE.Animation.prototype.getPrevKeyWith=function(t,e,i){var n=this.data.hierarchy[e].keys;for(i=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?i>0?i:0:i>=0?i:i+n.length;i>=0;i--)if(void 0!==n[i][t])return n[i];return this.data.hierarchy[e].keys[n.length-1]},THREE.KeyFrameAnimation=function(t){this.root=t.node,this.data=THREE.AnimationHandler.init(t),this.hierarchy=THREE.AnimationHandler.parse(this.root),this.currentTime=0,this.timeScale=.001,this.isPlaying=!1,this.loop=this.isPaused=!0,t=0;for(var e=this.hierarchy.length;e>t;t++){var i=this.data.hierarchy[t].sids,n=this.hierarchy[t];if(this.data.hierarchy[t].keys.length&&i){for(var r=0;r<i.length;r++){var o=i[r],s=this.getNextKeyWith(o,t,0);s&&s.apply(o)}n.matrixAutoUpdate=!1,this.data.hierarchy[t].node.updateMatrix(),n.matrixWorldNeedsUpdate=!0}}},THREE.KeyFrameAnimation.prototype.play=function(t){if(this.currentTime=void 0!==t?t:0,!1===this.isPlaying){this.isPlaying=!0;var e,i,n=this.hierarchy.length;for(t=0;n>t;t++)e=this.hierarchy[t],i=this.data.hierarchy[t],void 0===i.animationCache&&(i.animationCache={},i.animationCache.prevKey=null,i.animationCache.nextKey=null,i.animationCache.originalMatrix=e.matrix),e=this.data.hierarchy[t].keys,e.length&&(i.animationCache.prevKey=e[0],i.animationCache.nextKey=e[1],this.startTime=Math.min(e[0].time,this.startTime),this.endTime=Math.max(e[e.length-1].time,this.endTime));this.update(0)}this.isPaused=!1,THREE.AnimationHandler.play(this)},THREE.KeyFrameAnimation.prototype.stop=function(){this.isPaused=this.isPlaying=!1,THREE.AnimationHandler.stop(this);for(var t=0;t<this.data.hierarchy.length;t++){var e=this.hierarchy[t],i=this.data.hierarchy[t];if(void 0!==i.animationCache){var n=i.animationCache.originalMatrix;n.copy(e.matrix),e.matrix=n,delete i.animationCache
  33. }}},THREE.KeyFrameAnimation.prototype.update=function(t){if(!1!==this.isPlaying){this.currentTime+=t*this.timeScale,t=this.data.length,!0===this.loop&&this.currentTime>t&&(this.currentTime%=t),this.currentTime=Math.min(this.currentTime,t),t=0;for(var e=this.hierarchy.length;e>t;t++){var i=this.hierarchy[t],n=this.data.hierarchy[t],r=n.keys,n=n.animationCache;if(r.length){var o=n.prevKey,s=n.nextKey;if(s.time<=this.currentTime){for(;s.time<this.currentTime&&s.index>o.index;)o=s,s=r[o.index+1];n.prevKey=o,n.nextKey=s}s.time>=this.currentTime?o.interpolate(s,this.currentTime):o.interpolate(s,s.time),this.data.hierarchy[t].node.updateMatrix(),i.matrixWorldNeedsUpdate=!0}}}},THREE.KeyFrameAnimation.prototype.getNextKeyWith=function(t,e,i){for(e=this.data.hierarchy[e].keys,i%=e.length;i<e.length;i++)if(e[i].hasTarget(t))return e[i];return e[0]},THREE.KeyFrameAnimation.prototype.getPrevKeyWith=function(t,e,i){for(e=this.data.hierarchy[e].keys,i=i>=0?i:i+e.length;i>=0;i--)if(e[i].hasTarget(t))return e[i];return e[e.length-1]},THREE.MorphAnimation=function(t){this.mesh=t,this.frames=t.morphTargetInfluences.length,this.currentTime=0,this.duration=1e3,this.loop=!0,this.isPlaying=!1},THREE.MorphAnimation.prototype={play:function(){this.isPlaying=!0},pause:function(){this.isPlaying=!1},update:function(){var t=0,e=0;return function(i){if(!1!==this.isPlaying){this.currentTime+=i,!0===this.loop&&this.currentTime>this.duration&&(this.currentTime%=this.duration),this.currentTime=Math.min(this.currentTime,this.duration),i=this.duration/this.frames;var n=Math.floor(this.currentTime/i);n!=e&&(this.mesh.morphTargetInfluences[t]=0,this.mesh.morphTargetInfluences[e]=1,this.mesh.morphTargetInfluences[n]=0,t=e,e=n),this.mesh.morphTargetInfluences[n]=this.currentTime%i/i,this.mesh.morphTargetInfluences[t]=1-this.mesh.morphTargetInfluences[n]}}}()},THREE.BoxGeometry=function(t,e,i,n,r,o){function s(t,e,i,n,r,o,s,l){var h,c=a.widthSegments,u=a.heightSegments,d=r/2,p=o/2,f=a.vertices.length;"x"===t&&"y"===e||"y"===t&&"x"===e?h="z":"x"===t&&"z"===e||"z"===t&&"x"===e?(h="y",u=a.depthSegments):("z"===t&&"y"===e||"y"===t&&"z"===e)&&(h="x",c=a.depthSegments);var m=c+1,g=u+1,v=r/c,y=o/u,E=new THREE.Vector3;for(E[h]=s>0?1:-1,r=0;g>r;r++)for(o=0;m>o;o++){var b=new THREE.Vector3;b[t]=(o*v-d)*i,b[e]=(r*y-p)*n,b[h]=s,a.vertices.push(b)}for(r=0;u>r;r++)for(o=0;c>o;o++)p=o+m*r,t=o+m*(r+1),e=o+1+m*(r+1),i=o+1+m*r,n=new THREE.Vector2(o/c,1-r/u),s=new THREE.Vector2(o/c,1-(r+1)/u),h=new THREE.Vector2((o+1)/c,1-(r+1)/u),d=new THREE.Vector2((o+1)/c,1-r/u),p=new THREE.Face3(p+f,t+f,i+f),p.normal.copy(E),p.vertexNormals.push(E.clone(),E.clone(),E.clone()),p.materialIndex=l,a.faces.push(p),a.faceVertexUvs[0].push([n,s,d]),p=new THREE.Face3(t+f,e+f,i+f),p.normal.copy(E),p.vertexNormals.push(E.clone(),E.clone(),E.clone()),p.materialIndex=l,a.faces.push(p),a.faceVertexUvs[0].push([s.clone(),h,d.clone()])}THREE.Geometry.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:o},this.widthSegments=n||1,this.heightSegments=r||1,this.depthSegments=o||1;var a=this;n=t/2,r=e/2,o=i/2,s("z","y",-1,-1,i,e,n,0),s("z","y",1,-1,i,e,-n,1),s("x","z",1,1,t,i,r,2),s("x","z",1,-1,t,i,-r,3),s("x","y",1,-1,t,e,o,4),s("x","y",-1,-1,t,e,-o,5),this.mergeVertices()},THREE.BoxGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.CircleGeometry=function(t,e,i,n){THREE.Geometry.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},t=t||50,e=void 0!==e?Math.max(3,e):8,i=void 0!==i?i:0,n=void 0!==n?n:2*Math.PI;var r,o=[];r=new THREE.Vector3;var s=new THREE.Vector2(.5,.5);for(this.vertices.push(r),o.push(s),r=0;e>=r;r++){var a=new THREE.Vector3,l=i+r/e*n;a.x=t*Math.cos(l),a.y=t*Math.sin(l),this.vertices.push(a),o.push(new THREE.Vector2((a.x/t+1)/2,(a.y/t+1)/2))}for(i=new THREE.Vector3(0,0,1),r=1;e>=r;r++)this.faces.push(new THREE.Face3(r,r+1,0,[i.clone(),i.clone(),i.clone()])),this.faceVertexUvs[0].push([o[r].clone(),o[r+1].clone(),s.clone()]);this.computeFaceNormals(),this.boundingSphere=new THREE.Sphere(new THREE.Vector3,t)},THREE.CircleGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.CubeGeometry=function(t,e,i,n,r,o){return console.warn("THREE.CubeGeometry has been renamed to THREE.BoxGeometry."),new THREE.BoxGeometry(t,e,i,n,r,o)},THREE.CylinderGeometry=function(t,e,i,n,r,o){THREE.Geometry.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:o},t=void 0!==t?t:20,e=void 0!==e?e:20,i=void 0!==i?i:100,n=n||8,r=r||1,o=void 0!==o?o:!1;var s,a,l=i/2,h=[],c=[];for(a=0;r>=a;a++){var u=[],d=[],p=a/r,f=p*(e-t)+t;for(s=0;n>=s;s++){var m=s/n,g=new THREE.Vector3;g.x=f*Math.sin(m*Math.PI*2),g.y=-p*i+l,g.z=f*Math.cos(m*Math.PI*2),this.vertices.push(g),u.push(this.vertices.length-1),d.push(new THREE.Vector2(m,1-p))}h.push(u),c.push(d)}for(i=(e-t)/i,s=0;n>s;s++)for(0!==t?(u=this.vertices[h[0][s]].clone(),d=this.vertices[h[0][s+1]].clone()):(u=this.vertices[h[1][s]].clone(),d=this.vertices[h[1][s+1]].clone()),u.setY(Math.sqrt(u.x*u.x+u.z*u.z)*i).normalize(),d.setY(Math.sqrt(d.x*d.x+d.z*d.z)*i).normalize(),a=0;r>a;a++){var p=h[a][s],f=h[a+1][s],m=h[a+1][s+1],g=h[a][s+1],v=u.clone(),y=u.clone(),E=d.clone(),b=d.clone(),_=c[a][s].clone(),T=c[a+1][s].clone(),x=c[a+1][s+1].clone(),w=c[a][s+1].clone();this.faces.push(new THREE.Face3(p,f,g,[v,y,b])),this.faceVertexUvs[0].push([_,T,w]),this.faces.push(new THREE.Face3(f,m,g,[y.clone(),E,b.clone()])),this.faceVertexUvs[0].push([T.clone(),x,w.clone()])}if(!1===o&&t>0)for(this.vertices.push(new THREE.Vector3(0,l,0)),s=0;n>s;s++)p=h[0][s],f=h[0][s+1],m=this.vertices.length-1,v=new THREE.Vector3(0,1,0),y=new THREE.Vector3(0,1,0),E=new THREE.Vector3(0,1,0),_=c[0][s].clone(),T=c[0][s+1].clone(),x=new THREE.Vector2(T.x,0),this.faces.push(new THREE.Face3(p,f,m,[v,y,E])),this.faceVertexUvs[0].push([_,T,x]);if(!1===o&&e>0)for(this.vertices.push(new THREE.Vector3(0,-l,0)),s=0;n>s;s++)p=h[a][s+1],f=h[a][s],m=this.vertices.length-1,v=new THREE.Vector3(0,-1,0),y=new THREE.Vector3(0,-1,0),E=new THREE.Vector3(0,-1,0),_=c[a][s+1].clone(),T=c[a][s].clone(),x=new THREE.Vector2(T.x,1),this.faces.push(new THREE.Face3(p,f,m,[v,y,E])),this.faceVertexUvs[0].push([_,T,x]);this.computeFaceNormals()},THREE.CylinderGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.ExtrudeGeometry=function(t,e){"undefined"!=typeof t&&(THREE.Geometry.call(this),this.type="ExtrudeGeometry",t=t instanceof Array?t:[t],this.addShapeList(t,e),this.computeFaceNormals())},THREE.ExtrudeGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.ExtrudeGeometry.prototype.addShapeList=function(t,e){for(var i=t.length,n=0;i>n;n++)this.addShape(t[n],e)},THREE.ExtrudeGeometry.prototype.addShape=function(t,e){function i(t,e,i){return e||console.log("die"),e.clone().multiplyScalar(i).add(t)}function n(t,e,i){var n=1,n=t.x-e.x,r=t.y-e.y,o=i.x-t.x,s=i.y-t.y,a=n*n+r*r;if(1e-10<Math.abs(n*s-r*o)){var l=Math.sqrt(a),h=Math.sqrt(o*o+s*s),a=e.x-r/l;if(e=e.y+n/l,o=((i.x-s/h-a)*s-(i.y+o/h-e)*o)/(n*s-r*o),i=a+n*o-t.x,t=e+r*o-t.y,n=i*i+t*t,2>=n)return new THREE.Vector2(i,t);n=Math.sqrt(n/2)}else t=!1,n>1e-10?o>1e-10&&(t=!0):-1e-10>n?-1e-10>o&&(t=!0):Math.sign(r)==Math.sign(s)&&(t=!0),t?(i=-r,t=n,n=Math.sqrt(a)):(i=n,t=r,n=Math.sqrt(a/2));return new THREE.Vector2(i/n,t/n)}function r(t,e){var i,n;for(O=t.length;0<=--O;){i=O,n=O-1,0>n&&(n=t.length-1);for(var r=0,o=y+2*m,r=0;o>r;r++){var s=z*r,a=z*(r+1),l=e+i+s,s=e+n+s,h=e+n+a,a=e+i+a,l=l+C,s=s+C,h=h+C,a=a+C;M.faces.push(new THREE.Face3(l,s,a,null,null,T)),M.faces.push(new THREE.Face3(s,h,a,null,null,T)),l=x.generateSideWallUV(M,l,s,h,a),M.faceVertexUvs[0].push([l[0],l[1],l[3]]),M.faceVertexUvs[0].push([l[1],l[2],l[3]])}}}function o(t,e,i){M.vertices.push(new THREE.Vector3(t,e,i))}function s(t,e,i){t+=C,e+=C,i+=C,M.faces.push(new THREE.Face3(t,e,i,null,null,_)),t=x.generateTopUV(M,t,e,i),M.faceVertexUvs[0].push(t)}var a,l,h,c,u,d=void 0!==e.amount?e.amount:100,p=void 0!==e.bevelThickness?e.bevelThickness:6,f=void 0!==e.bevelSize?e.bevelSize:p-2,m=void 0!==e.bevelSegments?e.bevelSegments:3,g=void 0!==e.bevelEnabled?e.bevelEnabled:!0,v=void 0!==e.curveSegments?e.curveSegments:12,y=void 0!==e.steps?e.steps:1,E=e.extrudePath,b=!1,_=e.material,T=e.extrudeMaterial,x=void 0!==e.UVGenerator?e.UVGenerator:THREE.ExtrudeGeometry.WorldUVGenerator;E&&(a=E.getSpacedPoints(y),b=!0,g=!1,l=void 0!==e.frames?e.frames:new THREE.TubeGeometry.FrenetFrames(E,y,!1),h=new THREE.Vector3,c=new THREE.Vector3,u=new THREE.Vector3),g||(f=p=m=0);var w,R,S,M=this,C=this.vertices.length,E=t.extractPoints(v),v=E.shape,H=E.holes;if(E=!THREE.Shape.Utils.isClockWise(v)){for(v=v.reverse(),R=0,S=H.length;S>R;R++)w=H[R],THREE.Shape.Utils.isClockWise(w)&&(H[R]=w.reverse());E=!1}var D=THREE.Shape.Utils.triangulateShape(v,H),P=v;for(R=0,S=H.length;S>R;R++)w=H[R],v=v.concat(w);var k,A,L,I,F,N,z=v.length,B=D.length,E=[],O=0;for(L=P.length,k=L-1,A=O+1;L>O;O++,k++,A++)k===L&&(k=0),A===L&&(A=0),E[O]=n(P[O],P[k],P[A]);var U,V=[],j=E.concat();for(R=0,S=H.length;S>R;R++){for(w=H[R],U=[],O=0,L=w.length,k=L-1,A=O+1;L>O;O++,k++,A++)k===L&&(k=0),A===L&&(A=0),U[O]=n(w[O],w[k],w[A]);V.push(U),j=j.concat(U)}for(k=0;m>k;k++){for(L=k/m,I=p*(1-L),A=f*Math.sin(L*Math.PI/2),O=0,L=P.length;L>O;O++)F=i(P[O],E[O],A),o(F.x,F.y,-I);for(R=0,S=H.length;S>R;R++)for(w=H[R],U=V[R],O=0,L=w.length;L>O;O++)F=i(w[O],U[O],A),o(F.x,F.y,-I)}for(A=f,O=0;z>O;O++)F=g?i(v[O],j[O],A):v[O],b?(c.copy(l.normals[0]).multiplyScalar(F.x),h.copy(l.binormals[0]).multiplyScalar(F.y),u.copy(a[0]).add(c).add(h),o(u.x,u.y,u.z)):o(F.x,F.y,0);for(L=1;y>=L;L++)for(O=0;z>O;O++)F=g?i(v[O],j[O],A):v[O],b?(c.copy(l.normals[L]).multiplyScalar(F.x),h.copy(l.binormals[L]).multiplyScalar(F.y),u.copy(a[L]).add(c).add(h),o(u.x,u.y,u.z)):o(F.x,F.y,d/y*L);for(k=m-1;k>=0;k--){for(L=k/m,I=p*(1-L),A=f*Math.sin(L*Math.PI/2),O=0,L=P.length;L>O;O++)F=i(P[O],E[O],A),o(F.x,F.y,d+I);for(R=0,S=H.length;S>R;R++)for(w=H[R],U=V[R],O=0,L=w.length;L>O;O++)F=i(w[O],U[O],A),b?o(F.x,F.y+a[y-1].y,a[y-1].x+I):o(F.x,F.y,d+I)}!function(){if(g){var t;for(t=0*z,O=0;B>O;O++)N=D[O],s(N[2]+t,N[1]+t,N[0]+t);for(t=y+2*m,t*=z,O=0;B>O;O++)N=D[O],s(N[0]+t,N[1]+t,N[2]+t)}else{for(O=0;B>O;O++)N=D[O],s(N[2],N[1],N[0]);for(O=0;B>O;O++)N=D[O],s(N[0]+z*y,N[1]+z*y,N[2]+z*y)}}(),function(){var t=0;for(r(P,t),t+=P.length,R=0,S=H.length;S>R;R++)w=H[R],r(w,t),t+=w.length}()},THREE.ExtrudeGeometry.WorldUVGenerator={generateTopUV:function(t,e,i,n){return t=t.vertices,e=t[e],i=t[i],n=t[n],[new THREE.Vector2(e.x,e.y),new THREE.Vector2(i.x,i.y),new THREE.Vector2(n.x,n.y)]},generateSideWallUV:function(t,e,i,n,r){return t=t.vertices,e=t[e],i=t[i],n=t[n],r=t[r],.01>Math.abs(e.y-i.y)?[new THREE.Vector2(e.x,1-e.z),new THREE.Vector2(i.x,1-i.z),new THREE.Vector2(n.x,1-n.z),new THREE.Vector2(r.x,1-r.z)]:[new THREE.Vector2(e.y,1-e.z),new THREE.Vector2(i.y,1-i.z),new THREE.Vector2(n.y,1-n.z),new THREE.Vector2(r.y,1-r.z)]}},THREE.ShapeGeometry=function(t,e){THREE.Geometry.call(this),this.type="ShapeGeometry",!1==t instanceof Array&&(t=[t]),this.addShapeList(t,e),this.computeFaceNormals()},THREE.ShapeGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.ShapeGeometry.prototype.addShapeList=function(t,e){for(var i=0,n=t.length;n>i;i++)this.addShape(t[i],e);return this},THREE.ShapeGeometry.prototype.addShape=function(t,e){void 0===e&&(e={});var i,n,r,o=e.material,s=void 0===e.UVGenerator?THREE.ExtrudeGeometry.WorldUVGenerator:e.UVGenerator,a=this.vertices.length;i=t.extractPoints(void 0!==e.curveSegments?e.curveSegments:12);var l=i.shape,h=i.holes;if(!THREE.Shape.Utils.isClockWise(l))for(l=l.reverse(),i=0,n=h.length;n>i;i++)r=h[i],THREE.Shape.Utils.isClockWise(r)&&(h[i]=r.reverse());var c=THREE.Shape.Utils.triangulateShape(l,h);for(i=0,n=h.length;n>i;i++)r=h[i],l=l.concat(r);for(h=l.length,n=c.length,i=0;h>i;i++)r=l[i],this.vertices.push(new THREE.Vector3(r.x,r.y,0));for(i=0;n>i;i++)h=c[i],l=h[0]+a,r=h[1]+a,h=h[2]+a,this.faces.push(new THREE.Face3(l,r,h,null,null,o)),this.faceVertexUvs[0].push(s.generateTopUV(this,l,r,h))},THREE.LatheGeometry=function(t,e,i,n){THREE.Geometry.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},e=e||12,i=i||0,n=n||2*Math.PI;for(var r=1/(t.length-1),o=1/e,s=0,a=e;a>=s;s++)for(var l=i+s*o*n,h=Math.cos(l),c=Math.sin(l),l=0,u=t.length;u>l;l++){var d=t[l],p=new THREE.Vector3;p.x=h*d.x-c*d.y,p.y=c*d.x+h*d.y,p.z=d.z,this.vertices.push(p)}for(i=t.length,s=0,a=e;a>s;s++)for(l=0,u=t.length-1;u>l;l++){e=c=l+i*s,n=c+i;var h=c+1+i,c=c+1,d=s*o,p=l*r,f=d+o,m=p+r;this.faces.push(new THREE.Face3(e,n,c)),this.faceVertexUvs[0].push([new THREE.Vector2(d,p),new THREE.Vector2(f,p),new THREE.Vector2(d,m)]),this.faces.push(new THREE.Face3(n,h,c)),this.faceVertexUvs[0].push([new THREE.Vector2(f,p),new THREE.Vector2(f,m),new THREE.Vector2(d,m)])}this.mergeVertices(),this.computeFaceNormals(),this.computeVertexNormals()},THREE.LatheGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.PlaneGeometry=function(t,e,i,n){console.info("THREE.PlaneGeometry: Consider using THREE.PlaneBufferGeometry for lower memory footprint."),THREE.Geometry.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new THREE.PlaneBufferGeometry(t,e,i,n))},THREE.PlaneGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.PlaneBufferGeometry=function(t,e,i,n){THREE.BufferGeometry.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n};var r=t/2,o=e/2;i=i||1,n=n||1;var s=i+1,a=n+1,l=t/i,h=e/n;e=new Float32Array(s*a*3),t=new Float32Array(s*a*3);for(var c=new Float32Array(s*a*2),u=0,d=0,p=0;a>p;p++)for(var f=p*h-o,m=0;s>m;m++)e[u]=m*l-r,e[u+1]=-f,t[u+2]=1,c[d]=m/i,c[d+1]=1-p/n,u+=3,d+=2;for(u=0,r=new(65535<e.length/3?Uint32Array:Uint16Array)(i*n*6),p=0;n>p;p++)for(m=0;i>m;m++)o=m+s*(p+1),a=m+1+s*(p+1),l=m+1+s*p,r[u]=m+s*p,r[u+1]=o,r[u+2]=l,r[u+3]=o,r[u+4]=a,r[u+5]=l,u+=6;this.addAttribute("index",new THREE.BufferAttribute(r,1)),this.addAttribute("position",new THREE.BufferAttribute(e,3)),this.addAttribute("normal",new THREE.BufferAttribute(t,3)),this.addAttribute("uv",new THREE.BufferAttribute(c,2))},THREE.PlaneBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype),THREE.RingGeometry=function(t,e,i,n,r,o){THREE.Geometry.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:o},t=t||0,e=e||50,r=void 0!==r?r:0,o=void 0!==o?o:2*Math.PI,i=void 0!==i?Math.max(3,i):8,n=void 0!==n?Math.max(1,n):8;var s,a=[],l=t,h=(e-t)/n;for(t=0;n+1>t;t++){for(s=0;i+1>s;s++){var c=new THREE.Vector3,u=r+s/i*o;c.x=l*Math.cos(u),c.y=l*Math.sin(u),this.vertices.push(c),a.push(new THREE.Vector2((c.x/e+1)/2,(c.y/e+1)/2))}l+=h}for(e=new THREE.Vector3(0,0,1),t=0;n>t;t++)for(r=t*(i+1),s=0;i>s;s++)o=u=s+r,h=u+i+1,c=u+i+2,this.faces.push(new THREE.Face3(o,h,c,[e.clone(),e.clone(),e.clone()])),this.faceVertexUvs[0].push([a[o].clone(),a[h].clone(),a[c].clone()]),o=u,h=u+i+2,c=u+1,this.faces.push(new THREE.Face3(o,h,c,[e.clone(),e.clone(),e.clone()])),this.faceVertexUvs[0].push([a[o].clone(),a[h].clone(),a[c].clone()]);this.computeFaceNormals(),this.boundingSphere=new THREE.Sphere(new THREE.Vector3,l)},THREE.RingGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.SphereGeometry=function(t,e,i,n,r,o,s){THREE.Geometry.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:o,thetaLength:s},t=t||50,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI,o=void 0!==o?o:0,s=void 0!==s?s:Math.PI;var a,l,h=[],c=[];for(l=0;i>=l;l++){var u=[],d=[];for(a=0;e>=a;a++){var p=a/e,f=l/i,m=new THREE.Vector3;m.x=-t*Math.cos(n+p*r)*Math.sin(o+f*s),m.y=t*Math.cos(o+f*s),m.z=t*Math.sin(n+p*r)*Math.sin(o+f*s),this.vertices.push(m),u.push(this.vertices.length-1),d.push(new THREE.Vector2(p,1-f))}h.push(u),c.push(d)}for(l=0;i>l;l++)for(a=0;e>a;a++){n=h[l][a+1],r=h[l][a],o=h[l+1][a],s=h[l+1][a+1];var u=this.vertices[n].clone().normalize(),d=this.vertices[r].clone().normalize(),p=this.vertices[o].clone().normalize(),f=this.vertices[s].clone().normalize(),m=c[l][a+1].clone(),g=c[l][a].clone(),v=c[l+1][a].clone(),y=c[l+1][a+1].clone();Math.abs(this.vertices[n].y)===t?(m.x=(m.x+g.x)/2,this.faces.push(new THREE.Face3(n,o,s,[u,p,f])),this.faceVertexUvs[0].push([m,v,y])):Math.abs(this.vertices[o].y)===t?(v.x=(v.x+y.x)/2,this.faces.push(new THREE.Face3(n,r,o,[u,d,p])),this.faceVertexUvs[0].push([m,g,v])):(this.faces.push(new THREE.Face3(n,r,s,[u,d,f])),this.faceVertexUvs[0].push([m,g,y]),this.faces.push(new THREE.Face3(r,o,s,[d.clone(),p,f.clone()])),this.faceVertexUvs[0].push([g.clone(),v,y.clone()]))}this.computeFaceNormals(),this.boundingSphere=new THREE.Sphere(new THREE.Vector3,t)},THREE.SphereGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.TextGeometry=function(t,e){e=e||{};var i=THREE.FontUtils.generateShapes(t,e);e.amount=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),THREE.ExtrudeGeometry.call(this,i,e),this.type="TextGeometry"},THREE.TextGeometry.prototype=Object.create(THREE.ExtrudeGeometry.prototype),THREE.TorusGeometry=function(t,e,i,n,r){THREE.Geometry.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},t=t||100,e=e||40,i=i||8,n=n||6,r=r||2*Math.PI;for(var o=new THREE.Vector3,s=[],a=[],l=0;i>=l;l++)for(var h=0;n>=h;h++){var c=h/n*r,u=l/i*Math.PI*2;o.x=t*Math.cos(c),o.y=t*Math.sin(c);var d=new THREE.Vector3;d.x=(t+e*Math.cos(u))*Math.cos(c),d.y=(t+e*Math.cos(u))*Math.sin(c),d.z=e*Math.sin(u),this.vertices.push(d),s.push(new THREE.Vector2(h/n,l/i)),a.push(d.clone().sub(o).normalize())}for(l=1;i>=l;l++)for(h=1;n>=h;h++)t=(n+1)*l+h-1,e=(n+1)*(l-1)+h-1,r=(n+1)*(l-1)+h,o=(n+1)*l+h,c=new THREE.Face3(t,e,o,[a[t].clone(),a[e].clone(),a[o].clone()]),this.faces.push(c),this.faceVertexUvs[0].push([s[t].clone(),s[e].clone(),s[o].clone()]),c=new THREE.Face3(e,r,o,[a[e].clone(),a[r].clone(),a[o].clone()]),this.faces.push(c),this.faceVertexUvs[0].push([s[e].clone(),s[r].clone(),s[o].clone()]);this.computeFaceNormals()},THREE.TorusGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.TorusKnotGeometry=function(t,e,i,n,r,o,s){function a(t,e,i,n,r){var o=Math.cos(t),s=Math.sin(t);return t*=e/i,e=Math.cos(t),o*=n*(2+e)*.5,s=n*(2+e)*s*.5,n=r*n*Math.sin(t)*.5,new THREE.Vector3(o,s,n)}THREE.Geometry.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,p:r,q:o,heightScale:s},t=t||100,e=e||40,i=i||64,n=n||8,r=r||2,o=o||3,s=s||1;for(var l=Array(i),h=new THREE.Vector3,c=new THREE.Vector3,u=new THREE.Vector3,d=0;i>d;++d){l[d]=Array(n);var p=d/i*2*r*Math.PI,f=a(p,o,r,t,s),p=a(p+.01,o,r,t,s);for(h.subVectors(p,f),c.addVectors(p,f),u.crossVectors(h,c),c.crossVectors(u,h),u.normalize(),c.normalize(),p=0;n>p;++p){var m=p/n*2*Math.PI,g=-e*Math.cos(m),m=e*Math.sin(m),v=new THREE.Vector3;v.x=f.x+g*c.x+m*u.x,v.y=f.y+g*c.y+m*u.y,v.z=f.z+g*c.z+m*u.z,l[d][p]=this.vertices.push(v)-1}}for(d=0;i>d;++d)for(p=0;n>p;++p)r=(d+1)%i,o=(p+1)%n,t=l[d][p],e=l[r][p],r=l[r][o],o=l[d][o],s=new THREE.Vector2(d/i,p/n),h=new THREE.Vector2((d+1)/i,p/n),c=new THREE.Vector2((d+1)/i,(p+1)/n),u=new THREE.Vector2(d/i,(p+1)/n),this.faces.push(new THREE.Face3(t,e,o)),this.faceVertexUvs[0].push([s,h,u]),this.faces.push(new THREE.Face3(e,r,o)),this.faceVertexUvs[0].push([h.clone(),c,u.clone()]);this.computeFaceNormals(),this.computeVertexNormals()},THREE.TorusKnotGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.TubeGeometry=function(t,e,i,n,r){THREE.Geometry.call(this),this.type="TubeGeometry",this.parameters={path:t,segments:e,radius:i,radialSegments:n,closed:r},e=e||64,i=i||1,n=n||8,r=r||!1;var o,s,a,l,h,c,u,d,p,f=[],m=e+1,g=new THREE.Vector3;for(u=new THREE.TubeGeometry.FrenetFrames(t,e,r),d=u.normals,p=u.binormals,this.tangents=u.tangents,this.normals=d,this.binormals=p,u=0;m>u;u++)for(f[u]=[],a=u/(m-1),c=t.getPointAt(a),o=d[u],s=p[u],a=0;n>a;a++)l=a/n*2*Math.PI,h=-i*Math.cos(l),l=i*Math.sin(l),g.copy(c),g.x+=h*o.x+l*s.x,g.y+=h*o.y+l*s.y,g.z+=h*o.z+l*s.z,f[u][a]=this.vertices.push(new THREE.Vector3(g.x,g.y,g.z))-1;for(u=0;e>u;u++)for(a=0;n>a;a++)m=r?(u+1)%e:u+1,g=(a+1)%n,t=f[u][a],i=f[m][a],m=f[m][g],g=f[u][g],d=new THREE.Vector2(u/e,a/n),p=new THREE.Vector2((u+1)/e,a/n),o=new THREE.Vector2((u+1)/e,(a+1)/n),s=new THREE.Vector2(u/e,(a+1)/n),this.faces.push(new THREE.Face3(t,i,g)),this.faceVertexUvs[0].push([d,p,s]),this.faces.push(new THREE.Face3(i,m,g)),this.faceVertexUvs[0].push([p.clone(),o,s.clone()]);this.computeFaceNormals(),this.computeVertexNormals()},THREE.TubeGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.TubeGeometry.FrenetFrames=function(t,e,i){new THREE.Vector3;var n=new THREE.Vector3;new THREE.Vector3;var r=[],o=[],s=[],a=new THREE.Vector3,l=new THREE.Matrix4;e+=1;var h,c,u;for(this.tangents=r,this.normals=o,this.binormals=s,h=0;e>h;h++)c=h/(e-1),r[h]=t.getTangentAt(c),r[h].normalize();for(o[0]=new THREE.Vector3,s[0]=new THREE.Vector3,t=Number.MAX_VALUE,h=Math.abs(r[0].x),c=Math.abs(r[0].y),u=Math.abs(r[0].z),t>=h&&(t=h,n.set(1,0,0)),t>=c&&(t=c,n.set(0,1,0)),t>=u&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),o[0].crossVectors(r[0],a),s[0].crossVectors(r[0],o[0]),h=1;e>h;h++)o[h]=o[h-1].clone(),s[h]=s[h-1].clone(),a.crossVectors(r[h-1],r[h]),1e-4<a.length()&&(a.normalize(),n=Math.acos(THREE.Math.clamp(r[h-1].dot(r[h]),-1,1)),o[h].applyMatrix4(l.makeRotationAxis(a,n))),s[h].crossVectors(r[h],o[h]);if(i)for(n=Math.acos(THREE.Math.clamp(o[0].dot(o[e-1]),-1,1)),n/=e-1,0<r[0].dot(a.crossVectors(o[0],o[e-1]))&&(n=-n),h=1;e>h;h++)o[h].applyMatrix4(l.makeRotationAxis(r[h],n*h)),s[h].crossVectors(r[h],o[h])},THREE.PolyhedronGeometry=function(t,e,i,n){function r(t){var e=t.normalize().clone();e.index=l.vertices.push(e)-1;var i=Math.atan2(t.z,-t.x)/2/Math.PI+.5;return t=Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5,e.uv=new THREE.Vector2(i,1-t),e}function o(t,e,i){var n=new THREE.Face3(t.index,e.index,i.index,[t.clone(),e.clone(),i.clone()]);l.faces.push(n),g.copy(t).add(e).add(i).divideScalar(3),n=Math.atan2(g.z,-g.x),l.faceVertexUvs[0].push([a(t.uv,t,n),a(e.uv,e,n),a(i.uv,i,n)])}function s(t,e){var i=Math.pow(2,e);Math.pow(4,e);for(var n=r(l.vertices[t.a]),s=r(l.vertices[t.b]),a=r(l.vertices[t.c]),h=[],c=0;i>=c;c++){h[c]=[];for(var u=r(n.clone().lerp(a,c/i)),d=r(s.clone().lerp(a,c/i)),p=i-c,f=0;p>=f;f++)h[c][f]=0==f&&c==i?u:r(u.clone().lerp(d,f/p))}for(c=0;i>c;c++)for(f=0;2*(i-c)-1>f;f++)n=Math.floor(f/2),0==f%2?o(h[c][n+1],h[c+1][n],h[c][n]):o(h[c][n+1],h[c+1][n+1],h[c+1][n])}function a(t,e,i){return 0>i&&1===t.x&&(t=new THREE.Vector2(t.x-1,t.y)),0===e.x&&0===e.z&&(t=new THREE.Vector2(i/2/Math.PI+.5,t.y)),t.clone()}THREE.Geometry.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},i=i||1,n=n||0;for(var l=this,h=0,c=t.length;c>h;h+=3)r(new THREE.Vector3(t[h],t[h+1],t[h+2]));t=this.vertices;for(var u=[],d=h=0,c=e.length;c>h;h+=3,d++){var p=t[e[h]],f=t[e[h+1]],m=t[e[h+2]];u[d]=new THREE.Face3(p.index,f.index,m.index,[p.clone(),f.clone(),m.clone()])}for(var g=new THREE.Vector3,h=0,c=u.length;c>h;h++)s(u[h],n);for(h=0,c=this.faceVertexUvs[0].length;c>h;h++)e=this.faceVertexUvs[0][h],n=e[0].x,t=e[1].x,u=e[2].x,d=Math.max(n,Math.max(t,u)),p=Math.min(n,Math.min(t,u)),d>.9&&.1>p&&(.2>n&&(e[0].x+=1),.2>t&&(e[1].x+=1),.2>u&&(e[2].x+=1));for(h=0,c=this.vertices.length;c>h;h++)this.vertices[h].multiplyScalar(i);this.mergeVertices(),this.computeFaceNormals(),this.boundingSphere=new THREE.Sphere(new THREE.Vector3,i)},THREE.PolyhedronGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.DodecahedronGeometry=function(t,e){this.parameters={radius:t,detail:e};var i=(1+Math.sqrt(5))/2,n=1/i;THREE.PolyhedronGeometry.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e)},THREE.DodecahedronGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.IcosahedronGeometry=function(t,e){var i=(1+Math.sqrt(5))/2;THREE.PolyhedronGeometry.call(this,[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,e),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e}},THREE.IcosahedronGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.OctahedronGeometry=function(t,e){this.parameters={radius:t,detail:e},THREE.PolyhedronGeometry.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,e),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e}},THREE.OctahedronGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.TetrahedronGeometry=function(t,e){THREE.PolyhedronGeometry.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e}},THREE.TetrahedronGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.ParametricGeometry=function(t,e,i){THREE.Geometry.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i};var n,r,o,s,a=this.vertices,l=this.faces,h=this.faceVertexUvs[0],c=e+1;for(n=0;i>=n;n++)for(s=n/i,r=0;e>=r;r++)o=r/e,o=t(o,s),a.push(o);var u,d,p,f;for(n=0;i>n;n++)for(r=0;e>r;r++)t=n*c+r,a=n*c+r+1,s=(n+1)*c+r+1,o=(n+1)*c+r,u=new THREE.Vector2(r/e,n/i),d=new THREE.Vector2((r+1)/e,n/i),p=new THREE.Vector2((r+1)/e,(n+1)/i),f=new THREE.Vector2(r/e,(n+1)/i),l.push(new THREE.Face3(t,a,o)),h.push([u,d,f]),l.push(new THREE.Face3(a,s,o)),h.push([d.clone(),p,f.clone()]);this.computeFaceNormals(),this.computeVertexNormals()},THREE.ParametricGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.AxisHelper=function(t){t=t||1;var e=new Float32Array([0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t]),i=new Float32Array([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1]);t=new THREE.BufferGeometry,t.addAttribute("position",new THREE.BufferAttribute(e,3)),t.addAttribute("color",new THREE.BufferAttribute(i,3)),e=new THREE.LineBasicMaterial({vertexColors:THREE.VertexColors}),THREE.Line.call(this,t,e,THREE.LinePieces)},THREE.AxisHelper.prototype=Object.create(THREE.Line.prototype),THREE.ArrowHelper=function(){var t=new THREE.Geometry;t.vertices.push(new THREE.Vector3(0,0,0),new THREE.Vector3(0,1,0));var e=new THREE.CylinderGeometry(0,.5,1,5,1);return e.applyMatrix((new THREE.Matrix4).makeTranslation(0,-.5,0)),function(i,n,r,o,s,a){THREE.Object3D.call(this),void 0===o&&(o=16776960),void 0===r&&(r=1),void 0===s&&(s=.2*r),void 0===a&&(a=.2*s),this.position.copy(n),this.line=new THREE.Line(t,new THREE.LineBasicMaterial({color:o})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new THREE.Mesh(e,new THREE.MeshBasicMaterial({color:o})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(i),this.setLength(r,s,a)}}(),THREE.ArrowHelper.prototype=Object.create(THREE.Object3D.prototype),THREE.ArrowHelper.prototype.setDirection=function(){var t,e=new THREE.Vector3;return function(i){.99999<i.y?this.quaternion.set(0,0,0,1):-.99999>i.y?this.quaternion.set(1,0,0,0):(e.set(i.z,0,-i.x).normalize(),t=Math.acos(i.y),this.quaternion.setFromAxisAngle(e,t))}}(),THREE.ArrowHelper.prototype.setLength=function(t,e,i){void 0===e&&(e=.2*t),void 0===i&&(i=.2*e),this.line.scale.set(1,t,1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},THREE.ArrowHelper.prototype.setColor=function(t){this.line.material.color.set(t),this.cone.material.color.set(t)},THREE.BoxHelper=function(t){var e=new THREE.BufferGeometry;e.addAttribute("position",new THREE.BufferAttribute(new Float32Array(72),3)),THREE.Line.call(this,e,new THREE.LineBasicMaterial({color:16776960}),THREE.LinePieces),void 0!==t&&this.update(t)},THREE.BoxHelper.prototype=Object.create(THREE.Line.prototype),THREE.BoxHelper.prototype.update=function(t){var e=t.geometry;null===e.boundingBox&&e.computeBoundingBox();var i=e.boundingBox.min,e=e.boundingBox.max,n=this.geometry.attributes.position.array;n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=i.x,n[4]=e.y,n[5]=e.z,n[6]=i.x,n[7]=e.y,n[8]=e.z,n[9]=i.x,n[10]=i.y,n[11]=e.z,n[12]=i.x,n[13]=i.y,n[14]=e.z,n[15]=e.x,n[16]=i.y,n[17]=e.z,n[18]=e.x,n[19]=i.y,n[20]=e.z,n[21]=e.x,n[22]=e.y,n[23]=e.z,n[24]=e.x,n[25]=e.y,n[26]=i.z,n[27]=i.x,n[28]=e.y,n[29]=i.z,n[30]=i.x,n[31]=e.y,n[32]=i.z,n[33]=i.x,n[34]=i.y,n[35]=i.z,n[36]=i.x,n[37]=i.y,n[38]=i.z,n[39]=e.x,n[40]=i.y,n[41]=i.z,n[42]=e.x,n[43]=i.y,n[44]=i.z,n[45]=e.x,n[46]=e.y,n[47]=i.z,n[48]=e.x,n[49]=e.y,n[50]=e.z,n[51]=e.x,n[52]=e.y,n[53]=i.z,n[54]=i.x,n[55]=e.y,n[56]=e.z,n[57]=i.x,n[58]=e.y,n[59]=i.z,n[60]=i.x,n[61]=i.y,n[62]=e.z,n[63]=i.x,n[64]=i.y,n[65]=i.z,n[66]=e.x,n[67]=i.y,n[68]=e.z,n[69]=e.x,n[70]=i.y,n[71]=i.z,this.geometry.attributes.position.needsUpdate=!0,this.geometry.computeBoundingSphere(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1},THREE.BoundingBoxHelper=function(t,e){var i=void 0!==e?e:8947848;this.object=t,this.box=new THREE.Box3,THREE.Mesh.call(this,new THREE.BoxGeometry(1,1,1),new THREE.MeshBasicMaterial({color:i,wireframe:!0}))},THREE.BoundingBoxHelper.prototype=Object.create(THREE.Mesh.prototype),THREE.BoundingBoxHelper.prototype.update=function(){this.box.setFromObject(this.object),this.box.size(this.scale),this.box.center(this.position)},THREE.CameraHelper=function(t){function e(t,e,n){i(t,n),i(e,n)}function i(t,e){n.vertices.push(new THREE.Vector3),n.colors.push(new THREE.Color(e)),void 0===o[t]&&(o[t]=[]),o[t].push(n.vertices.length-1)}var n=new THREE.Geometry,r=new THREE.LineBasicMaterial({color:16777215,vertexColors:THREE.FaceColors}),o={};e("n1","n2",16755200),e("n2","n4",16755200),e("n4","n3",16755200),e("n3","n1",16755200),e("f1","f2",16755200),e("f2","f4",16755200),e("f4","f3",16755200),e("f3","f1",16755200),e("n1","f1",16755200),e("n2","f2",16755200),e("n3","f3",16755200),e("n4","f4",16755200),e("p","n1",16711680),e("p","n2",16711680),e("p","n3",16711680),e("p","n4",16711680),e("u1","u2",43775),e("u2","u3",43775),e("u3","u1",43775),e("c","t",16777215),e("p","c",3355443),e("cn1","cn2",3355443),e("cn3","cn4",3355443),e("cf1","cf2",3355443),e("cf3","cf4",3355443),THREE.Line.call(this,n,r,THREE.LinePieces),this.camera=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()},THREE.CameraHelper.prototype=Object.create(THREE.Line.prototype),THREE.CameraHelper.prototype.update=function(){var t,e,i=new THREE.Vector3,n=new THREE.Camera,r=function(r,o,s,a){if(i.set(o,s,a).unproject(n),r=e[r],void 0!==r)for(o=0,s=r.length;s>o;o++)t.vertices[r[o]].copy(i)};return function(){t=this.geometry,e=this.pointMap,n.projectionMatrix.copy(this.camera.projectionMatrix),r("c",0,0,-1),r("t",0,0,1),r("n1",-1,-1,-1),r("n2",1,-1,-1),r("n3",-1,1,-1),r("n4",1,1,-1),r("f1",-1,-1,1),r("f2",1,-1,1),r("f3",-1,1,1),r("f4",1,1,1),r("u1",.7,1.1,-1),r("u2",-.7,1.1,-1),r("u3",0,2,-1),r("cf1",-1,0,1),r("cf2",1,0,1),r("cf3",0,-1,1),r("cf4",0,1,1),r("cn1",-1,0,-1),r("cn2",1,0,-1),r("cn3",0,-1,-1),r("cn4",0,1,-1),t.verticesNeedUpdate=!0}}(),THREE.DirectionalLightHelper=function(t,e){THREE.Object3D.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,e=e||1;
  34. var i=new THREE.Geometry;i.vertices.push(new THREE.Vector3(-e,e,0),new THREE.Vector3(e,e,0),new THREE.Vector3(e,-e,0),new THREE.Vector3(-e,-e,0),new THREE.Vector3(-e,e,0));var n=new THREE.LineBasicMaterial({fog:!1});n.color.copy(this.light.color).multiplyScalar(this.light.intensity),this.lightPlane=new THREE.Line(i,n),this.add(this.lightPlane),i=new THREE.Geometry,i.vertices.push(new THREE.Vector3,new THREE.Vector3),n=new THREE.LineBasicMaterial({fog:!1}),n.color.copy(this.light.color).multiplyScalar(this.light.intensity),this.targetLine=new THREE.Line(i,n),this.add(this.targetLine),this.update()},THREE.DirectionalLightHelper.prototype=Object.create(THREE.Object3D.prototype),THREE.DirectionalLightHelper.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},THREE.DirectionalLightHelper.prototype.update=function(){var t=new THREE.Vector3,e=new THREE.Vector3,i=new THREE.Vector3;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(e,t),this.lightPlane.lookAt(i),this.lightPlane.material.color.copy(this.light.color).multiplyScalar(this.light.intensity),this.targetLine.geometry.vertices[1].copy(i),this.targetLine.geometry.verticesNeedUpdate=!0,this.targetLine.material.color.copy(this.lightPlane.material.color)}}(),THREE.EdgesHelper=function(t,e){var i=void 0!==e?e:16777215,n=[0,0],r={},o=function(t,e){return t-e},s=["a","b","c"],a=new THREE.BufferGeometry,l=t.geometry.clone();l.mergeVertices(),l.computeFaceNormals();for(var h=l.vertices,l=l.faces,c=0,u=0,d=l.length;d>u;u++)for(var p=l[u],f=0;3>f;f++){n[0]=p[s[f]],n[1]=p[s[(f+1)%3]],n.sort(o);var m=n.toString();void 0===r[m]?(r[m]={vert1:n[0],vert2:n[1],face1:u,face2:void 0},c++):r[m].face2=u}n=new Float32Array(6*c),o=0;for(m in r)s=r[m],(void 0===s.face2||.9999>l[s.face1].normal.dot(l[s.face2].normal))&&(c=h[s.vert1],n[o++]=c.x,n[o++]=c.y,n[o++]=c.z,c=h[s.vert2],n[o++]=c.x,n[o++]=c.y,n[o++]=c.z);a.addAttribute("position",new THREE.BufferAttribute(n,3)),THREE.Line.call(this,a,new THREE.LineBasicMaterial({color:i}),THREE.LinePieces),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1},THREE.EdgesHelper.prototype=Object.create(THREE.Line.prototype),THREE.FaceNormalsHelper=function(t,e,i,n){this.object=t,this.size=void 0!==e?e:1,t=void 0!==i?i:16776960,n=void 0!==n?n:1,e=new THREE.Geometry,i=0;for(var r=this.object.geometry.faces.length;r>i;i++)e.vertices.push(new THREE.Vector3,new THREE.Vector3);THREE.Line.call(this,e,new THREE.LineBasicMaterial({color:t,linewidth:n}),THREE.LinePieces),this.matrixAutoUpdate=!1,this.normalMatrix=new THREE.Matrix3,this.update()},THREE.FaceNormalsHelper.prototype=Object.create(THREE.Line.prototype),THREE.FaceNormalsHelper.prototype.update=function(){var t=this.geometry.vertices,e=this.object,i=e.geometry.vertices,n=e.geometry.faces,r=e.matrixWorld;e.updateMatrixWorld(!0),this.normalMatrix.getNormalMatrix(r);for(var o=e=0,s=n.length;s>e;e++,o+=2){var a=n[e];t[o].copy(i[a.a]).add(i[a.b]).add(i[a.c]).divideScalar(3).applyMatrix4(r),t[o+1].copy(a.normal).applyMatrix3(this.normalMatrix).normalize().multiplyScalar(this.size).add(t[o])}return this.geometry.verticesNeedUpdate=!0,this},THREE.GridHelper=function(t,e){var i=new THREE.Geometry,n=new THREE.LineBasicMaterial({vertexColors:THREE.VertexColors});this.color1=new THREE.Color(4473924),this.color2=new THREE.Color(8947848);for(var r=-t;t>=r;r+=e){i.vertices.push(new THREE.Vector3(-t,0,r),new THREE.Vector3(t,0,r),new THREE.Vector3(r,0,-t),new THREE.Vector3(r,0,t));var o=0===r?this.color1:this.color2;i.colors.push(o,o,o,o)}THREE.Line.call(this,i,n,THREE.LinePieces)},THREE.GridHelper.prototype=Object.create(THREE.Line.prototype),THREE.GridHelper.prototype.setColors=function(t,e){this.color1.set(t),this.color2.set(e),this.geometry.colorsNeedUpdate=!0},THREE.HemisphereLightHelper=function(t,e){for(THREE.Object3D.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.colors=[new THREE.Color,new THREE.Color],t=new THREE.SphereGeometry(e,4,2),t.applyMatrix((new THREE.Matrix4).makeRotationX(-Math.PI/2)),e=0;8>e;e++)t.faces[e].color=this.colors[4>e?0:1];e=new THREE.MeshBasicMaterial({vertexColors:THREE.FaceColors,wireframe:!0}),this.lightSphere=new THREE.Mesh(t,e),this.add(this.lightSphere),this.update()},THREE.HemisphereLightHelper.prototype=Object.create(THREE.Object3D.prototype),THREE.HemisphereLightHelper.prototype.dispose=function(){this.lightSphere.geometry.dispose(),this.lightSphere.material.dispose()},THREE.HemisphereLightHelper.prototype.update=function(){var t=new THREE.Vector3;return function(){this.colors[0].copy(this.light.color).multiplyScalar(this.light.intensity),this.colors[1].copy(this.light.groundColor).multiplyScalar(this.light.intensity),this.lightSphere.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate()),this.lightSphere.geometry.colorsNeedUpdate=!0}}(),THREE.PointLightHelper=function(t,e){this.light=t,this.light.updateMatrixWorld();var i=new THREE.SphereGeometry(e,4,2),n=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});n.color.copy(this.light.color).multiplyScalar(this.light.intensity),THREE.Mesh.call(this,i,n),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1},THREE.PointLightHelper.prototype=Object.create(THREE.Mesh.prototype),THREE.PointLightHelper.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},THREE.PointLightHelper.prototype.update=function(){this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)},THREE.SkeletonHelper=function(t){this.bones=this.getBoneList(t);for(var e=new THREE.Geometry,i=0;i<this.bones.length;i++)this.bones[i].parent instanceof THREE.Bone&&(e.vertices.push(new THREE.Vector3),e.vertices.push(new THREE.Vector3),e.colors.push(new THREE.Color(0,0,1)),e.colors.push(new THREE.Color(0,1,0)));i=new THREE.LineBasicMaterial({vertexColors:THREE.VertexColors,depthTest:!1,depthWrite:!1,transparent:!0}),THREE.Line.call(this,e,i,THREE.LinePieces),this.root=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.update()},THREE.SkeletonHelper.prototype=Object.create(THREE.Line.prototype),THREE.SkeletonHelper.prototype.getBoneList=function(t){var e=[];t instanceof THREE.Bone&&e.push(t);for(var i=0;i<t.children.length;i++)e.push.apply(e,this.getBoneList(t.children[i]));return e},THREE.SkeletonHelper.prototype.update=function(){for(var t=this.geometry,e=(new THREE.Matrix4).getInverse(this.root.matrixWorld),i=new THREE.Matrix4,n=0,r=0;r<this.bones.length;r++){var o=this.bones[r];o.parent instanceof THREE.Bone&&(i.multiplyMatrices(e,o.matrixWorld),t.vertices[n].setFromMatrixPosition(i),i.multiplyMatrices(e,o.parent.matrixWorld),t.vertices[n+1].setFromMatrixPosition(i),n+=2)}t.verticesNeedUpdate=!0,t.computeBoundingSphere()},THREE.SpotLightHelper=function(t){THREE.Object3D.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,t=new THREE.CylinderGeometry(0,1,1,8,1,!0),t.applyMatrix((new THREE.Matrix4).makeTranslation(0,-.5,0)),t.applyMatrix((new THREE.Matrix4).makeRotationX(-Math.PI/2));var e=new THREE.MeshBasicMaterial({wireframe:!0,fog:!1});this.cone=new THREE.Mesh(t,e),this.add(this.cone),this.update()},THREE.SpotLightHelper.prototype=Object.create(THREE.Object3D.prototype),THREE.SpotLightHelper.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},THREE.SpotLightHelper.prototype.update=function(){var t=new THREE.Vector3,e=new THREE.Vector3;return function(){var i=this.light.distance?this.light.distance:1e4,n=i*Math.tan(this.light.angle);this.cone.scale.set(n,n,i),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),this.cone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)}}(),THREE.VertexNormalsHelper=function(t,e,i,n){this.object=t,this.size=void 0!==e?e:1,e=void 0!==i?i:16711680,n=void 0!==n?n:1,i=new THREE.Geometry,t=t.geometry.faces;for(var r=0,o=t.length;o>r;r++)for(var s=0,a=t[r].vertexNormals.length;a>s;s++)i.vertices.push(new THREE.Vector3,new THREE.Vector3);THREE.Line.call(this,i,new THREE.LineBasicMaterial({color:e,linewidth:n}),THREE.LinePieces),this.matrixAutoUpdate=!1,this.normalMatrix=new THREE.Matrix3,this.update()},THREE.VertexNormalsHelper.prototype=Object.create(THREE.Line.prototype),THREE.VertexNormalsHelper.prototype.update=function(){var t=new THREE.Vector3;return function(e){e=["a","b","c","d"],this.object.updateMatrixWorld(!0),this.normalMatrix.getNormalMatrix(this.object.matrixWorld);for(var i=this.geometry.vertices,n=this.object.geometry.vertices,r=this.object.geometry.faces,o=this.object.matrixWorld,s=0,a=0,l=r.length;l>a;a++)for(var h=r[a],c=0,u=h.vertexNormals.length;u>c;c++){var d=h.vertexNormals[c];i[s].copy(n[h[e[c]]]).applyMatrix4(o),t.copy(d).applyMatrix3(this.normalMatrix).normalize().multiplyScalar(this.size),t.add(i[s]),s+=1,i[s].copy(t),s+=1}return this.geometry.verticesNeedUpdate=!0,this}}(),THREE.VertexTangentsHelper=function(t,e,i,n){this.object=t,this.size=void 0!==e?e:1,e=void 0!==i?i:255,n=void 0!==n?n:1,i=new THREE.Geometry,t=t.geometry.faces;for(var r=0,o=t.length;o>r;r++)for(var s=0,a=t[r].vertexTangents.length;a>s;s++)i.vertices.push(new THREE.Vector3),i.vertices.push(new THREE.Vector3);THREE.Line.call(this,i,new THREE.LineBasicMaterial({color:e,linewidth:n}),THREE.LinePieces),this.matrixAutoUpdate=!1,this.update()},THREE.VertexTangentsHelper.prototype=Object.create(THREE.Line.prototype),THREE.VertexTangentsHelper.prototype.update=function(){var t=new THREE.Vector3;return function(e){e=["a","b","c","d"],this.object.updateMatrixWorld(!0);for(var i=this.geometry.vertices,n=this.object.geometry.vertices,r=this.object.geometry.faces,o=this.object.matrixWorld,s=0,a=0,l=r.length;l>a;a++)for(var h=r[a],c=0,u=h.vertexTangents.length;u>c;c++){var d=h.vertexTangents[c];i[s].copy(n[h[e[c]]]).applyMatrix4(o),t.copy(d).transformDirection(o).multiplyScalar(this.size),t.add(i[s]),s+=1,i[s].copy(t),s+=1}return this.geometry.verticesNeedUpdate=!0,this}}(),THREE.WireframeHelper=function(t,e){var i=void 0!==e?e:16777215,n=[0,0],r={},o=function(t,e){return t-e},s=["a","b","c"],a=new THREE.BufferGeometry;if(t.geometry instanceof THREE.Geometry){for(var l=t.geometry.vertices,h=t.geometry.faces,c=0,u=new Uint32Array(6*h.length),d=0,p=h.length;p>d;d++)for(var f=h[d],m=0;3>m;m++){n[0]=f[s[m]],n[1]=f[s[(m+1)%3]],n.sort(o);var g=n.toString();void 0===r[g]&&(u[2*c]=n[0],u[2*c+1]=n[1],r[g]=!0,c++)}for(n=new Float32Array(6*c),d=0,p=c;p>d;d++)for(m=0;2>m;m++)c=l[u[2*d+m]],s=6*d+3*m,n[s+0]=c.x,n[s+1]=c.y,n[s+2]=c.z;a.addAttribute("position",new THREE.BufferAttribute(n,3))}else if(t.geometry instanceof THREE.BufferGeometry){if(void 0!==t.geometry.attributes.index){l=t.geometry.attributes.position.array,p=t.geometry.attributes.index.array,h=t.geometry.drawcalls,c=0,0===h.length&&(h=[{count:p.length,index:0,start:0}]);for(var u=new Uint32Array(2*p.length),f=0,v=h.length;v>f;++f)for(var m=h[f].start,g=h[f].count,s=h[f].index,d=m,y=m+g;y>d;d+=3)for(m=0;3>m;m++)n[0]=s+p[d+m],n[1]=s+p[d+(m+1)%3],n.sort(o),g=n.toString(),void 0===r[g]&&(u[2*c]=n[0],u[2*c+1]=n[1],r[g]=!0,c++);for(n=new Float32Array(6*c),d=0,p=c;p>d;d++)for(m=0;2>m;m++)s=6*d+3*m,c=3*u[2*d+m],n[s+0]=l[c],n[s+1]=l[c+1],n[s+2]=l[c+2]}else for(l=t.geometry.attributes.position.array,c=l.length/3,u=c/3,n=new Float32Array(6*c),d=0,p=u;p>d;d++)for(m=0;3>m;m++)s=18*d+6*m,u=9*d+3*m,n[s+0]=l[u],n[s+1]=l[u+1],n[s+2]=l[u+2],c=9*d+(m+1)%3*3,n[s+3]=l[c],n[s+4]=l[c+1],n[s+5]=l[c+2];a.addAttribute("position",new THREE.BufferAttribute(n,3))}THREE.Line.call(this,a,new THREE.LineBasicMaterial({color:i}),THREE.LinePieces),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1},THREE.WireframeHelper.prototype=Object.create(THREE.Line.prototype),THREE.ImmediateRenderObject=function(){THREE.Object3D.call(this),this.render=function(){}},THREE.ImmediateRenderObject.prototype=Object.create(THREE.Object3D.prototype),THREE.MorphBlendMesh=function(t,e){THREE.Mesh.call(this,t,e),this.animationsMap={},this.animationsList=[];var i=this.geometry.morphTargets.length;this.createAnimation("__default",0,i-1,i/1),this.setAnimationWeight("__default",1)},THREE.MorphBlendMesh.prototype=Object.create(THREE.Mesh.prototype),THREE.MorphBlendMesh.prototype.createAnimation=function(t,e,i,n){e={startFrame:e,endFrame:i,length:i-e+1,fps:n,duration:(i-e)/n,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1},this.animationsMap[t]=e,this.animationsList.push(e)},THREE.MorphBlendMesh.prototype.autoCreateAnimations=function(t){for(var e,i=/([a-z]+)_?(\d+)/,n={},r=this.geometry,o=0,s=r.morphTargets.length;s>o;o++){var a=r.morphTargets[o].name.match(i);if(a&&1<a.length){var l=a[1];n[l]||(n[l]={start:1/0,end:-1/0}),a=n[l],o<a.start&&(a.start=o),o>a.end&&(a.end=o),e||(e=l)}}for(l in n)a=n[l],this.createAnimation(l,a.start,a.end,t);this.firstAnimation=e},THREE.MorphBlendMesh.prototype.setAnimationDirectionForward=function(t){(t=this.animationsMap[t])&&(t.direction=1,t.directionBackwards=!1)},THREE.MorphBlendMesh.prototype.setAnimationDirectionBackward=function(t){(t=this.animationsMap[t])&&(t.direction=-1,t.directionBackwards=!0)},THREE.MorphBlendMesh.prototype.setAnimationFPS=function(t,e){var i=this.animationsMap[t];i&&(i.fps=e,i.duration=(i.end-i.start)/i.fps)},THREE.MorphBlendMesh.prototype.setAnimationDuration=function(t,e){var i=this.animationsMap[t];i&&(i.duration=e,i.fps=(i.end-i.start)/i.duration)},THREE.MorphBlendMesh.prototype.setAnimationWeight=function(t,e){var i=this.animationsMap[t];i&&(i.weight=e)},THREE.MorphBlendMesh.prototype.setAnimationTime=function(t,e){var i=this.animationsMap[t];i&&(i.time=e)},THREE.MorphBlendMesh.prototype.getAnimationTime=function(t){var e=0;return(t=this.animationsMap[t])&&(e=t.time),e},THREE.MorphBlendMesh.prototype.getAnimationDuration=function(t){var e=-1;return(t=this.animationsMap[t])&&(e=t.duration),e},THREE.MorphBlendMesh.prototype.playAnimation=function(t){var e=this.animationsMap[t];e?(e.time=0,e.active=!0):console.warn("animation["+t+"] undefined")},THREE.MorphBlendMesh.prototype.stopAnimation=function(t){(t=this.animationsMap[t])&&(t.active=!1)},THREE.MorphBlendMesh.prototype.update=function(t){for(var e=0,i=this.animationsList.length;i>e;e++){var n=this.animationsList[e];if(n.active){var r=n.duration/n.length;n.time+=n.direction*t,n.mirroredLoop?(n.time>n.duration||0>n.time)&&(n.direction*=-1,n.time>n.duration&&(n.time=n.duration,n.directionBackwards=!0),0>n.time&&(n.time=0,n.directionBackwards=!1)):(n.time%=n.duration,0>n.time&&(n.time+=n.duration));var o=n.startFrame+THREE.Math.clamp(Math.floor(n.time/r),0,n.length-1),s=n.weight;o!==n.currentFrame&&(this.morphTargetInfluences[n.lastFrame]=0,this.morphTargetInfluences[n.currentFrame]=1*s,this.morphTargetInfluences[o]=0,n.lastFrame=n.currentFrame,n.currentFrame=o),r=n.time%r/r,n.directionBackwards&&(r=1-r),this.morphTargetInfluences[n.currentFrame]=r*s,this.morphTargetInfluences[n.lastFrame]=(1-r)*s}}};var GLOBE=GLOBE||{};GLOBE.Tooltip=function(){var t=document.createElement("div");t.className="globe-tooltip",document.body.appendChild(t),this.hide=function(){t.style.display="none"},this.show=function(e,i,n){t.style.display="inline",t.innerHTML=e,t.style.left=i+"px",t.style.top=n+"px"}};var GLOBE=GLOBE||{};GLOBE.Sphere=function(t){function e(e){t=t||{};var r=t.radius||200,o=t.segments||40,s=t.rings||20,a=new THREE.SphereGeometry(r,o,s);n=new THREE.MeshBasicMaterial;var l=new THREE.Mesh(a,n);l.matrixAutoUpdate=!1,l.updateMatrix(),e.mesh=l,e.setTexture=i}function i(t){n.map=t}var n;e(this)};var GLOBE=GLOBE||{};GLOBE.Atmosphere=function(t){function e(e){t=t||{};var r=t.radius||200,o=t.segments||40,s=t.rings||20,a=t.scale||1.15,l=new THREE.SphereGeometry(r,o,s),h=["varying vec3 vNormal;","void main() {","vNormal = normalize(normalMatrix * normal);","gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join("\n"),c=["varying vec3 vNormal;","void main() {","float intensity = (dot(vNormal, vec3(0, 0, 1.0)) + 0.7) * 1.6;","gl_FragColor = vec4(intensity, intensity, intensity, 1.0);","}"].join("\n");n=new THREE.ShaderMaterial({vertexShader:h,fragmentShader:c,side:THREE.BackSide,visible:!0});var u=new THREE.Mesh(l,n);u.scale.multiplyScalar(a),u.matrixAutoUpdate=!1,u.updateMatrix(),e.mesh=u,e.setVisibility=i}function i(t){n.visible=t}var n;e(this)};var GLOBE=GLOBE||{};GLOBE.Countries=function(t){function e(e){t=t||{};var n=function(t){return 1-Math.pow(t,1/3)};u=t.interpolator||n,d=t.maxSaturation||255,d>255&&(d=255),0>d&&(d=0),m={},p=0,f=new Uint8Array(y.length*v),g=new THREE.DataTexture(f,y.length,1,THREE.RGBFormat),g.magFilter=THREE.NearestFilter,g.minFilter=THREE.NearestMipMapNearestFilter,a(),e.texture=g,e.inc=o,e.dec=s,e.reset=a,e.getCC=l,e.getMarkers=h,e.getAllMarkers=c,e.hasMarker=i}function i(){return p>0?!0:!1}function n(t,e,i,n){f[t*v+0]=e,f[t*v+1]=i,f[t*v+2]=n}function r(){for(var t=0;t<y.length;t++)if(0>=p)n(t,d,d,d);else{var e=0|m[y[t]],i=e/p,r=u(i)*d;n(t,d,r,r)}g.needsUpdate=!0}function o(t){p++,m[t]=(0|m[t])+1,r()}function s(t){m[t]>0&&(p--,m[t]=m[t]-1,r())}function a(){for(key in m)m[key]=0;p=0,r()}function l(t){return y[t]}function h(t){return 0|m[y[t]]}function c(){return p}var u,d,p,f,m,g,v=3,y=["A1","A2","O1","AD","AE","AF","AG","AI","AL","AM","AO","AP","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","EU","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW","NULL","NULL"];e(this)};var GLOBE=GLOBE||{};GLOBE.Heatmap=function(t,e,i,n){var r=-t/2,o=t/2,s=e/2,a=-e/2,l=-1e4,h=1e4,c=new THREE.OrthographicCamera(r,o,s,a,l,h);c.position.z=100;var u={heatTexture:{type:"t",value:i},gradientTexture:{type:"t",value:n}},d=["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join("\n"),p=["uniform sampler2D heatTexture;","uniform sampler2D gradientTexture;","varying vec2 vUv;","void main() {","vec4 heatTexel = texture2D(heatTexture, vUv);","if(heatTexel.a == 1.0) {","gl_FragColor = heatTexel;","}","else {","vec2 pos = vec2(1.0 - heatTexel.a, 0.0);","vec3 gradientTexel = texture2D(gradientTexture, pos).rgb;","gl_FragColor = vec4(gradientTexel, 1.0);","}","}"].join("\n"),f=new THREE.PlaneGeometry(t,e);f.dynamic=!0;var m=new THREE.ShaderMaterial({uniforms:u,vertexShader:d,fragmentShader:p}),g=new THREE.Mesh(f,m),v=new THREE.Scene;v.add(g),this.scene=v,this.camera=c};var GLOBE=GLOBE||{};GLOBE.MapMode=0,GLOBE.HeatMode=1,GLOBE.PickMode=2,GLOBE.main=function(t,e,i){function n(e){i=i||{},H=i.modifyMarkerLabel||function(t){return t},D=i.setCountryLabel||function(t,e,i){return"CC: "+t+" Markers: "+e+" of "+i+" total"};var n=t.offsetWidth||window.innerWidth,a=t.offsetHeight||window.innerHeight;R=new GLOBE.Countries,x=new GLOBE.Tooltip;var m=Math.PI/2,v=Number.POSITIVE_INFINITY;w=new GLOBE.Position({currentPos:new THREE.Vector3(1e4,0,0),targetPos:new THREE.Vector3(1e3,1.3*m,.25*m),weights:new THREE.Vector3(.3,.1,.1),lowerLimit:new THREE.Vector3(250,-v,-m),upperLimit:new THREE.Vector3(1e3,v,m)}),r(function(){T=new GLOBE.Renderer(t,S.pickTexture,S.borderTexture,R.texture,S.gradientTexture),T.updateMap(),_=new GLOBE.View(T.mapTexture,S.pickTexture,S.borderTexture,S.markerTexture,S.heatTexture,S.animationTexture,{aspectRatio:n/a,offset:10,radius:200}),M=new GLOBE.Update(function(){var t=_.getMode();_.setMode(GLOBE.PickMode),T.updateColorPicking(_),_.setMode(t)},300),C=new GLOBE.Update(function(){T.updateMap(),_.update()},100),e.reset=b,e.removeMarker=E,e.addMarker=y,e.zoom=u,e.rotate=d,e.toggleView=h,e.resize=c,e.hasMarker=R.hasMarker,t.addEventListener("DOMMouseScroll",l,!1),t.addEventListener("mousewheel",l,!1),t.addEventListener("mousedown",f,!1),t.addEventListener("mousemove",g,!1),t.addEventListener("mouseout",p,!1),window.addEventListener("resize",c,!1),window.addEventListener("beforeunload",o),s()})}function r(t){var i=0,n=function(){i--,console.log(i+" textures left to be loaded ("+new Date+")"),0==i&&t()},r=function(t,e,r){i++;var o=THREE.ImageUtils.loadTexture(t,{},n);return void 0!==e&&(o.minFilter=e),void 0!==r&&(o.magFilter=r),o};S={pickTexture:r(e+"countries_colored.png",THREE.NearestFilter,THREE.NearestFilter),borderTexture:r(e+"borders_oceans_lakes.png",THREE.LinearFilter,THREE.LinearFilter),markerTexture:r(e+"circle.png",THREE.LinearFilter,THREE.LinearFilter),animationTexture:r(e+"animation.png",THREE.LinearFilter,THREE.LinearFilter),heatTexture:r(e+"heat.png",THREE.NearestFilter,THREE.NearestFilter),gradientTexture:r(e+"gradient.png",THREE.NearestFilter,THREE.NearestFilter)}}function o(){for(var t in S)S[t].dispose(),console.log("disposed "+t);T.dispose()}function s(){requestAnimationFrame(s);var t=w.getError();1e-4>t&&t>1e-6&&M.execute(),a()}function a(){var t=w.doStep();_.setCamera(t.x,t.y,t.z),T.renderView(_)}function l(t){return t.preventDefault(),u(t.wheelDeltaY?.7*t.wheelDeltaY:-36*t.detail),!1}function h(){var t=_.getMode();_.setMode(t==GLOBE.HeatMode?GLOBE.MapMode:GLOBE.HeatMode)}function c(){"none"!=t.style.display&&(T.resize(_),M.execute())}function u(t){if(x.hide(),!P){var e=new THREE.Vector3(-t,0,0);w.adjustTarget(e)}}function d(t,e){if(x.hide(),!P){var i=new THREE.Vector3(0,t,e);w.adjustTarget(i)}}function p(){x.hide(),P=!1,document.removeEventListener("mouseup",m,!1),t.style.cursor="auto"}function f(e){P=!0,e.preventDefault(),document.addEventListener("mouseup",m,!1);var i=new THREE.Vector3(0,-e.clientX,e.clientY);w.store(i),t.style.cursor="move",x.hide()}function m(){P=!1,document.removeEventListener("mouseup",m,!1),t.style.cursor="auto"}function g(t){if(P){x.hide();var e=new THREE.Vector3(0,-t.clientX,t.clientY);w.adjustTargetRelative(e,5e-9)}else v(t.clientX,t.clientY,t.pageX,t.pageY),C.execute()}function v(t,e,i,n){var r=T.getPixel(t,e);if(255==r.a){if(0==r.r){var o=(r.r<<16)+(r.g<<8)+r.b,s=H(_.getLabel(o));x.show(s,i,n)}if(r.r>0&&r.r<254){var a=R.getCC(r.r),l=R.getMarkers(r.r),h=R.getAllMarkers(),s=D(a,l,h);T.setPickIndex(r.r),x.show(s,i,n)}}else x.hide(),T.setPickIndex(-1)}function y(t,e,i,n){var r=R.dec,o=_.addMarker(t,e,i,n,r);return R.inc(t),M.execute(),C.execute(),o}function E(t){var e=_.getCC(t);_.removeMarker(t),R.dec(e),M.execute(),C.execute()}function b(){R.reset(),_.reset(),M.execute(),C.execute()}var _,T,x,w,R,S,M,C,H,D,P=!1;n(this)};var GLOBE=GLOBE||{};GLOBE.Map=function(t,e,i,n,r){var o=-t/2,s=t/2,a=e/2,l=-e/2,h=-1e4,c=1e4,u=new THREE.OrthographicCamera(o,s,a,l,h,c);u.position.z=100;var d=new THREE.WebGLRenderTarget(t,e,{format:THREE.RGBFormat});d.magFilter=THREE.LinearFilter,d.minFilter=THREE.LinearFilter;var p={pickTexture:{type:"t",value:i},borderTexture:{type:"t",value:n},mpcTexture:{type:"t",value:r},pickIndex:{type:"f",value:-1},hoverColor:{type:"v3",value:new THREE.Vector3(.8,.8,.9)}},f=["varying vec2 vUv;","void main() {","gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);","vUv = uv;","}"].join("\n"),m=["uniform sampler2D pickTexture;","uniform sampler2D borderTexture;","uniform sampler2D mpcTexture;","uniform float pickIndex;","uniform vec3 hoverColor;","varying vec2 vUv;","const float allowedError = 1.0/1024.0;","void main() {","vec4 pickTexel = texture2D(pickTexture, vUv).rgba;","vec2 pos = vec2(pickTexel.r, 0.0);","vec3 mpcTexel = texture2D(mpcTexture, pos).rgb;","vec3 borderTexel = texture2D(borderTexture, vUv).rgb;","if (pickTexel.a == 0.0)","gl_FragColor = vec4(borderTexel, 1.0);","else if (pickTexel.r < (pickIndex + allowedError) && pickTexel.r > (pickIndex - allowedError))","gl_FragColor = vec4(hoverColor * mpcTexel * borderTexel, 1.0);","else","gl_FragColor = vec4(mpcTexel * borderTexel, 1.0);","}"].join("\n"),g=new THREE.PlaneGeometry(t,e),v=new THREE.ShaderMaterial({uniforms:p,vertexShader:f,fragmentShader:m}),y=new THREE.Mesh(g,v),E=new THREE.Scene;E.add(y),this.scene=E,this.camera=u,this.target=d,this.setPickIndex=function(t){y.material.uniforms.pickIndex.value=t/255}};var GLOBE=GLOBE||{};GLOBE.Renderer=function(t,e,i,n,r){function o(o){var u=t.offsetWidth||window.innerWidth,d=t.offsetHeight||window.innerHeight;f=new THREE.WebGLRenderer,console.log(f.info),f.setSize(u,d),f.setClearColor(16777215,1),t.appendChild(f.domElement),m=f.getContext(),v=new Uint8Array(u*d*4),g=new THREE.WebGLRenderTarget(u,d,{format:THREE.RGBAFormat}),g.generateMipmaps=!1,y=new THREE.WebGLRenderTarget(u,d,{format:THREE.RGBAFormat}),y.minFilter=THREE.LinearFilter,y.magFilter=THREE.LinearFilter,y.generateMipmaps=!1;var _=e.image.width,T=e.image.height;E=new GLOBE.Map(_,T,e,i,n),b=new GLOBE.Heatmap(u,d,y,r),o.mapTexture=E.target,o.renderView=s,o.updateMap=a,o.updateColorPicking=l,o.resize=h,o.getPixel=c,o.setPickIndex=E.setPickIndex,o.dispose=p}function s(t){var e=t.getMode();e==GLOBE.MapMode?f.render(t.scene,t.camera):e==GLOBE.HeatMode&&(f.render(t.scene,t.camera,y),f.render(b.scene,b.camera))}function a(){f.render(E.scene,E.camera,E.target)}function l(e){var i=t.offsetWidth||window.innerWidth,n=t.offsetHeight||window.innerHeight;g.width=i,g.height=n,v=new Uint8Array(i*n*4),f.render(e.scene,e.camera,g),m.readPixels(0,0,i,n,m.RGBA,m.UNSIGNED_BYTE,v)}function h(e){var i=t.offsetWidth||window.innerWidth,n=t.offsetHeight||window.innerHeight;f.setSize(i,n),e.resize(i/n),(y.width!=i||y.height-n!=10)&&(y=new THREE.WebGLRenderTarget(i,n,{format:THREE.RGBAFormat}),y.minFilter=THREE.LinearFilter,y.magFilter=THREE.LinearFilter,y.generateMipmaps=!1,b=new GLOBE.Heatmap(i,n,y,r))}function c(e,i){var n=u(e,i),r=t.offsetWidth||window.innerWidth,o=t.offsetHeight||window.innerHeight,s=4*(n.x+(o-n.y+1)*r);return{r:v[s+0],g:v[s+1],b:v[s+2],a:v[s+3]}}function u(e,i){var n=t.getBoundingClientRect(),r=d(n.left),o=d(n.top);return{x:e-r-1,y:i-o}}function d(t){return 0|t}function p(){g.dispose(),console.log("disposed pickTarget"),y.dispose(),console.log("disposed heatTexture")}var f,m,g,v,y,E,b;o(this)};var GLOBE=GLOBE||{};GLOBE.Update=function(t,e){function i(i){a=t,o=e,s=!1,enqueued=!1,i.execute=n}function n(){s?enqueued=!0:(s=!0,a(),r(!1))}function r(t){setTimeout(function(){t&&a(),enqueued?(enqueued=!1,r(!0)):s=!1},o)}var o,s,a;i(this)};var GLOBE=GLOBE||{};GLOBE.View=function(t,e,i,n,r,o,s){function a(e){s=s||{},R=s.mode||GLOBE.MapMode,S=s.markerScale||1;var i=s.fov||30,a=s.aspectRatio||1,M=s.zNear||1,C=s.zFar||1e4,H=s.distance||1e3;b=s.radius||200,_=s.offset||0,y=new THREE.PerspectiveCamera(i,a,M,C),y.position.z=H,E=new THREE.Scene,T=new GLOBE.Markers(n,r,o,{maxMarker:s.maxMarker,markerSize:s.markerSize}),T.setMode(R),x=new GLOBE.Sphere({radius:s.radius,segments:s.segments,rings:s.rings}),x.setTexture(t),w=new GLOBE.Atmosphere({radius:s.radius,segments:s.segments,rings:s.rings,scale:s.scale}),w.setVisibility(!0),E.add(T.system),E.add(T.animation),E.add(w.mesh),E.add(x.mesh),e.camera=y,e.scene=E,e.addMarker=l,e.removeMarker=h,e.update=c,e.getLabel=u,e.getCC=d,e.setMode=p,e.getMode=f,e.resize=m,e.setCamera=g,e.reset=v}function l(t,e,i,n,r){return T.add(t,e,i-_,b*S,n,r)}function h(t){T.remove(t)}function c(){T.update()}function u(t){return T.getLabel(t)}function d(t){return T.getCC(t)}function p(n){R=n,T.setMode(n),n==GLOBE.PickMode?(w.setVisibility(!1),x.setTexture(e)):n==GLOBE.HeatMode?(w.setVisibility(!0),x.setTexture(i)):(w.setVisibility(!0),x.setTexture(t))}function f(){return R}function m(t){y.aspect=t,y.updateProjectionMatrix()}function g(t,e,i){y.position.x=t*Math.sin(e)*Math.cos(i),y.position.y=t*Math.sin(i),y.position.z=t*Math.cos(e)*Math.cos(i),y.lookAt(M)}function v(){T.reset()}var y,E,b,_,T,x,w,R,S,M=new THREE.Vector3(0,0,0);a(this)};var GLOBE=GLOBE||{};GLOBE.Position=function(t){function e(e){for(t=t||{},u=t.currentPos||b.clone(),d=t.targetPos||b.clone(),p=u.clone(),f=d.clone(),m=t.lowerLimit||T.clone(),g=t.upperLimit||x.clone(),v=t.weights||_.clone(),i=0;i<3;i++){var n=v.getComponent(i);if(0>=n||n>1){console.log("The "+i+"th element of initialWeights is not in the interval (0,1]"),v=_.clone();break}}y=new THREE.Vector3,r(),c(),e.adjustTarget=o,e.store=s,e.adjustTargetRelative=a,e.doStep=l,e.getError=h}function n(){return new THREE.Vector3(1,u.x*u.x,u.x*u.x)}function r(){d.clamp(m,g)}function o(t){var e=n();t.multiply(e),d.add(t),r(),c()}function s(t){f.copy(d),p.copy(t)}function a(t,e){var e=e||1,i=n(),o=new THREE.Vector3;o.subVectors(t,p),o.multiplyScalar(e),o.multiply(i),d.addVectors(f,o),r(),c()}function l(){var t=new THREE.Vector3;return t.multiplyVectors(y,v),u.add(t),c(),u}function h(){return y.length()/(d.length()||1)}function c(){y.subVectors(d,u)}var u,d,p,f,m,g,v,y,E=Number.POSITIVE_INFINITY,b=new THREE.Vector3(0,0,0),_=new THREE.Vector3(1,1,1),T=new THREE.Vector3(-E,-E,-E),x=new THREE.Vector3(E,E,E);e(this)};var GLOBE=GLOBE||{};GLOBE.Markers=function(t,e,n,r){function o(i){r=r||{},b=r.maxMarker||1e4,R=r.maxAnimation||100,1>b&&(b=1),b>16777216&&(b=16777216);var o=r.markerSize||15,a=r.heatSize||10,f=r.animationSize||40,C=r.animationDuration||1,H=r.heatColor||new THREE.Vector4(1,0,0,.95),D=r.circleColor||new THREE.Vector4(.8,0,0,1);m=[b],g=[b],v=[b],T=[R],y=0,x=0;for(var P=new THREE.Geometry,k=0;b>k;k++)m[k]=new THREE.Vector3(M,M,M),P.vertices.push(m[k]),P.colors[k]=new THREE.Color(k);for(var A=new THREE.Geometry,k=0;R>k;k++)T[k]=new THREE.Vector3(M,M,M),A.vertices.push(T[k]);var L={markerTexture:{type:"t",value:t},heatTexture:{type:"t",value:e},mode:{type:"i",value:GLOBE.MapMode},markerSize:{type:"f",value:o},heatSize:{type:"f",value:a},heatColor:{type:"v4",value:H},circleColor:{type:"v4",value:D}},I=["uniform float heatSize;","uniform float markerSize;","uniform float animationSize;","uniform int mode;","varying vec3 vColor;","void main() {","if(mode == 2) {","gl_PointSize = markerSize;","}","else if(mode == 1) {","gl_PointSize = heatSize;","}","else {","gl_PointSize = markerSize;","}","vColor = color;","gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join("\n"),F=["uniform sampler2D markerTexture;","uniform sampler2D heatTexture;","uniform int mode;","uniform vec4 circleColor;","uniform vec4 heatColor;","varying vec3 vColor;","void main() {","if (mode == 2){","gl_FragColor = vec4(vColor, 1.0);","}","else if (mode == 1) {","vec4 heatTexel = texture2D(heatTexture, gl_PointCoord);","gl_FragColor = heatTexel - heatColor;","}","else {","vec4 markerTexel = texture2D(markerTexture, gl_PointCoord);","gl_FragColor = markerTexel * circleColor;","}","}"].join("\n");_=new THREE.ShaderMaterial({uniforms:L,vertexShader:I,fragmentShader:F,transparent:!0,vertexColors:THREE.VertexColors,blending:THREE.NormalBlending,depthWrite:!1});var N={timeout:{type:"f",value:[]}},z={texture:{type:"t",value:n},mode:{type:"i",value:GLOBE.MapMode},time:{type:"f",value:0},animationDuration:{type:"f",value:C},size:{type:"f",value:f},circleColor:{type:"v4",value:D}},B=["uniform float size;","uniform float time;","uniform float animationDuration;","attribute float timeout;","varying float relTime;","void main() {","gl_PointSize = size;","relTime = (timeout - time) / animationDuration;","gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join("\n"),O=["uniform sampler2D texture;","uniform int mode;","uniform vec4 circleColor;","uniform vec4 heatColor;","varying float relTime;","void main() {","if (mode == 0) {","vec4 texel = texture2D(texture, gl_PointCoord);","vec4 ratio = vec4(1.0 , 1.0, 1.0, relTime);","gl_FragColor = texel * circleColor*ratio;","}","else {","gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);","}","}"].join("\n");
  35. S=new THREE.ShaderMaterial({attributes:N,uniforms:z,vertexShader:B,fragmentShader:O,transparent:!0,blending:THREE.NormalBlending,depthWrite:!1}),E=new THREE.ParticleSystem(P,_),w=new THREE.ParticleSystem(A,S),setInterval(function(){S.uniforms.time.value+=.015625},15.625),i.system=E,i.animation=w,i.add=s,i.remove=l,i.update=h,i.setMode=c,i.getLabel=u,i.getCC=d,i.reset=p}function s(t,e,i,n,r,o){a(m[y])&&o(v[y]);var s=f(e,i,n);m[y].set(s.x,s.y,s.z),T[x].set(s.x,s.y,s.z),g[y]=r,v[y]=t,S.attributes.timeout.value[x]=S.uniforms.time.value+1,S.attributes.timeout.needsUpdate=!0,w.geometry.verticesNeedUpdate=!0;var l=y;return y=(y+1)%b,x=(x+1)%R,l}function a(t){return!(t.x==M&&t.y==M&&t.z==M)}function l(t){m[t].set(M,M,M),v[t]=void 0}function h(){E.geometry.verticesNeedUpdate=!0}function c(t){_.uniforms.mode.value=t,S.uniforms.mode.value=t,_.blending=t==GLOBE.HeatMode?THREE.SubtractiveBlending:THREE.NormalBlending}function u(t){return g[t]}function d(t){return v[t]}function p(){for(i=0;i<b;i++)m[i].set(M,M,M),v[i]=void 0}function f(t,e,i){var n=t*Math.PI/180,r=e*Math.PI/180,o=i*Math.cos(r)*Math.cos(n),s=i*Math.sin(n),a=-i*Math.sin(r)*Math.cos(n);return new THREE.Vector3(o,s,a)}var m,g,v,y,E,b,_,T,x,w,R,S,M=Number.POSITIVE_INFINITY;o(this)},function(X,l,n){var L=function(h){var j=function(e){function o(t,e){var i=j.defaults.columns,r=t.aoColumns.length,i=h.extend({},j.models.oColumn,i,{sSortingClass:t.oClasses.sSortable,sSortingClassJUI:t.oClasses.sSortJUI,nTh:e?e:l.createElement("th"),sTitle:i.sTitle?i.sTitle:e?e.innerHTML:"",aDataSort:i.aDataSort?i.aDataSort:[r],mData:i.mData?i.oDefaults:r});t.aoColumns.push(i),t.aoPreSearchCols[r]===n||null===t.aoPreSearchCols[r]?t.aoPreSearchCols[r]=h.extend({},j.models.oSearch):(i=t.aoPreSearchCols[r],i.bRegex===n&&(i.bRegex=!0),i.bSmart===n&&(i.bSmart=!0),i.bCaseInsensitive===n&&(i.bCaseInsensitive=!0)),m(t,r,null)}function m(t,e,i){var r=t.aoColumns[e];i!==n&&null!==i&&(i.mDataProp&&!i.mData&&(i.mData=i.mDataProp),i.sType!==n&&(r.sType=i.sType,r._bAutoType=!1),h.extend(r,i),p(r,i,"sWidth","sWidthOrig"),i.iDataSort!==n&&(r.aDataSort=[i.iDataSort]),p(r,i,"aDataSort"));var o=r.mRender?Q(r.mRender):null,s=Q(r.mData);r.fnGetData=function(t,e){var i=s(t,e);return r.mRender&&e&&""!==e?o(i,e,t):i},r.fnSetData=L(r.mData),t.oFeatures.bSort||(r.bSortable=!1),!r.bSortable||-1==h.inArray("asc",r.asSorting)&&-1==h.inArray("desc",r.asSorting)?(r.sSortingClass=t.oClasses.sSortableNone,r.sSortingClassJUI=""):-1==h.inArray("asc",r.asSorting)&&-1==h.inArray("desc",r.asSorting)?(r.sSortingClass=t.oClasses.sSortable,r.sSortingClassJUI=t.oClasses.sSortJUI):-1!=h.inArray("asc",r.asSorting)&&-1==h.inArray("desc",r.asSorting)?(r.sSortingClass=t.oClasses.sSortableAsc,r.sSortingClassJUI=t.oClasses.sSortJUIAscAllowed):-1==h.inArray("asc",r.asSorting)&&-1!=h.inArray("desc",r.asSorting)&&(r.sSortingClass=t.oClasses.sSortableDesc,r.sSortingClassJUI=t.oClasses.sSortJUIDescAllowed)}function k(t){if(!1===t.oFeatures.bAutoWidth)return!1;da(t);for(var e=0,i=t.aoColumns.length;i>e;e++)t.aoColumns[e].nTh.style.width=t.aoColumns[e].sWidth}function G(t,e){var i=r(t,"bVisible");return"number"==typeof i[e]?i[e]:null}function R(t,e){var i=r(t,"bVisible"),i=h.inArray(e,i);return-1!==i?i:null}function t(t){return r(t,"bVisible").length}function r(t,e){var i=[];return h.map(t.aoColumns,function(t,n){t[e]&&i.push(n)}),i}function B(t){for(var e=j.ext.aTypes,i=e.length,n=0;i>n;n++){var r=e[n](t);if(null!==r)return r}return"string"}function u(t,e){for(var i=e.split(","),n=[],r=0,o=t.aoColumns.length;o>r;r++)for(var s=0;o>s;s++)if(t.aoColumns[r].sName==i[s]){n.push(s);break}return n}function M(t){for(var e="",i=0,n=t.aoColumns.length;n>i;i++)e+=t.aoColumns[i].sName+",";return e.length==n?"":e.slice(0,-1)}function ta(t,e,i,n){var r,s,a,l,c;if(e)for(r=e.length-1;r>=0;r--){var u=e[r].aTargets;for(h.isArray(u)||D(t,1,"aTargets must be an array of targets, not a "+typeof u),s=0,a=u.length;a>s;s++)if("number"==typeof u[s]&&0<=u[s]){for(;t.aoColumns.length<=u[s];)o(t);n(u[s],e[r])}else if("number"==typeof u[s]&&0>u[s])n(t.aoColumns.length+u[s],e[r]);else if("string"==typeof u[s])for(l=0,c=t.aoColumns.length;c>l;l++)("_all"==u[s]||h(t.aoColumns[l].nTh).hasClass(u[s]))&&n(l,e[r])}if(i)for(r=0,t=i.length;t>r;r++)n(r,i[r])}function H(t,e){var i;i=h.isArray(e)?e.slice():h.extend(!0,{},e);var n=t.aoData.length,r=h.extend(!0,{},j.models.oRow);r._aData=i,t.aoData.push(r);for(var o,r=0,s=t.aoColumns.length;s>r;r++)i=t.aoColumns[r],"function"==typeof i.fnRender&&i.bUseRendered&&null!==i.mData?F(t,n,r,S(t,n,r)):F(t,n,r,v(t,n,r)),i._bAutoType&&"string"!=i.sType&&(o=v(t,n,r,"type"),null!==o&&""!==o&&(o=B(o),null===i.sType?i.sType=o:i.sType!=o&&"html"!=i.sType&&(i.sType="string")));return t.aiDisplayMaster.push(n),t.oFeatures.bDeferRender||ea(t,n),n}function ua(t){var e,i,n,r,o,s,a;if(t.bDeferLoading||null===t.sAjaxSource)for(e=t.nTBody.firstChild;e;){if("TR"==e.nodeName.toUpperCase())for(i=t.aoData.length,e._DT_RowIndex=i,t.aoData.push(h.extend(!0,{},j.models.oRow,{nTr:e})),t.aiDisplayMaster.push(i),o=e.firstChild,n=0;o;)s=o.nodeName.toUpperCase(),("TD"==s||"TH"==s)&&(F(t,i,n,h.trim(o.innerHTML)),n++),o=o.nextSibling;e=e.nextSibling}for(r=T(t),n=[],e=0,i=r.length;i>e;e++)for(o=r[e].firstChild;o;)s=o.nodeName.toUpperCase(),("TD"==s||"TH"==s)&&n.push(o),o=o.nextSibling;for(i=0,r=t.aoColumns.length;r>i;i++){a=t.aoColumns[i],null===a.sTitle&&(a.sTitle=a.nTh.innerHTML);var l,c,u=a._bAutoType,d="function"==typeof a.fnRender,p=null!==a.sClass,f=a.bVisible;if(u||d||p||!f)for(s=0,e=t.aoData.length;e>s;s++)o=t.aoData[s],l=n[s*r+i],u&&"string"!=a.sType&&(c=v(t,s,i,"type"),""!==c&&(c=B(c),null===a.sType?a.sType=c:a.sType!=c&&"html"!=a.sType&&(a.sType="string"))),a.mRender?l.innerHTML=v(t,s,i,"display"):a.mData!==i&&(l.innerHTML=v(t,s,i,"display")),d&&(c=S(t,s,i),l.innerHTML=c,a.bUseRendered&&F(t,s,i,c)),p&&(l.className+=" "+a.sClass),f?o._anHidden[i]=null:(o._anHidden[i]=l,l.parentNode.removeChild(l)),a.fnCreatedCell&&a.fnCreatedCell.call(t.oInstance,l,v(t,s,i,"display"),o._aData,s,i)}if(0!==t.aoRowCreatedCallback.length)for(e=0,i=t.aoData.length;i>e;e++)o=t.aoData[e],A(t,"aoRowCreatedCallback",null,[o.nTr,o._aData,e])}function I(t,e){return e._DT_RowIndex!==n?e._DT_RowIndex:null}function fa(t,e,i){for(var e=J(t,e),n=0,t=t.aoColumns.length;t>n;n++)if(e[n]===i)return n;return-1}function Y(t,e,i,n){for(var r=[],o=0,s=n.length;s>o;o++)r.push(v(t,e,n[o],i));return r}function v(t,e,i,r){var o=t.aoColumns[i];if((i=o.fnGetData(t.aoData[e]._aData,r))===n)return t.iDrawError!=t.iDraw&&null===o.sDefaultContent&&(D(t,0,"Requested unknown parameter "+("function"==typeof o.mData?"{mData function}":"'"+o.mData+"'")+" from the data source for row "+e),t.iDrawError=t.iDraw),o.sDefaultContent;if(null===i&&null!==o.sDefaultContent)i=o.sDefaultContent;else if("function"==typeof i)return i();return"display"==r&&null===i?"":i}function F(t,e,i,n){t.aoColumns[i].fnSetData(t.aoData[e]._aData,n)}function Q(t){if(null===t)return function(){return null};if("function"==typeof t)return function(e,i,n){return t(e,i,n)};if("string"==typeof t&&(-1!==t.indexOf(".")||-1!==t.indexOf("["))){var e=function(t,i,r){var o,s=r.split(".");if(""!==r){var a=0;for(o=s.length;o>a;a++){if(r=s[a].match(U)){s[a]=s[a].replace(U,""),""!==s[a]&&(t=t[s[a]]),o=[],s.splice(0,a+1);for(var s=s.join("."),a=0,l=t.length;l>a;a++)o.push(e(t[a],i,s));t=r[0].substring(1,r[0].length-1),t=""===t?o:o.join(t);break}if(null===t||t[s[a]]===n)return n;t=t[s[a]]}}return t};return function(i,n){return e(i,n,t)}}return function(e){return e[t]}}function L(t){if(null===t)return function(){};if("function"==typeof t)return function(e,i){t(e,"set",i)};if("string"==typeof t&&(-1!==t.indexOf(".")||-1!==t.indexOf("["))){var e=function(t,i,r){var o,s,r=r.split("."),a=0;for(s=r.length-1;s>a;a++){if(o=r[a].match(U)){r[a]=r[a].replace(U,""),t[r[a]]=[],o=r.slice(),o.splice(0,a+1),s=o.join(".");for(var l=0,h=i.length;h>l;l++)o={},e(o,i[l],s),t[r[a]].push(o);return}(null===t[r[a]]||t[r[a]]===n)&&(t[r[a]]={}),t=t[r[a]]}t[r[r.length-1].replace(U,"")]=i};return function(i,n){return e(i,n,t)}}return function(e,i){e[t]=i}}function Z(t){for(var e=[],i=t.aoData.length,n=0;i>n;n++)e.push(t.aoData[n]._aData);return e}function ga(t){t.aoData.splice(0,t.aoData.length),t.aiDisplayMaster.splice(0,t.aiDisplayMaster.length),t.aiDisplay.splice(0,t.aiDisplay.length),y(t)}function ha(t,e){for(var i=-1,n=0,r=t.length;r>n;n++)t[n]==e?i=n:t[n]>e&&t[n]--;-1!=i&&t.splice(i,1)}function S(t,e,i){var n=t.aoColumns[i];return n.fnRender({iDataRow:e,iDataColumn:i,oSettings:t,aData:t.aoData[e]._aData,mDataProp:n.mData},v(t,e,i,"display"))}function ea(t,e){var i,n=t.aoData[e];if(null===n.nTr){n.nTr=l.createElement("tr"),n.nTr._DT_RowIndex=e,n._aData.DT_RowId&&(n.nTr.id=n._aData.DT_RowId),n._aData.DT_RowClass&&(n.nTr.className=n._aData.DT_RowClass);for(var r=0,o=t.aoColumns.length;o>r;r++){var s=t.aoColumns[r];i=l.createElement(s.sCellType),i.innerHTML="function"!=typeof s.fnRender||s.bUseRendered&&null!==s.mData?v(t,e,r,"display"):S(t,e,r),null!==s.sClass&&(i.className=s.sClass),s.bVisible?(n.nTr.appendChild(i),n._anHidden[r]=null):n._anHidden[r]=i,s.fnCreatedCell&&s.fnCreatedCell.call(t.oInstance,i,v(t,e,r,"display"),n._aData,e,r)}A(t,"aoRowCreatedCallback",null,[n.nTr,n._aData,e])}}function va(t){var e,i,n;if(0!==h("th, td",t.nTHead).length)for(e=0,n=t.aoColumns.length;n>e;e++)i=t.aoColumns[e].nTh,i.setAttribute("role","columnheader"),t.aoColumns[e].bSortable&&(i.setAttribute("tabindex",t.iTabIndex),i.setAttribute("aria-controls",t.sTableId)),null!==t.aoColumns[e].sClass&&h(i).addClass(t.aoColumns[e].sClass),t.aoColumns[e].sTitle!=i.innerHTML&&(i.innerHTML=t.aoColumns[e].sTitle);else{var r=l.createElement("tr");for(e=0,n=t.aoColumns.length;n>e;e++)i=t.aoColumns[e].nTh,i.innerHTML=t.aoColumns[e].sTitle,i.setAttribute("tabindex","0"),null!==t.aoColumns[e].sClass&&h(i).addClass(t.aoColumns[e].sClass),r.appendChild(i);h(t.nTHead).html("")[0].appendChild(r),V(t.aoHeader,t.nTHead)}if(h(t.nTHead).children("tr").attr("role","row"),t.bJUI)for(e=0,n=t.aoColumns.length;n>e;e++){i=t.aoColumns[e].nTh,r=l.createElement("div"),r.className=t.oClasses.sSortJUIWrapper,h(i).contents().appendTo(r);var o=l.createElement("span");o.className=t.oClasses.sSortIcon,r.appendChild(o),i.appendChild(r)}if(t.oFeatures.bSort)for(e=0;e<t.aoColumns.length;e++)!1!==t.aoColumns[e].bSortable?ia(t,t.aoColumns[e].nTh,e):h(t.aoColumns[e].nTh).addClass(t.oClasses.sSortableNone);if(""!==t.oClasses.sFooterTH&&h(t.nTFoot).children("tr").children("th").addClass(t.oClasses.sFooterTH),null!==t.nTFoot)for(i=N(t,null,t.aoFooter),e=0,n=t.aoColumns.length;n>e;e++)i[e]&&(t.aoColumns[e].nTf=i[e],t.aoColumns[e].sClass&&h(i[e]).addClass(t.aoColumns[e].sClass))}function W(t,e,i){var r,o,s,a,l=[],h=[],c=t.aoColumns.length;for(i===n&&(i=!1),r=0,o=e.length;o>r;r++){for(l[r]=e[r].slice(),l[r].nTr=e[r].nTr,s=c-1;s>=0;s--)!t.aoColumns[s].bVisible&&!i&&l[r].splice(s,1);h.push([])}for(r=0,o=l.length;o>r;r++){if(t=l[r].nTr)for(;s=t.firstChild;)t.removeChild(s);for(s=0,e=l[r].length;e>s;s++)if(a=c=1,h[r][s]===n){for(t.appendChild(l[r][s].cell),h[r][s]=1;l[r+c]!==n&&l[r][s].cell==l[r+c][s].cell;)h[r+c][s]=1,c++;for(;l[r][s+a]!==n&&l[r][s].cell==l[r][s+a].cell;){for(i=0;c>i;i++)h[r+i][s+a]=1;a++}l[r][s].cell.rowSpan=c,l[r][s].cell.colSpan=a}}}function x(e){var i=A(e,"aoPreDrawCallback","preDraw",[e]);if(-1!==h.inArray(!1,i))E(e,!1);else{var r,o,i=[],s=0,a=e.asStripeClasses.length;if(r=e.aoOpenRows.length,e.bDrawing=!0,e.iInitDisplayStart!==n&&-1!=e.iInitDisplayStart&&(e._iDisplayStart=e.oFeatures.bServerSide?e.iInitDisplayStart:e.iInitDisplayStart>=e.fnRecordsDisplay()?0:e.iInitDisplayStart,e.iInitDisplayStart=-1,y(e)),e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++;else if(e.oFeatures.bServerSide){if(!e.bDestroying&&!wa(e))return}else e.iDraw++;if(0!==e.aiDisplay.length){var c=e._iDisplayStart;for(o=e._iDisplayEnd,e.oFeatures.bServerSide&&(c=0,o=e.aoData.length);o>c;c++){var u=e.aoData[e.aiDisplay[c]];null===u.nTr&&ea(e,e.aiDisplay[c]);var d=u.nTr;if(0!==a){var p=e.asStripeClasses[s%a];u._sRowStripe!=p&&(h(d).removeClass(u._sRowStripe).addClass(p),u._sRowStripe=p)}if(A(e,"aoRowCallback",null,[d,e.aoData[e.aiDisplay[c]]._aData,s,c]),i.push(d),s++,0!==r)for(u=0;r>u;u++)if(d==e.aoOpenRows[u].nParent){i.push(e.aoOpenRows[u].nTr);break}}}else i[0]=l.createElement("tr"),e.asStripeClasses[0]&&(i[0].className=e.asStripeClasses[0]),r=e.oLanguage,a=r.sZeroRecords,1!=e.iDraw||null===e.sAjaxSource||e.oFeatures.bServerSide?r.sEmptyTable&&0===e.fnRecordsTotal()&&(a=r.sEmptyTable):a=r.sLoadingRecords,r=l.createElement("td"),r.setAttribute("valign","top"),r.colSpan=t(e),r.className=e.oClasses.sRowEmpty,r.innerHTML=ja(e,a),i[s].appendChild(r);if(A(e,"aoHeaderCallback","header",[h(e.nTHead).children("tr")[0],Z(e),e._iDisplayStart,e.fnDisplayEnd(),e.aiDisplay]),A(e,"aoFooterCallback","footer",[h(e.nTFoot).children("tr")[0],Z(e),e._iDisplayStart,e.fnDisplayEnd(),e.aiDisplay]),s=l.createDocumentFragment(),r=l.createDocumentFragment(),e.nTBody){if(a=e.nTBody.parentNode,r.appendChild(e.nTBody),!e.oScroll.bInfinite||!e._bInitComplete||e.bSorted||e.bFiltered)for(;r=e.nTBody.firstChild;)e.nTBody.removeChild(r);for(r=0,o=i.length;o>r;r++)s.appendChild(i[r]);e.nTBody.appendChild(s),null!==a&&a.appendChild(e.nTBody)}A(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1,e.oFeatures.bServerSide&&(E(e,!1),e._bInitComplete||$(e))}}function aa(t){t.oFeatures.bSort?O(t,t.oPreviousSearch):t.oFeatures.bFilter?K(t,t.oPreviousSearch):(y(t),x(t))}function xa(t){var e=h("<div></div>")[0];t.nTable.parentNode.insertBefore(e,t.nTable),t.nTableWrapper=h('<div id="'+t.sTableId+'_wrapper" class="'+t.oClasses.sWrapper+'" role="grid"></div>')[0],t.nTableReinsertBefore=t.nTable.nextSibling;for(var i,n,r,o,s,a,l,c=t.nTableWrapper,u=t.sDom.split(""),d=0;d<u.length;d++){if(n=0,r=u[d],"<"==r){if(o=h("<div></div>")[0],s=u[d+1],"'"==s||'"'==s){for(a="",l=2;u[d+l]!=s;)a+=u[d+l],l++;"H"==a?a=t.oClasses.sJUIHeader:"F"==a&&(a=t.oClasses.sJUIFooter),-1!=a.indexOf(".")?(s=a.split("."),o.id=s[0].substr(1,s[0].length-1),o.className=s[1]):"#"==a.charAt(0)?o.id=a.substr(1,a.length-1):o.className=a,d+=l}c.appendChild(o),c=o}else if(">"==r)c=c.parentNode;else if("l"==r&&t.oFeatures.bPaginate&&t.oFeatures.bLengthChange)i=ya(t),n=1;else if("f"==r&&t.oFeatures.bFilter)i=za(t),n=1;else if("r"==r&&t.oFeatures.bProcessing)i=Aa(t),n=1;else if("t"==r)i=Ba(t),n=1;else if("i"==r&&t.oFeatures.bInfo)i=Ca(t),n=1;else if("p"==r&&t.oFeatures.bPaginate)i=Da(t),n=1;else if(0!==j.ext.aoFeatures.length)for(o=j.ext.aoFeatures,l=0,s=o.length;s>l;l++)if(r==o[l].cFeature){(i=o[l].fnInit(t))&&(n=1);break}1==n&&null!==i&&("object"!=typeof t.aanFeatures[r]&&(t.aanFeatures[r]=[]),t.aanFeatures[r].push(i),c.appendChild(i))}e.parentNode.replaceChild(t.nTableWrapper,e)}function V(t,e){var i,n,r,o,s,a,l,c,u,d,p=h(e).children("tr");for(t.splice(0,t.length),r=0,a=p.length;a>r;r++)t.push([]);for(r=0,a=p.length;a>r;r++)for(i=p[r],n=i.firstChild;n;){if("TD"==n.nodeName.toUpperCase()||"TH"==n.nodeName.toUpperCase()){for(c=1*n.getAttribute("colspan"),u=1*n.getAttribute("rowspan"),c=c&&0!==c&&1!==c?c:1,u=u&&0!==u&&1!==u?u:1,o=0,s=t[r];s[o];)o++;for(l=o,d=1===c?!0:!1,s=0;c>s;s++)for(o=0;u>o;o++)t[r+o][l+s]={cell:n,unique:d},t[r+o].nTr=i}n=n.nextSibling}}function N(t,e,i){var n=[];i||(i=t.aoHeader,e&&(i=[],V(i,e)));for(var e=0,r=i.length;r>e;e++)for(var o=0,s=i[e].length;s>o;o++)!i[e][o].unique||n[o]&&t.bSortCellsTop||(n[o]=i[e][o].cell);return n}function wa(t){if(t.bAjaxDataGet){t.iDraw++,E(t,!0);var e=Ea(t);return ka(t,e),t.fnServerData.call(t.oInstance,t.sAjaxSource,e,function(e){Fa(t,e)},t),!1}return!0}function Ea(t){var e,i,n,r,o=t.aoColumns.length,s=[];for(s.push({name:"sEcho",value:t.iDraw}),s.push({name:"iColumns",value:o}),s.push({name:"sColumns",value:M(t)}),s.push({name:"iDisplayStart",value:t._iDisplayStart}),s.push({name:"iDisplayLength",value:!1!==t.oFeatures.bPaginate?t._iDisplayLength:-1}),n=0;o>n;n++)e=t.aoColumns[n].mData,s.push({name:"mDataProp_"+n,value:"function"==typeof e?"function":e});if(!1!==t.oFeatures.bFilter)for(s.push({name:"sSearch",value:t.oPreviousSearch.sSearch}),s.push({name:"bRegex",value:t.oPreviousSearch.bRegex}),n=0;o>n;n++)s.push({name:"sSearch_"+n,value:t.aoPreSearchCols[n].sSearch}),s.push({name:"bRegex_"+n,value:t.aoPreSearchCols[n].bRegex}),s.push({name:"bSearchable_"+n,value:t.aoColumns[n].bSearchable});if(!1!==t.oFeatures.bSort){var a=0;for(e=null!==t.aaSortingFixed?t.aaSortingFixed.concat(t.aaSorting):t.aaSorting.slice(),n=0;n<e.length;n++)for(i=t.aoColumns[e[n][0]].aDataSort,r=0;r<i.length;r++)s.push({name:"iSortCol_"+a,value:i[r]}),s.push({name:"sSortDir_"+a,value:e[n][1]}),a++;for(s.push({name:"iSortingCols",value:a}),n=0;o>n;n++)s.push({name:"bSortable_"+n,value:t.aoColumns[n].bSortable})}return s}function ka(t,e){A(t,"aoServerParams","serverParams",[e])}function Fa(t,e){if(e.sEcho!==n){if(1*e.sEcho<t.iDraw)return;t.iDraw=1*e.sEcho}(!t.oScroll.bInfinite||t.oScroll.bInfinite&&(t.bSorted||t.bFiltered))&&ga(t),t._iRecordsTotal=parseInt(e.iTotalRecords,10),t._iRecordsDisplay=parseInt(e.iTotalDisplayRecords,10);var i,r=M(t),r=e.sColumns!==n&&""!==r&&e.sColumns!=r;r&&(i=u(t,e.sColumns));for(var o=Q(t.sAjaxDataProp)(e),s=0,a=o.length;a>s;s++)if(r){for(var l=[],h=0,c=t.aoColumns.length;c>h;h++)l.push(o[s][i[h]]);H(t,l)}else H(t,o[s]);t.aiDisplay=t.aiDisplayMaster.slice(),t.bAjaxDataGet=!1,x(t),t.bAjaxDataGet=!0,E(t,!1)}function za(t){var e=t.oPreviousSearch,i=t.oLanguage.sSearch,i=-1!==i.indexOf("_INPUT_")?i.replace("_INPUT_",'<input type="text" />'):""===i?'<input type="text" />':i+' <input type="text" />',n=l.createElement("div");return n.className=t.oClasses.sFilter,n.innerHTML="<label>"+i+"</label>",t.aanFeatures.f||(n.id=t.sTableId+"_filter"),i=h('input[type="text"]',n),n._DT_Input=i[0],i.val(e.sSearch.replace('"',"&quot;")),i.bind("keyup.DT",function(){for(var i=t.aanFeatures.f,n=""===this.value?"":this.value,r=0,o=i.length;o>r;r++)i[r]!=h(this).parents("div.dataTables_filter")[0]&&h(i[r]._DT_Input).val(n);n!=e.sSearch&&K(t,{sSearch:n,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive})}),i.attr("aria-controls",t.sTableId).bind("keypress.DT",function(t){return 13==t.keyCode?!1:void 0}),n}function K(t,e,i){var n=t.oPreviousSearch,r=t.aoPreSearchCols,o=function(t){n.sSearch=t.sSearch,n.bRegex=t.bRegex,n.bSmart=t.bSmart,n.bCaseInsensitive=t.bCaseInsensitive};if(t.oFeatures.bServerSide)o(e);else{for(Ga(t,e.sSearch,i,e.bRegex,e.bSmart,e.bCaseInsensitive),o(e),e=0;e<t.aoPreSearchCols.length;e++)Ha(t,r[e].sSearch,e,r[e].bRegex,r[e].bSmart,r[e].bCaseInsensitive);Ia(t)}t.bFiltered=!0,h(t.oInstance).trigger("filter",t),t._iDisplayStart=0,y(t),x(t),la(t,0)}function Ia(t){for(var e=j.ext.afnFiltering,i=r(t,"bSearchable"),n=0,o=e.length;o>n;n++)for(var s=0,a=0,l=t.aiDisplay.length;l>a;a++){var h=t.aiDisplay[a-s];e[n](t,Y(t,h,"filter",i),h)||(t.aiDisplay.splice(a-s,1),s++)}}function Ha(t,e,i,n,r,o){if(""!==e)for(var s=0,e=ma(e,n,r,o),n=t.aiDisplay.length-1;n>=0;n--)r=Ja(v(t,t.aiDisplay[n],i,"filter"),t.aoColumns[i].sType),e.test(r)||(t.aiDisplay.splice(n,1),s++)}function Ga(t,e,i,n,r,o){if(n=ma(e,n,r,o),r=t.oPreviousSearch,i||(i=0),0!==j.ext.afnFiltering.length&&(i=1),0>=e.length)t.aiDisplay.splice(0,t.aiDisplay.length),t.aiDisplay=t.aiDisplayMaster.slice();else if(t.aiDisplay.length==t.aiDisplayMaster.length||r.sSearch.length>e.length||1==i||0!==e.indexOf(r.sSearch))for(t.aiDisplay.splice(0,t.aiDisplay.length),la(t,1),e=0;e<t.aiDisplayMaster.length;e++)n.test(t.asDataSearch[e])&&t.aiDisplay.push(t.aiDisplayMaster[e]);else for(e=i=0;e<t.asDataSearch.length;e++)n.test(t.asDataSearch[e])||(t.aiDisplay.splice(e-i,1),i++)}function la(t,e){if(!t.oFeatures.bServerSide){t.asDataSearch=[];for(var i=r(t,"bSearchable"),n=1===e?t.aiDisplayMaster:t.aiDisplay,o=0,s=n.length;s>o;o++)t.asDataSearch[o]=na(t,Y(t,n[o],"filter",i))}}function na(t,e){var i=e.join(" ");return-1!==i.indexOf("&")&&(i=h("<div>").html(i).text()),i.replace(/[\n\r]/g," ")}function ma(t,e,i,n){return i?(t=e?t.split(" "):oa(t).split(" "),t="^(?=.*?"+t.join(")(?=.*?")+").*$",RegExp(t,n?"i":"")):(t=e?t:oa(t),RegExp(t,n?"i":""))}function Ja(t,e){return"function"==typeof j.ext.ofnSearch[e]?j.ext.ofnSearch[e](t):null===t?"":"html"==e?t.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"==typeof t?t.replace(/[\r\n]/g," "):t}function oa(t){return t.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),"\\$1")}function Ca(t){var e=l.createElement("div");return e.className=t.oClasses.sInfo,t.aanFeatures.i||(t.aoDrawCallback.push({fn:Ka,sName:"information"}),e.id=t.sTableId+"_info"),t.nTable.setAttribute("aria-describedby",t.sTableId+"_info"),e}function Ka(t){if(t.oFeatures.bInfo&&0!==t.aanFeatures.i.length){var e,i=t.oLanguage,n=t._iDisplayStart+1,r=t.fnDisplayEnd(),o=t.fnRecordsTotal(),s=t.fnRecordsDisplay();for(e=0===s?i.sInfoEmpty:i.sInfo,s!=o&&(e+=" "+i.sInfoFiltered),e+=i.sInfoPostFix,e=ja(t,e),null!==i.fnInfoCallback&&(e=i.fnInfoCallback.call(t.oInstance,t,n,r,o,s,e)),t=t.aanFeatures.i,i=0,n=t.length;n>i;i++)h(t[i]).html(e)}}function ja(t,e){var i=t.fnFormatNumber(t._iDisplayStart+1),n=t.fnDisplayEnd(),n=t.fnFormatNumber(n),r=t.fnRecordsDisplay(),r=t.fnFormatNumber(r),o=t.fnRecordsTotal(),o=t.fnFormatNumber(o);return t.oScroll.bInfinite&&(i=t.fnFormatNumber(1)),e.replace(/_START_/g,i).replace(/_END_/g,n).replace(/_TOTAL_/g,r).replace(/_MAX_/g,o)}function ba(t){var e,i,n=t.iInitDisplayStart;if(!1===t.bInitialised)setTimeout(function(){ba(t)},200);else{for(xa(t),va(t),W(t,t.aoHeader),t.nTFoot&&W(t,t.aoFooter),E(t,!0),t.oFeatures.bAutoWidth&&da(t),e=0,i=t.aoColumns.length;i>e;e++)null!==t.aoColumns[e].sWidth&&(t.aoColumns[e].nTh.style.width=q(t.aoColumns[e].sWidth));t.oFeatures.bSort?O(t):t.oFeatures.bFilter?K(t,t.oPreviousSearch):(t.aiDisplay=t.aiDisplayMaster.slice(),y(t),x(t)),null===t.sAjaxSource||t.oFeatures.bServerSide?t.oFeatures.bServerSide||(E(t,!1),$(t)):(i=[],ka(t,i),t.fnServerData.call(t.oInstance,t.sAjaxSource,i,function(i){var r=""!==t.sAjaxDataProp?Q(t.sAjaxDataProp)(i):i;for(e=0;e<r.length;e++)H(t,r[e]);t.iInitDisplayStart=n,t.oFeatures.bSort?O(t):(t.aiDisplay=t.aiDisplayMaster.slice(),y(t),x(t)),E(t,!1),$(t,i)},t))}}function $(t,e){t._bInitComplete=!0,A(t,"aoInitComplete","init",[t,e])}function pa(t){var e=j.defaults.oLanguage;!t.sEmptyTable&&t.sZeroRecords&&"No data available in table"===e.sEmptyTable&&p(t,t,"sZeroRecords","sEmptyTable"),!t.sLoadingRecords&&t.sZeroRecords&&"Loading..."===e.sLoadingRecords&&p(t,t,"sZeroRecords","sLoadingRecords")}function ya(t){if(t.oScroll.bInfinite)return null;var e,i,n='<select size="1" '+('name="'+t.sTableId+'_length"')+">",r=t.aLengthMenu;if(2==r.length&&"object"==typeof r[0]&&"object"==typeof r[1])for(e=0,i=r[0].length;i>e;e++)n+='<option value="'+r[0][e]+'">'+r[1][e]+"</option>";else for(e=0,i=r.length;i>e;e++)n+='<option value="'+r[e]+'">'+r[e]+"</option>";return n+="</select>",r=l.createElement("div"),t.aanFeatures.l||(r.id=t.sTableId+"_length"),r.className=t.oClasses.sLength,r.innerHTML="<label>"+t.oLanguage.sLengthMenu.replace("_MENU_",n)+"</label>",h('select option[value="'+t._iDisplayLength+'"]',r).attr("selected",!0),h("select",r).bind("change.DT",function(){var n=h(this).val(),r=t.aanFeatures.l;for(e=0,i=r.length;i>e;e++)r[e]!=this.parentNode&&h("select",r[e]).val(n);t._iDisplayLength=parseInt(n,10),y(t),t.fnDisplayEnd()==t.fnRecordsDisplay()&&(t._iDisplayStart=t.fnDisplayEnd()-t._iDisplayLength,t._iDisplayStart<0&&(t._iDisplayStart=0)),-1==t._iDisplayLength&&(t._iDisplayStart=0),x(t)}),h("select",r).attr("aria-controls",t.sTableId),r}function y(t){t._iDisplayEnd=!1===t.oFeatures.bPaginate?t.aiDisplay.length:t._iDisplayStart+t._iDisplayLength>t.aiDisplay.length||-1==t._iDisplayLength?t.aiDisplay.length:t._iDisplayStart+t._iDisplayLength}function Da(t){if(t.oScroll.bInfinite)return null;var e=l.createElement("div");return e.className=t.oClasses.sPaging+t.sPaginationType,j.ext.oPagination[t.sPaginationType].fnInit(t,e,function(t){y(t),x(t)}),t.aanFeatures.p||t.aoDrawCallback.push({fn:function(t){j.ext.oPagination[t.sPaginationType].fnUpdate(t,function(t){y(t),x(t)})},sName:"pagination"}),e}function qa(t,e){var i=t._iDisplayStart;if("number"==typeof e)t._iDisplayStart=e*t._iDisplayLength,t._iDisplayStart>t.fnRecordsDisplay()&&(t._iDisplayStart=0);else if("first"==e)t._iDisplayStart=0;else if("previous"==e)t._iDisplayStart=0<=t._iDisplayLength?t._iDisplayStart-t._iDisplayLength:0,0>t._iDisplayStart&&(t._iDisplayStart=0);else if("next"==e)0<=t._iDisplayLength?t._iDisplayStart+t._iDisplayLength<t.fnRecordsDisplay()&&(t._iDisplayStart+=t._iDisplayLength):t._iDisplayStart=0;else if("last"==e)if(0<=t._iDisplayLength){var n=parseInt((t.fnRecordsDisplay()-1)/t._iDisplayLength,10)+1;t._iDisplayStart=(n-1)*t._iDisplayLength}else t._iDisplayStart=0;else D(t,0,"Unknown paging action: "+e);return h(t.oInstance).trigger("page",t),i!=t._iDisplayStart}function Aa(t){var e=l.createElement("div");return t.aanFeatures.r||(e.id=t.sTableId+"_processing"),e.innerHTML=t.oLanguage.sProcessing,e.className=t.oClasses.sProcessing,t.nTable.parentNode.insertBefore(e,t.nTable),e}function E(t,e){if(t.oFeatures.bProcessing)for(var i=t.aanFeatures.r,n=0,r=i.length;r>n;n++)i[n].style.visibility=e?"visible":"hidden";h(t.oInstance).trigger("processing",[t,e])}function Ba(t){if(""===t.oScroll.sX&&""===t.oScroll.sY)return t.nTable;var e=l.createElement("div"),i=l.createElement("div"),n=l.createElement("div"),r=l.createElement("div"),o=l.createElement("div"),s=l.createElement("div"),a=t.nTable.cloneNode(!1),c=t.nTable.cloneNode(!1),u=t.nTable.getElementsByTagName("thead")[0],d=0===t.nTable.getElementsByTagName("tfoot").length?null:t.nTable.getElementsByTagName("tfoot")[0],p=t.oClasses;return i.appendChild(n),o.appendChild(s),r.appendChild(t.nTable),e.appendChild(i),e.appendChild(r),n.appendChild(a),a.appendChild(u),null!==d&&(e.appendChild(o),s.appendChild(c),c.appendChild(d)),e.className=p.sScrollWrapper,i.className=p.sScrollHead,n.className=p.sScrollHeadInner,r.className=p.sScrollBody,o.className=p.sScrollFoot,s.className=p.sScrollFootInner,t.oScroll.bAutoCss&&(i.style.overflow="hidden",i.style.position="relative",o.style.overflow="hidden",r.style.overflow="auto"),i.style.border="0",i.style.width="100%",o.style.border="0",n.style.width=""!==t.oScroll.sXInner?t.oScroll.sXInner:"100%",a.removeAttribute("id"),a.style.marginLeft="0",t.nTable.style.marginLeft="0",null!==d&&(c.removeAttribute("id"),c.style.marginLeft="0"),n=h(t.nTable).children("caption"),0<n.length&&(n=n[0],"top"===n._captionSide?a.appendChild(n):"bottom"===n._captionSide&&d&&c.appendChild(n)),""!==t.oScroll.sX&&(i.style.width=q(t.oScroll.sX),r.style.width=q(t.oScroll.sX),null!==d&&(o.style.width=q(t.oScroll.sX)),h(r).scroll(function(){i.scrollLeft=this.scrollLeft,null!==d&&(o.scrollLeft=this.scrollLeft)})),""!==t.oScroll.sY&&(r.style.height=q(t.oScroll.sY)),t.aoDrawCallback.push({fn:La,sName:"scrolling"}),t.oScroll.bInfinite&&h(r).scroll(function(){!t.bDrawing&&0!==h(this).scrollTop()&&h(this).scrollTop()+h(this).height()>h(t.nTable).height()-t.oScroll.iLoadGap&&t.fnDisplayEnd()<t.fnRecordsDisplay()&&(qa(t,"next"),y(t),x(t))}),t.nScrollHead=i,t.nScrollFoot=o,e}function La(t){var e,i,n,r,o,s,a,l,c=t.nScrollHead.getElementsByTagName("div")[0],u=c.getElementsByTagName("table")[0],d=t.nTable.parentNode,p=[],f=[],m=null!==t.nTFoot?t.nScrollFoot.getElementsByTagName("div")[0]:null,g=null!==t.nTFoot?m.getElementsByTagName("table")[0]:null,v=t.oBrowser.bScrollOversize,y=function(t){a=t.style,a.paddingTop="0",a.paddingBottom="0",a.borderTopWidth="0",a.borderBottomWidth="0",a.height=0};h(t.nTable).children("thead, tfoot").remove(),e=h(t.nTHead).clone()[0],t.nTable.insertBefore(e,t.nTable.childNodes[0]),n=t.nTHead.getElementsByTagName("tr"),r=e.getElementsByTagName("tr"),null!==t.nTFoot&&(o=h(t.nTFoot).clone()[0],t.nTable.insertBefore(o,t.nTable.childNodes[1]),s=t.nTFoot.getElementsByTagName("tr"),o=o.getElementsByTagName("tr")),""===t.oScroll.sX&&(d.style.width="100%",c.parentNode.style.width="100%");var E=N(t,e);for(e=0,i=E.length;i>e;e++)l=G(t,e),E[e].style.width=t.aoColumns[l].sWidth;null!==t.nTFoot&&C(function(t){t.style.width=""},o),t.oScroll.bCollapse&&""!==t.oScroll.sY&&(d.style.height=d.offsetHeight+t.nTHead.offsetHeight+"px"),e=h(t.nTable).outerWidth(),""===t.oScroll.sX?(t.nTable.style.width="100%",v&&(h("tbody",d).height()>d.offsetHeight||"scroll"==h(d).css("overflow-y"))&&(t.nTable.style.width=q(h(t.nTable).outerWidth()-t.oScroll.iBarWidth))):""!==t.oScroll.sXInner?t.nTable.style.width=q(t.oScroll.sXInner):e==h(d).width()&&h(d).height()<h(t.nTable).height()?(t.nTable.style.width=q(e-t.oScroll.iBarWidth),h(t.nTable).outerWidth()>e-t.oScroll.iBarWidth&&(t.nTable.style.width=q(e))):t.nTable.style.width=q(e),e=h(t.nTable).outerWidth(),C(y,r),C(function(t){p.push(q(h(t).width()))},r),C(function(t,e){t.style.width=p[e]},n),h(r).height(0),null!==t.nTFoot&&(C(y,o),C(function(t){f.push(q(h(t).width()))},o),C(function(t,e){t.style.width=f[e]},s),h(o).height(0)),C(function(t,e){t.innerHTML="",t.style.width=p[e]},r),null!==t.nTFoot&&C(function(t,e){t.innerHTML="",t.style.width=f[e]},o),h(t.nTable).outerWidth()<e?(n=d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")?e+t.oScroll.iBarWidth:e,v&&(d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y"))&&(t.nTable.style.width=q(n-t.oScroll.iBarWidth)),d.style.width=q(n),t.nScrollHead.style.width=q(n),null!==t.nTFoot&&(t.nScrollFoot.style.width=q(n)),""===t.oScroll.sX?D(t,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):""!==t.oScroll.sXInner&&D(t,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")):(d.style.width=q("100%"),t.nScrollHead.style.width=q("100%"),null!==t.nTFoot&&(t.nScrollFoot.style.width=q("100%"))),""===t.oScroll.sY&&v&&(d.style.height=q(t.nTable.offsetHeight+t.oScroll.iBarWidth)),""!==t.oScroll.sY&&t.oScroll.bCollapse&&(d.style.height=q(t.oScroll.sY),v=""!==t.oScroll.sX&&t.nTable.offsetWidth>d.offsetWidth?t.oScroll.iBarWidth:0,t.nTable.offsetHeight<d.offsetHeight&&(d.style.height=q(t.nTable.offsetHeight+v))),v=h(t.nTable).outerWidth(),u.style.width=q(v),c.style.width=q(v),u=h(t.nTable).height()>d.clientHeight||"scroll"==h(d).css("overflow-y"),c.style.paddingRight=u?t.oScroll.iBarWidth+"px":"0px",null!==t.nTFoot&&(g.style.width=q(v),m.style.width=q(v),m.style.paddingRight=u?t.oScroll.iBarWidth+"px":"0px"),h(d).scroll(),(t.bSorted||t.bFiltered)&&(d.scrollTop=0)}function C(t,e,i){for(var n,r,o=0,s=0,a=e.length;a>s;){for(n=e[s].firstChild,r=i?i[s].firstChild:null;n;)1===n.nodeType&&(i?t(n,r,o):t(n,o),o++),n=n.nextSibling,r=i?r.nextSibling:null;s++}}function Ma(t,e){if(!t||null===t||""===t)return 0;e||(e=l.body);var i,n=l.createElement("div");return n.style.width=q(t),e.appendChild(n),i=n.offsetWidth,e.removeChild(n),i}function da(t){var e,i,n,r=0,o=0,s=t.aoColumns.length,a=h("th",t.nTHead),c=t.nTable.getAttribute("width");for(n=t.nTable.parentNode,i=0;s>i;i++)t.aoColumns[i].bVisible&&(o++,null!==t.aoColumns[i].sWidth&&(e=Ma(t.aoColumns[i].sWidthOrig,n),null!==e&&(t.aoColumns[i].sWidth=q(e)),r++));if(s==a.length&&0===r&&o==s&&""===t.oScroll.sX&&""===t.oScroll.sY)for(i=0;i<t.aoColumns.length;i++)e=h(a[i]).width(),null!==e&&(t.aoColumns[i].sWidth=q(e));else{for(r=t.nTable.cloneNode(!1),i=t.nTHead.cloneNode(!0),o=l.createElement("tbody"),e=l.createElement("tr"),r.removeAttribute("id"),r.appendChild(i),null!==t.nTFoot&&(r.appendChild(t.nTFoot.cloneNode(!0)),C(function(t){t.style.width=""},r.getElementsByTagName("tr"))),r.appendChild(o),o.appendChild(e),o=h("thead th",r),0===o.length&&(o=h("tbody tr:eq(0)>td",r)),a=N(t,i),i=o=0;s>i;i++){var u=t.aoColumns[i];u.bVisible&&null!==u.sWidthOrig&&""!==u.sWidthOrig?a[i-o].style.width=q(u.sWidthOrig):u.bVisible?a[i-o].style.width="":o++
  36. }for(i=0;s>i;i++)t.aoColumns[i].bVisible&&(o=Na(t,i),null!==o&&(o=o.cloneNode(!0),""!==t.aoColumns[i].sContentPadding&&(o.innerHTML+=t.aoColumns[i].sContentPadding),e.appendChild(o)));if(n.appendChild(r),""!==t.oScroll.sX&&""!==t.oScroll.sXInner?r.style.width=q(t.oScroll.sXInner):""!==t.oScroll.sX?(r.style.width="",h(r).width()<n.offsetWidth&&(r.style.width=q(n.offsetWidth))):""!==t.oScroll.sY?r.style.width=q(n.offsetWidth):c&&(r.style.width=q(c)),r.style.visibility="hidden",Oa(t,r),s=h("tbody tr:eq(0)",r).children(),0===s.length&&(s=N(t,h("thead",r)[0])),""!==t.oScroll.sX){for(i=o=n=0;i<t.aoColumns.length;i++)t.aoColumns[i].bVisible&&(n=null===t.aoColumns[i].sWidthOrig?n+h(s[o]).outerWidth():n+(parseInt(t.aoColumns[i].sWidth.replace("px",""),10)+(h(s[o]).outerWidth()-h(s[o]).width())),o++);r.style.width=q(n),t.nTable.style.width=q(n)}for(i=o=0;i<t.aoColumns.length;i++)t.aoColumns[i].bVisible&&(n=h(s[o]).width(),null!==n&&n>0&&(t.aoColumns[i].sWidth=q(n)),o++);s=h(r).css("width"),t.nTable.style.width=-1!==s.indexOf("%")?s:q(h(r).outerWidth()),r.parentNode.removeChild(r)}c&&(t.nTable.style.width=q(c))}function Oa(t,e){""===t.oScroll.sX&&""!==t.oScroll.sY?(h(e).width(),e.style.width=q(h(e).outerWidth()-t.oScroll.iBarWidth)):""!==t.oScroll.sX&&(e.style.width=q(h(e).outerWidth()))}function Na(t,e){var i=Pa(t,e);if(0>i)return null;if(null===t.aoData[i].nTr){var n=l.createElement("td");return n.innerHTML=v(t,i,e,""),n}return J(t,i)[e]}function Pa(t,e){for(var i=-1,n=-1,r=0;r<t.aoData.length;r++){var o=v(t,r,e,"display")+"",o=o.replace(/<.*?>/g,"");o.length>i&&(i=o.length,n=r)}return n}function q(t){if(null===t)return"0px";if("number"==typeof t)return 0>t?"0px":t+"px";var e=t.charCodeAt(t.length-1);return 48>e||e>57?t:t+"px"}function Qa(){var t=l.createElement("p"),e=t.style;e.width="100%",e.height="200px",e.padding="0px";var i=l.createElement("div"),e=i.style;return e.position="absolute",e.top="0px",e.left="0px",e.visibility="hidden",e.width="200px",e.height="150px",e.padding="0px",e.overflow="hidden",i.appendChild(t),l.body.appendChild(i),e=t.offsetWidth,i.style.overflow="scroll",t=t.offsetWidth,e==t&&(t=i.clientWidth),l.body.removeChild(i),e-t}function O(t,e){var i,r,o,s,a,l,c=[],u=[],d=j.ext.oSort,p=t.aoData,f=t.aoColumns,m=t.oLanguage.oAria;if(!t.oFeatures.bServerSide&&(0!==t.aaSorting.length||null!==t.aaSortingFixed)){for(c=null!==t.aaSortingFixed?t.aaSortingFixed.concat(t.aaSorting):t.aaSorting.slice(),i=0;i<c.length;i++)if(r=c[i][0],o=R(t,r),s=t.aoColumns[r].sSortDataType,j.ext.afnSortData[s])if(a=j.ext.afnSortData[s].call(t.oInstance,t,r,o),a.length===p.length)for(o=0,s=p.length;s>o;o++)F(t,o,r,a[o]);else D(t,0,"Returned data sort array (col "+r+") is the wrong length");for(i=0,r=t.aiDisplayMaster.length;r>i;i++)u[t.aiDisplayMaster[i]]=i;var g,E=c.length;for(i=0,r=p.length;r>i;i++)for(o=0;E>o;o++)for(g=f[c[o][0]].aDataSort,a=0,l=g.length;l>a;a++)s=f[g[a]].sType,s=d[(s?s:"string")+"-pre"],p[i]._aSortData[g[a]]=s?s(v(t,i,g[a],"sort")):v(t,i,g[a],"sort");t.aiDisplayMaster.sort(function(t,e){var i,n,r,o,s;for(i=0;E>i;i++)for(s=f[c[i][0]].aDataSort,n=0,r=s.length;r>n;n++)if(o=f[s[n]].sType,o=d[(o?o:"string")+"-"+c[i][1]](p[t]._aSortData[s[n]],p[e]._aSortData[s[n]]),0!==o)return o;return d["numeric-asc"](u[t],u[e])})}for((e===n||e)&&!t.oFeatures.bDeferRender&&P(t),i=0,r=t.aoColumns.length;r>i;i++)s=f[i].sTitle.replace(/<.*?>/g,""),o=f[i].nTh,o.removeAttribute("aria-sort"),o.removeAttribute("aria-label"),f[i].bSortable?0<c.length&&c[0][0]==i?(o.setAttribute("aria-sort","asc"==c[0][1]?"ascending":"descending"),o.setAttribute("aria-label",s+("asc"==(f[i].asSorting[c[0][2]+1]?f[i].asSorting[c[0][2]+1]:f[i].asSorting[0])?m.sSortAscending:m.sSortDescending))):o.setAttribute("aria-label",s+("asc"==f[i].asSorting[0]?m.sSortAscending:m.sSortDescending)):o.setAttribute("aria-label",s);t.bSorted=!0,h(t.oInstance).trigger("sort",t),t.oFeatures.bFilter?K(t,t.oPreviousSearch,1):(t.aiDisplay=t.aiDisplayMaster.slice(),t._iDisplayStart=0,y(t),x(t))}function ia(t,e,i,n){Ra(e,{},function(e){if(!1!==t.aoColumns[i].bSortable){var r=function(){var n,r;if(e.shiftKey){for(var o=!1,s=0;s<t.aaSorting.length;s++)if(t.aaSorting[s][0]==i){o=!0,n=t.aaSorting[s][0],r=t.aaSorting[s][2]+1,t.aoColumns[n].asSorting[r]?(t.aaSorting[s][1]=t.aoColumns[n].asSorting[r],t.aaSorting[s][2]=r):t.aaSorting.splice(s,1);break}!1===o&&t.aaSorting.push([i,t.aoColumns[i].asSorting[0],0])}else 1==t.aaSorting.length&&t.aaSorting[0][0]==i?(n=t.aaSorting[0][0],r=t.aaSorting[0][2]+1,t.aoColumns[n].asSorting[r]||(r=0),t.aaSorting[0][1]=t.aoColumns[n].asSorting[r],t.aaSorting[0][2]=r):(t.aaSorting.splice(0,t.aaSorting.length),t.aaSorting.push([i,t.aoColumns[i].asSorting[0],0]));O(t)};t.oFeatures.bProcessing?(E(t,!0),setTimeout(function(){r(),t.oFeatures.bServerSide||E(t,!1)},0)):r(),"function"==typeof n&&n(t)}})}function P(t){var e,i,n,r,o,s=t.aoColumns.length,a=t.oClasses;for(e=0;s>e;e++)t.aoColumns[e].bSortable&&h(t.aoColumns[e].nTh).removeClass(a.sSortAsc+" "+a.sSortDesc+" "+t.aoColumns[e].sSortingClass);for(i=null!==t.aaSortingFixed?t.aaSortingFixed.concat(t.aaSorting):t.aaSorting.slice(),e=0;e<t.aoColumns.length;e++)if(t.aoColumns[e].bSortable){for(o=t.aoColumns[e].sSortingClass,r=-1,n=0;n<i.length;n++)if(i[n][0]==e){o="asc"==i[n][1]?a.sSortAsc:a.sSortDesc,r=n;break}h(t.aoColumns[e].nTh).addClass(o),t.bJUI&&(o=h("span."+a.sSortIcon,t.aoColumns[e].nTh),o.removeClass(a.sSortJUIAsc+" "+a.sSortJUIDesc+" "+a.sSortJUI+" "+a.sSortJUIAscAllowed+" "+a.sSortJUIDescAllowed),o.addClass(-1==r?t.aoColumns[e].sSortingClassJUI:"asc"==i[r][1]?a.sSortJUIAsc:a.sSortJUIDesc))}else h(t.aoColumns[e].nTh).addClass(t.aoColumns[e].sSortingClass);if(o=a.sSortColumn,t.oFeatures.bSort&&t.oFeatures.bSortClasses){for(t=J(t),r=[],e=0;s>e;e++)r.push("");for(e=0,n=1;e<i.length;e++)a=parseInt(i[e][0],10),r[a]=o+n,3>n&&n++;o=RegExp(o+"[123]");var l;for(e=0,i=t.length;i>e;e++)a=e%s,n=t[e].className,l=r[a],a=n.replace(o,l),a!=n?t[e].className=h.trim(a):0<l.length&&-1==n.indexOf(l)&&(t[e].className=n+" "+l)}}function ra(t){if(t.oFeatures.bStateSave&&!t.bDestroying){var e,i;e=t.oScroll.bInfinite;var n={iCreate:(new Date).getTime(),iStart:e?0:t._iDisplayStart,iEnd:e?t._iDisplayLength:t._iDisplayEnd,iLength:t._iDisplayLength,aaSorting:h.extend(!0,[],t.aaSorting),oSearch:h.extend(!0,{},t.oPreviousSearch),aoSearchCols:h.extend(!0,[],t.aoPreSearchCols),abVisCols:[]};for(e=0,i=t.aoColumns.length;i>e;e++)n.abVisCols.push(t.aoColumns[e].bVisible);A(t,"aoStateSaveParams","stateSaveParams",[t,n]),t.fnStateSave.call(t.oInstance,t,n)}}function Sa(t,e){if(t.oFeatures.bStateSave){var i=t.fnStateLoad.call(t.oInstance,t);if(i){var n=A(t,"aoStateLoadParams","stateLoadParams",[t,i]);if(-1===h.inArray(!1,n)){for(t.oLoadedState=h.extend(!0,{},i),t._iDisplayStart=i.iStart,t.iInitDisplayStart=i.iStart,t._iDisplayEnd=i.iEnd,t._iDisplayLength=i.iLength,t.aaSorting=i.aaSorting.slice(),t.saved_aaSorting=i.aaSorting.slice(),h.extend(t.oPreviousSearch,i.oSearch),h.extend(!0,t.aoPreSearchCols,i.aoSearchCols),e.saved_aoColumns=[],n=0;n<i.abVisCols.length;n++)e.saved_aoColumns[n]={},e.saved_aoColumns[n].bVisible=i.abVisCols[n];A(t,"aoStateLoaded","stateLoaded",[t,i])}}}}function s(t){for(var e=0;e<j.settings.length;e++)if(j.settings[e].nTable===t)return j.settings[e];return null}function T(t){for(var e=[],t=t.aoData,i=0,n=t.length;n>i;i++)null!==t[i].nTr&&e.push(t[i].nTr);return e}function J(t,e){var i,r,o,s,a,l,h=[];r=0;var c=t.aoData.length;for(e!==n&&(r=e,c=e+1),o=r;c>o;o++)if(l=t.aoData[o],null!==l.nTr){for(r=[],i=l.nTr.firstChild;i;)s=i.nodeName.toLowerCase(),("td"==s||"th"==s)&&r.push(i),i=i.nextSibling;for(s=i=0,a=t.aoColumns.length;a>s;s++)t.aoColumns[s].bVisible?h.push(r[s-i]):(h.push(l._anHidden[s]),i++)}return h}function D(t,e,i){if(t=null===t?"DataTables warning: "+i:"DataTables warning (table id = '"+t.sTableId+"'): "+i,0===e){if("alert"!=j.ext.sErrMode)throw Error(t);alert(t)}else X.console&&console.log&&console.log(t)}function p(t,e,i,r){r===n&&(r=i),e[i]!==n&&(t[r]=e[i])}function Ta(t,i){var n,r;for(r in i)i.hasOwnProperty(r)&&(n=i[r],"object"==typeof e[r]&&null!==n&&!1===h.isArray(n)?h.extend(!0,t[r],n):t[r]=n);return t}function Ra(t,e,i){h(t).bind("click.DT",e,function(e){t.blur(),i(e)}).bind("keypress.DT",e,function(t){13===t.which&&i(t)}).bind("selectstart.DT",function(){return!1})}function z(t,e,i,n){i&&t[e].push({fn:i,sName:n})}function A(t,e,i,n){for(var e=t[e],r=[],o=e.length-1;o>=0;o--)r.push(e[o].fn.apply(t.oInstance,n));return null!==i&&h(t.oInstance).trigger(i,n),r}function Ua(t){var e=h('<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden"><div style="position:absolute; top:1px; left:1px; width:100px; overflow:scroll;"><div id="DT_BrowserTest" style="width:100%; height:10px;"></div></div></div>')[0];l.body.appendChild(e),t.oBrowser.bScrollOversize=100===h("#DT_BrowserTest",e)[0].offsetWidth?!0:!1,l.body.removeChild(e)}function Va(t){return function(){var e=[s(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[t].apply(this,e)}}var U=/\[.*?\]$/,Wa=X.JSON?JSON.stringify:function(t){var e=typeof t;if("object"!==e||null===t)return"string"===e&&(t='"'+t+'"'),t+"";var i,n,r=[],o=h.isArray(t);for(i in t)n=t[i],e=typeof n,"string"===e?n='"'+n+'"':"object"===e&&null!==n&&(n=Wa(n)),r.push((o?"":'"'+i+'":')+n);return(o?"[":"{")+r+(o?"]":"}")};this.$=function(t,e){var i,n,r,o=[];n=s(this[j.ext.iApiIndex]);var a=n.aoData,l=n.aiDisplay,c=n.aiDisplayMaster;if(e||(e={}),e=h.extend({},{filter:"none",order:"current",page:"all"},e),"current"==e.page)for(i=n._iDisplayStart,n=n.fnDisplayEnd();n>i;i++)(r=a[l[i]].nTr)&&o.push(r);else if("current"==e.order&&"none"==e.filter)for(i=0,n=c.length;n>i;i++)(r=a[c[i]].nTr)&&o.push(r);else if("current"==e.order&&"applied"==e.filter)for(i=0,n=l.length;n>i;i++)(r=a[l[i]].nTr)&&o.push(r);else if("original"==e.order&&"none"==e.filter)for(i=0,n=a.length;n>i;i++)(r=a[i].nTr)&&o.push(r);else if("original"==e.order&&"applied"==e.filter)for(i=0,n=a.length;n>i;i++)r=a[i].nTr,-1!==h.inArray(i,l)&&r&&o.push(r);else D(n,1,"Unknown selection options");return o=h(o),i=o.filter(t),o=o.find(t),h([].concat(h.makeArray(i),h.makeArray(o)))},this._=function(t,e){var i,n,r=[],o=this.$(t,e);for(i=0,n=o.length;n>i;i++)r.push(this.fnGetData(o[i]));return r},this.fnAddData=function(t,e){if(0===t.length)return[];var i,r=[],o=s(this[j.ext.iApiIndex]);if("object"==typeof t[0]&&null!==t[0])for(var a=0;a<t.length;a++){if(i=H(o,t[a]),-1==i)return r;r.push(i)}else{if(i=H(o,t),-1==i)return r;r.push(i)}return o.aiDisplay=o.aiDisplayMaster.slice(),(e===n||e)&&aa(o),r},this.fnAdjustColumnSizing=function(t){var e=s(this[j.ext.iApiIndex]);k(e),t===n||t?this.fnDraw(!1):(""!==e.oScroll.sX||""!==e.oScroll.sY)&&this.oApi._fnScrollDraw(e)},this.fnClearTable=function(t){var e=s(this[j.ext.iApiIndex]);ga(e),(t===n||t)&&x(e)},this.fnClose=function(t){for(var e=s(this[j.ext.iApiIndex]),i=0;i<e.aoOpenRows.length;i++)if(e.aoOpenRows[i].nParent==t)return(t=e.aoOpenRows[i].nTr.parentNode)&&t.removeChild(e.aoOpenRows[i].nTr),e.aoOpenRows.splice(i,1),0;return 1},this.fnDeleteRow=function(t,e,i){var r,o,a=s(this[j.ext.iApiIndex]),t="object"==typeof t?I(a,t):t,l=a.aoData.splice(t,1);for(r=0,o=a.aoData.length;o>r;r++)null!==a.aoData[r].nTr&&(a.aoData[r].nTr._DT_RowIndex=r);return r=h.inArray(t,a.aiDisplay),a.asDataSearch.splice(r,1),ha(a.aiDisplayMaster,t),ha(a.aiDisplay,t),"function"==typeof e&&e.call(this,a,l),a._iDisplayStart>=a.fnRecordsDisplay()&&(a._iDisplayStart-=a._iDisplayLength,0>a._iDisplayStart&&(a._iDisplayStart=0)),(i===n||i)&&(y(a),x(a)),l},this.fnDestroy=function(t){var i,r,o=s(this[j.ext.iApiIndex]),a=o.nTableWrapper.parentNode,l=o.nTBody,t=t===n?!1:t;if(o.bDestroying=!0,A(o,"aoDestroyCallback","destroy",[o]),!t)for(i=0,r=o.aoColumns.length;r>i;i++)!1===o.aoColumns[i].bVisible&&this.fnSetColumnVis(i,!0);for(h(o.nTableWrapper).find("*").andSelf().unbind(".DT"),h("tbody>tr>td."+o.oClasses.sRowEmpty,o.nTable).parent().remove(),o.nTable!=o.nTHead.parentNode&&(h(o.nTable).children("thead").remove(),o.nTable.appendChild(o.nTHead)),o.nTFoot&&o.nTable!=o.nTFoot.parentNode&&(h(o.nTable).children("tfoot").remove(),o.nTable.appendChild(o.nTFoot)),o.nTable.parentNode.removeChild(o.nTable),h(o.nTableWrapper).remove(),o.aaSorting=[],o.aaSortingFixed=[],P(o),h(T(o)).removeClass(o.asStripeClasses.join(" ")),h("th, td",o.nTHead).removeClass([o.oClasses.sSortable,o.oClasses.sSortableAsc,o.oClasses.sSortableDesc,o.oClasses.sSortableNone].join(" ")),o.bJUI&&(h("th span."+o.oClasses.sSortIcon+", td span."+o.oClasses.sSortIcon,o.nTHead).remove(),h("th, td",o.nTHead).each(function(){var t=h("div."+o.oClasses.sSortJUIWrapper,this),e=t.contents();h(this).append(e),t.remove()})),!t&&o.nTableReinsertBefore?a.insertBefore(o.nTable,o.nTableReinsertBefore):t||a.appendChild(o.nTable),i=0,r=o.aoData.length;r>i;i++)null!==o.aoData[i].nTr&&l.appendChild(o.aoData[i].nTr);if(!0===o.oFeatures.bAutoWidth&&(o.nTable.style.width=q(o.sDestroyWidth)),r=o.asDestroyStripes.length)for(t=h(l).children("tr"),i=0;r>i;i++)t.filter(":nth-child("+r+"n + "+i+")").addClass(o.asDestroyStripes[i]);for(i=0,r=j.settings.length;r>i;i++)j.settings[i]==o&&j.settings.splice(i,1);e=o=null},this.fnDraw=function(t){var e=s(this[j.ext.iApiIndex]);!1===t?(y(e),x(e)):aa(e)},this.fnFilter=function(t,e,i,r,o,a){var c=s(this[j.ext.iApiIndex]);if(c.oFeatures.bFilter)if((i===n||null===i)&&(i=!1),(r===n||null===r)&&(r=!0),(o===n||null===o)&&(o=!0),(a===n||null===a)&&(a=!0),e===n||null===e){if(K(c,{sSearch:t+"",bRegex:i,bSmart:r,bCaseInsensitive:a},1),o&&c.aanFeatures.f)for(e=c.aanFeatures.f,i=0,r=e.length;r>i;i++)try{e[i]._DT_Input!=l.activeElement&&h(e[i]._DT_Input).val(t)}catch(u){h(e[i]._DT_Input).val(t)}}else h.extend(c.aoPreSearchCols[e],{sSearch:t+"",bRegex:i,bSmart:r,bCaseInsensitive:a}),K(c,c.oPreviousSearch,1)},this.fnGetData=function(t,e){var i=s(this[j.ext.iApiIndex]);if(t!==n){var r=t;if("object"==typeof t){var o=t.nodeName.toLowerCase();"tr"===o?r=I(i,t):"td"===o&&(r=I(i,t.parentNode),e=fa(i,r,t))}return e!==n?v(i,r,e,""):i.aoData[r]!==n?i.aoData[r]._aData:null}return Z(i)},this.fnGetNodes=function(t){var e=s(this[j.ext.iApiIndex]);return t!==n?e.aoData[t]!==n?e.aoData[t].nTr:null:T(e)},this.fnGetPosition=function(t){var e=s(this[j.ext.iApiIndex]),i=t.nodeName.toUpperCase();return"TR"==i?I(e,t):"TD"==i||"TH"==i?(i=I(e,t.parentNode),t=fa(e,i,t),[i,R(e,t),t]):null},this.fnIsOpen=function(t){for(var e=s(this[j.ext.iApiIndex]),i=0;i<e.aoOpenRows.length;i++)if(e.aoOpenRows[i].nParent==t)return!0;return!1},this.fnOpen=function(e,i,n){var r=s(this[j.ext.iApiIndex]),o=T(r);if(-1!==h.inArray(e,o)){this.fnClose(e);var o=l.createElement("tr"),a=l.createElement("td");return o.appendChild(a),a.className=n,a.colSpan=t(r),"string"==typeof i?a.innerHTML=i:h(a).html(i),i=h("tr",r.nTBody),-1!=h.inArray(e,i)&&h(o).insertAfter(e),r.aoOpenRows.push({nTr:o,nParent:e}),o}},this.fnPageChange=function(t,e){var i=s(this[j.ext.iApiIndex]);qa(i,t),y(i),(e===n||e)&&x(i)},this.fnSetColumnVis=function(e,i,r){var o,a,l,h,c=s(this[j.ext.iApiIndex]),u=c.aoColumns,d=c.aoData;if(u[e].bVisible!=i){if(i){for(o=a=0;e>o;o++)u[o].bVisible&&a++;if(h=a>=t(c),!h)for(o=e;o<u.length;o++)if(u[o].bVisible){l=o;break}for(o=0,a=d.length;a>o;o++)null!==d[o].nTr&&(h?d[o].nTr.appendChild(d[o]._anHidden[e]):d[o].nTr.insertBefore(d[o]._anHidden[e],J(c,o)[l]))}else for(o=0,a=d.length;a>o;o++)null!==d[o].nTr&&(l=J(c,o)[e],d[o]._anHidden[e]=l,l.parentNode.removeChild(l));for(u[e].bVisible=i,W(c,c.aoHeader),c.nTFoot&&W(c,c.aoFooter),o=0,a=c.aoOpenRows.length;a>o;o++)c.aoOpenRows[o].nTr.colSpan=t(c);(r===n||r)&&(k(c),x(c)),ra(c)}},this.fnSettings=function(){return s(this[j.ext.iApiIndex])},this.fnSort=function(t){var e=s(this[j.ext.iApiIndex]);e.aaSorting=t,O(e)},this.fnSortListener=function(t,e,i){ia(s(this[j.ext.iApiIndex]),t,e,i)},this.fnUpdate=function(t,e,i,o,a){var l=s(this[j.ext.iApiIndex]),e="object"==typeof e?I(l,e):e;if(h.isArray(t)&&i===n)for(l.aoData[e]._aData=t.slice(),i=0;i<l.aoColumns.length;i++)this.fnUpdate(v(l,e,i),e,i,!1,!1);else if(h.isPlainObject(t)&&i===n)for(l.aoData[e]._aData=h.extend(!0,{},t),i=0;i<l.aoColumns.length;i++)this.fnUpdate(v(l,e,i),e,i,!1,!1);else{F(l,e,i,t);var t=v(l,e,i,"display"),c=l.aoColumns[i];null!==c.fnRender&&(t=S(l,e,i),c.bUseRendered&&F(l,e,i,t)),null!==l.aoData[e].nTr&&(J(l,e)[i].innerHTML=t)}return i=h.inArray(e,l.aiDisplay),l.asDataSearch[i]=na(l,Y(l,e,"filter",r(l,"bSearchable"))),(a===n||a)&&k(l),(o===n||o)&&aa(l),0},this.fnVersionCheck=j.ext.fnVersionCheck,this.oApi={_fnExternApiFunc:Va,_fnInitialise:ba,_fnInitComplete:$,_fnLanguageCompat:pa,_fnAddColumn:o,_fnColumnOptions:m,_fnAddData:H,_fnCreateTr:ea,_fnGatherData:ua,_fnBuildHead:va,_fnDrawHead:W,_fnDraw:x,_fnReDraw:aa,_fnAjaxUpdate:wa,_fnAjaxParameters:Ea,_fnAjaxUpdateDraw:Fa,_fnServerParams:ka,_fnAddOptionsHtml:xa,_fnFeatureHtmlTable:Ba,_fnScrollDraw:La,_fnAdjustColumnSizing:k,_fnFeatureHtmlFilter:za,_fnFilterComplete:K,_fnFilterCustom:Ia,_fnFilterColumn:Ha,_fnFilter:Ga,_fnBuildSearchArray:la,_fnBuildSearchRow:na,_fnFilterCreateSearch:ma,_fnDataToSearch:Ja,_fnSort:O,_fnSortAttachListener:ia,_fnSortingClasses:P,_fnFeatureHtmlPaginate:Da,_fnPageChange:qa,_fnFeatureHtmlInfo:Ca,_fnUpdateInfo:Ka,_fnFeatureHtmlLength:ya,_fnFeatureHtmlProcessing:Aa,_fnProcessingDisplay:E,_fnVisibleToColumnIndex:G,_fnColumnIndexToVisible:R,_fnNodeToDataIndex:I,_fnVisbleColumns:t,_fnCalculateEnd:y,_fnConvertToWidth:Ma,_fnCalculateColumnWidths:da,_fnScrollingWidthAdjust:Oa,_fnGetWidestNode:Na,_fnGetMaxLenString:Pa,_fnStringToCss:q,_fnDetectType:B,_fnSettingsFromNode:s,_fnGetDataMaster:Z,_fnGetTrNodes:T,_fnGetTdNodes:J,_fnEscapeRegex:oa,_fnDeleteIndex:ha,_fnReOrderIndex:u,_fnColumnOrdering:M,_fnLog:D,_fnClearTable:ga,_fnSaveState:ra,_fnLoadState:Sa,_fnCreateCookie:function(a,b,c,d,e){var f=new Date;f.setTime(f.getTime()+1e3*c);var c=X.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase(),g;if(null!==e?(g="function"==typeof h.parseJSON?h.parseJSON(b):eval("("+b+")"),b=e(a,g,f.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+f.toGMTString()+"; path="+c.join("/")+"/",a=l.cookie.split(";"),e=b.split(";")[0].length,f=[],4096<e+l.cookie.length+10){for(var j=0,o=a.length;o>j;j++)if(-1!=a[j].indexOf(d)){var k=a[j].split("=");try{(g=eval("("+decodeURIComponent(k[1])+")"))&&g.iCreate&&f.push({name:k[0],time:g.iCreate})}catch(m){}}for(f.sort(function(t,e){return e.time-t.time});4096<e+l.cookie.length+10;){if(0===f.length)return;d=f.pop(),l.cookie=d.name+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/"}}l.cookie=b},_fnReadCookie:function(t){for(var e=X.location.pathname.split("/"),t=t+"_"+e[e.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",e=l.cookie.split(";"),i=0;i<e.length;i++){for(var n=e[i];" "==n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return decodeURIComponent(n.substring(t.length,n.length))}return null},_fnDetectHeader:V,_fnGetUniqueThs:N,_fnScrollBarWidth:Qa,_fnApplyToChildren:C,_fnMap:p,_fnGetRowData:Y,_fnGetCellData:v,_fnSetCellData:F,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:L,_fnApplyColumnDefs:ta,_fnBindAction:Ra,_fnExtend:Ta,_fnCallbackReg:z,_fnCallbackFire:A,_fnJsonString:Wa,_fnRender:S,_fnNodeToColumnIndex:fa,_fnInfoMacros:ja,_fnBrowserDetect:Ua,_fnGetColumns:r},h.extend(j.ext.oApi,this.oApi);for(var sa in j.ext.oApi)sa&&(this[sa]=Va(sa));var ca=this;return this.each(function(){var t,i,r,s=0;i=this.getAttribute("id");var a=!1,c=!1;if("table"!=this.nodeName.toLowerCase())D(null,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{for(s=0,t=j.settings.length;t>s;s++){if(j.settings[s].nTable==this){if(e===n||e.bRetrieve)return j.settings[s].oInstance;if(e.bDestroy){j.settings[s].oInstance.fnDestroy();break}return void D(j.settings[s],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy")}if(j.settings[s].sTableId==this.id){j.settings.splice(s,1);break}}(null===i||""===i)&&(this.id=i="DataTables_Table_"+j.ext._oExternConfig.iNextUnique++);var u=h.extend(!0,{},j.models.oSettings,{nTable:this,oApi:ca.oApi,oInit:e,sDestroyWidth:h(this).width(),sInstance:i,sTableId:i});if(j.settings.push(u),u.oInstance=1===ca.length?ca:h(this).dataTable(),e||(e={}),e.oLanguage&&pa(e.oLanguage),e=Ta(h.extend(!0,{},j.defaults),e),p(u.oFeatures,e,"bPaginate"),p(u.oFeatures,e,"bLengthChange"),p(u.oFeatures,e,"bFilter"),p(u.oFeatures,e,"bSort"),p(u.oFeatures,e,"bInfo"),p(u.oFeatures,e,"bProcessing"),p(u.oFeatures,e,"bAutoWidth"),p(u.oFeatures,e,"bSortClasses"),p(u.oFeatures,e,"bServerSide"),p(u.oFeatures,e,"bDeferRender"),p(u.oScroll,e,"sScrollX","sX"),p(u.oScroll,e,"sScrollXInner","sXInner"),p(u.oScroll,e,"sScrollY","sY"),p(u.oScroll,e,"bScrollCollapse","bCollapse"),p(u.oScroll,e,"bScrollInfinite","bInfinite"),p(u.oScroll,e,"iScrollLoadGap","iLoadGap"),p(u.oScroll,e,"bScrollAutoCss","bAutoCss"),p(u,e,"asStripeClasses"),p(u,e,"asStripClasses","asStripeClasses"),p(u,e,"fnServerData"),p(u,e,"fnFormatNumber"),p(u,e,"sServerMethod"),p(u,e,"aaSorting"),p(u,e,"aaSortingFixed"),p(u,e,"aLengthMenu"),p(u,e,"sPaginationType"),p(u,e,"sAjaxSource"),p(u,e,"sAjaxDataProp"),p(u,e,"iCookieDuration"),p(u,e,"sCookiePrefix"),p(u,e,"sDom"),p(u,e,"bSortCellsTop"),p(u,e,"iTabIndex"),p(u,e,"oSearch","oPreviousSearch"),p(u,e,"aoSearchCols","aoPreSearchCols"),p(u,e,"iDisplayLength","_iDisplayLength"),p(u,e,"bJQueryUI","bJUI"),p(u,e,"fnCookieCallback"),p(u,e,"fnStateLoad"),p(u,e,"fnStateSave"),p(u.oLanguage,e,"fnInfoCallback"),z(u,"aoDrawCallback",e.fnDrawCallback,"user"),z(u,"aoServerParams",e.fnServerParams,"user"),z(u,"aoStateSaveParams",e.fnStateSaveParams,"user"),z(u,"aoStateLoadParams",e.fnStateLoadParams,"user"),z(u,"aoStateLoaded",e.fnStateLoaded,"user"),z(u,"aoRowCallback",e.fnRowCallback,"user"),z(u,"aoRowCreatedCallback",e.fnCreatedRow,"user"),z(u,"aoHeaderCallback",e.fnHeaderCallback,"user"),z(u,"aoFooterCallback",e.fnFooterCallback,"user"),z(u,"aoInitComplete",e.fnInitComplete,"user"),z(u,"aoPreDrawCallback",e.fnPreDrawCallback,"user"),u.oFeatures.bServerSide&&u.oFeatures.bSort&&u.oFeatures.bSortClasses?z(u,"aoDrawCallback",P,"server_side_sort_classes"):u.oFeatures.bDeferRender&&z(u,"aoDrawCallback",P,"defer_sort_classes"),e.bJQueryUI?(h.extend(u.oClasses,j.ext.oJUIClasses),e.sDom===j.defaults.sDom&&"lfrtip"===j.defaults.sDom&&(u.sDom='<"H"lfr>t<"F"ip>')):h.extend(u.oClasses,j.ext.oStdClasses),h(this).addClass(u.oClasses.sTable),(""!==u.oScroll.sX||""!==u.oScroll.sY)&&(u.oScroll.iBarWidth=Qa()),u.iInitDisplayStart===n&&(u.iInitDisplayStart=e.iDisplayStart,u._iDisplayStart=e.iDisplayStart),e.bStateSave&&(u.oFeatures.bStateSave=!0,Sa(u,e),z(u,"aoDrawCallback",ra,"state_save")),null!==e.iDeferLoading&&(u.bDeferLoading=!0,s=h.isArray(e.iDeferLoading),u._iRecordsDisplay=s?e.iDeferLoading[0]:e.iDeferLoading,u._iRecordsTotal=s?e.iDeferLoading[1]:e.iDeferLoading),null!==e.aaData&&(c=!0),""!==e.oLanguage.sUrl?(u.oLanguage.sUrl=e.oLanguage.sUrl,h.getJSON(u.oLanguage.sUrl,null,function(t){pa(t),h.extend(!0,u.oLanguage,e.oLanguage,t),ba(u)}),a=!0):h.extend(!0,u.oLanguage,e.oLanguage),null===e.asStripeClasses&&(u.asStripeClasses=[u.oClasses.sStripeOdd,u.oClasses.sStripeEven]),t=u.asStripeClasses.length,u.asDestroyStripes=[],t){for(i=!1,r=h(this).children("tbody").children("tr:lt("+t+")"),s=0;t>s;s++)r.hasClass(u.asStripeClasses[s])&&(i=!0,u.asDestroyStripes.push(u.asStripeClasses[s]));i&&r.removeClass(u.asStripeClasses.join(" "))}if(i=[],s=this.getElementsByTagName("thead"),0!==s.length&&(V(u.aoHeader,s[0]),i=N(u)),null===e.aoColumns)for(r=[],s=0,t=i.length;t>s;s++)r.push(null);else r=e.aoColumns;for(s=0,t=r.length;t>s;s++)e.saved_aoColumns!==n&&e.saved_aoColumns.length==t&&(null===r[s]&&(r[s]={}),r[s].bVisible=e.saved_aoColumns[s].bVisible),o(u,i?i[s]:null);for(ta(u,e.aoColumnDefs,r,function(t,e){m(u,t,e)}),s=0,t=u.aaSorting.length;t>s;s++){u.aaSorting[s][0]>=u.aoColumns.length&&(u.aaSorting[s][0]=0);var d=u.aoColumns[u.aaSorting[s][0]];for(u.aaSorting[s][2]===n&&(u.aaSorting[s][2]=0),e.aaSorting===n&&u.saved_aaSorting===n&&(u.aaSorting[s][1]=d.asSorting[0]),i=0,r=d.asSorting.length;r>i;i++)if(u.aaSorting[s][1]==d.asSorting[i]){u.aaSorting[s][2]=i;break}}if(P(u),Ua(u),s=h(this).children("caption").each(function(){this._captionSide=h(this).css("caption-side")}),t=h(this).children("thead"),0===t.length&&(t=[l.createElement("thead")],this.appendChild(t[0])),u.nTHead=t[0],t=h(this).children("tbody"),0===t.length&&(t=[l.createElement("tbody")],this.appendChild(t[0])),u.nTBody=t[0],u.nTBody.setAttribute("role","alert"),u.nTBody.setAttribute("aria-live","polite"),u.nTBody.setAttribute("aria-relevant","all"),t=h(this).children("tfoot"),0===t.length&&0<s.length&&(""!==u.oScroll.sX||""!==u.oScroll.sY)&&(t=[l.createElement("tfoot")],this.appendChild(t[0])),0<t.length&&(u.nTFoot=t[0],V(u.aoFooter,u.nTFoot)),c)for(s=0;s<e.aaData.length;s++)H(u,e.aaData[s]);else ua(u);u.aiDisplay=u.aiDisplayMaster.slice(),u.bInitialised=!0,!1===a&&ba(u)}}),ca=null,this};j.fnVersionCheck=function(t){for(var e=function(t,e){for(;t.length<e;)t+="0";return t},i=j.ext.sVersion.split("."),t=t.split("."),n="",r="",o=0,s=t.length;s>o;o++)n+=e(i[o],3),r+=e(t[o],3);return parseInt(n,10)>=parseInt(r,10)},j.fnIsDataTable=function(t){for(var e=j.settings,i=0;i<e.length;i++)if(e[i].nTable===t||e[i].nScrollHead===t||e[i].nScrollFoot===t)return!0;return!1},j.fnTables=function(t){var e=[];return jQuery.each(j.settings,function(i,n){(!t||!0===t&&h(n.nTable).is(":visible"))&&e.push(n.nTable)}),e},j.version="1.9.4",j.settings=[],j.models={},j.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],aTypes:[],fnVersionCheck:j.fnVersionCheck,iApiIndex:0,ofnSearch:{},oApi:{},oStdClasses:{},oJUIClasses:{},oPagination:{},oSort:{},sVersion:j.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}},j.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},j.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""},j.models.oColumn={aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,fnRender:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},j.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,bScrollInfinite:!1,bServerSide:!1,bSort:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(t){if(1e3>t)return t;for(var e=t+"",t=e.split(""),i="",e=e.length,n=0;e>n;n++)0===n%3&&0!==n&&(i=this.oLanguage.sInfoThousands+i),i=t[e-n-1]+i;return i},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:function(t,e,i,n){n.jqXHR=h.ajax({url:t,data:e,success:function(t){t.sError&&n.oApi._fnLog(n,0,t.sError),h(n.oInstance).trigger("xhr",[n,t]),i(t)},dataType:"json",cache:!1,type:n.sServerMethod,error:function(t,e){"parsererror"==e&&n.oApi._fnLog(n,0,"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(e){var e=this.oApi._fnReadCookie(e.sCookiePrefix+e.sInstance),j;try{j="function"==typeof h.parseJSON?h.parseJSON(e):eval("("+e+")")}catch(m){j=null}return j},fnStateLoadParams:null,fnStateLoaded:null,fnStateSave:function(t,e){this.oApi._fnCreateCookie(t.sCookiePrefix+t.sInstance,this.oApi._fnJsonString(e),t.iCookieDuration,t.sCookiePrefix,t.fnCookieCallback)},fnStateSaveParams:null,iCookieDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iScrollLoadGap:100,iTabIndex:0,oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},j.models.oSearch),sAjaxDataProp:"aaData",sAjaxSource:null,sCookiePrefix:"SpryMedia_DataTables_",sDom:"lfrtip",sPaginationType:"two_button",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET"},j.defaults.columns={aDataSort:null,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},j.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortClasses:null,bStateSave:null},oScroll:{bAutoCss:null,bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:null,asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null,aoStateSave:[],aoStateLoad:[],oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length},fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide?!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null},j.ext=h.extend(!0,{},j.models.ext),h.extend(j.ext.oStdClasses,{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"",sJUIHeader:"",sJUIFooter:""}),h.extend(j.ext.oJUIClasses,j.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sFooterTH:"ui-state-default",sJUIHeader:"fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",sJUIFooter:"fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"}),h.extend(j.ext.oPagination,{two_button:{fnInit:function(t,e,i){var n=t.oLanguage.oPaginate,r=function(e){t.oApi._fnPageChange(t,e.data.action)&&i(t)
  37. },n=t.bJUI?'<a class="'+t.oClasses.sPagePrevDisabled+'" tabindex="'+t.iTabIndex+'" role="button"><span class="'+t.oClasses.sPageJUIPrev+'"></span></a><a class="'+t.oClasses.sPageNextDisabled+'" tabindex="'+t.iTabIndex+'" role="button"><span class="'+t.oClasses.sPageJUINext+'"></span></a>':'<a class="'+t.oClasses.sPagePrevDisabled+'" tabindex="'+t.iTabIndex+'" role="button">'+n.sPrevious+'</a><a class="'+t.oClasses.sPageNextDisabled+'" tabindex="'+t.iTabIndex+'" role="button">'+n.sNext+"</a>";h(e).append(n);var o=h("a",e),n=o[0],o=o[1];t.oApi._fnBindAction(n,{action:"previous"},r),t.oApi._fnBindAction(o,{action:"next"},r),t.aanFeatures.p||(e.id=t.sTableId+"_paginate",n.id=t.sTableId+"_previous",o.id=t.sTableId+"_next",n.setAttribute("aria-controls",t.sTableId),o.setAttribute("aria-controls",t.sTableId))},fnUpdate:function(t){if(t.aanFeatures.p)for(var e,i=t.oClasses,n=t.aanFeatures.p,r=0,o=n.length;o>r;r++)(e=n[r].firstChild)&&(e.className=0===t._iDisplayStart?i.sPagePrevDisabled:i.sPagePrevEnabled,e=e.nextSibling,e.className=t.fnDisplayEnd()==t.fnRecordsDisplay()?i.sPageNextDisabled:i.sPageNextEnabled)}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(t,e,i){var n=t.oLanguage.oPaginate,r=t.oClasses,o=function(e){t.oApi._fnPageChange(t,e.data.action)&&i(t)};h(e).append('<a tabindex="'+t.iTabIndex+'" class="'+r.sPageButton+" "+r.sPageFirst+'">'+n.sFirst+'</a><a tabindex="'+t.iTabIndex+'" class="'+r.sPageButton+" "+r.sPagePrevious+'">'+n.sPrevious+'</a><span></span><a tabindex="'+t.iTabIndex+'" class="'+r.sPageButton+" "+r.sPageNext+'">'+n.sNext+'</a><a tabindex="'+t.iTabIndex+'" class="'+r.sPageButton+" "+r.sPageLast+'">'+n.sLast+"</a>");var s=h("a",e),n=s[0],r=s[1],a=s[2],s=s[3];t.oApi._fnBindAction(n,{action:"first"},o),t.oApi._fnBindAction(r,{action:"previous"},o),t.oApi._fnBindAction(a,{action:"next"},o),t.oApi._fnBindAction(s,{action:"last"},o),t.aanFeatures.p||(e.id=t.sTableId+"_paginate",n.id=t.sTableId+"_first",r.id=t.sTableId+"_previous",a.id=t.sTableId+"_next",s.id=t.sTableId+"_last")},fnUpdate:function(t,e){if(t.aanFeatures.p){var i,n,r=j.ext.oPagination.iFullNumbersShowPages,o=Math.floor(r/2),s=Math.ceil(t.fnRecordsDisplay()/t._iDisplayLength),a=Math.ceil(t._iDisplayStart/t._iDisplayLength)+1,l="",c=t.oClasses,u=t.aanFeatures.p,d=function(n){t.oApi._fnBindAction(this,{page:n+i-1},function(i){t.oApi._fnPageChange(t,i.data.page),e(t),i.preventDefault()})};for(-1===t._iDisplayLength?a=o=i=1:r>s?(i=1,o=s):o>=a?(i=1,o=r):a>=s-o?(i=s-r+1,o=s):(i=a-Math.ceil(r/2)+1,o=i+r-1),r=i;o>=r;r++)l+=a!==r?'<a tabindex="'+t.iTabIndex+'" class="'+c.sPageButton+'">'+t.fnFormatNumber(r)+"</a>":'<a tabindex="'+t.iTabIndex+'" class="'+c.sPageButtonActive+'">'+t.fnFormatNumber(r)+"</a>";for(r=0,o=u.length;o>r;r++)n=u[r],n.hasChildNodes()&&(h("span:eq(0)",n).html(l).children("a").each(d),n=n.getElementsByTagName("a"),n=[n[0],n[1],n[n.length-2],n[n.length-1]],h(n).removeClass(c.sPageButton+" "+c.sPageButtonActive+" "+c.sPageButtonStaticDisabled),h([n[0],n[1]]).addClass(1==a?c.sPageButtonStaticDisabled:c.sPageButton),h([n[2],n[3]]).addClass(0===s||a===s||-1===t._iDisplayLength?c.sPageButtonStaticDisabled:c.sPageButton))}}}}),h.extend(j.ext.oSort,{"string-pre":function(t){return"string"!=typeof t&&(t=null!==t&&t.toString?t.toString():""),t.toLowerCase()},"string-asc":function(t,e){return e>t?-1:t>e?1:0},"string-desc":function(t,e){return e>t?1:t>e?-1:0},"html-pre":function(t){return t.replace(/<.*?>/g,"").toLowerCase()},"html-asc":function(t,e){return e>t?-1:t>e?1:0},"html-desc":function(t,e){return e>t?1:t>e?-1:0},"date-pre":function(t){return t=Date.parse(t),(isNaN(t)||""===t)&&(t=Date.parse("01/01/1970 00:00:00")),t},"date-asc":function(t,e){return t-e},"date-desc":function(t,e){return e-t},"numeric-pre":function(t){return"-"==t||""===t?0:1*t},"numeric-asc":function(t,e){return t-e},"numeric-desc":function(t,e){return e-t}}),h.extend(j.ext.aTypes,[function(t){if("number"==typeof t)return"numeric";if("string"!=typeof t)return null;var e,i=!1;if(e=t.charAt(0),-1=="0123456789-".indexOf(e))return null;for(var n=1;n<t.length;n++){if(e=t.charAt(n),-1=="0123456789.".indexOf(e))return null;if("."==e){if(i)return null;i=!0}}return"numeric"},function(t){var e=Date.parse(t);return null!==e&&!isNaN(e)||"string"==typeof t&&0===t.length?"date":null},function(t){return"string"==typeof t&&-1!=t.indexOf("<")&&-1!=t.indexOf(">")?"html":null}]),h.fn.DataTable=j,h.fn.dataTable=j,h.fn.dataTableSettings=j.settings,h.fn.dataTableExt=j.ext};"function"==typeof define&&define.amd?define(["jquery"],L):jQuery&&!jQuery.fn.dataTable&&L(jQuery)}(window,document),$.extend(!0,$.fn.dataTable.defaults,{sDom:"<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",sPaginationType:"bootstrap",oLanguage:{sLengthMenu:"_MENU_ records per page"}}),$.extend($.fn.dataTableExt.oStdClasses,{sWrapper:"dataTables_wrapper form-inline"}),$.fn.dataTableExt.oApi.fnPagingInfo=function(t){return{iStart:t._iDisplayStart,iEnd:t.fnDisplayEnd(),iLength:t._iDisplayLength,iTotal:t.fnRecordsTotal(),iFilteredTotal:t.fnRecordsDisplay(),iPage:-1===t._iDisplayLength?0:Math.ceil(t._iDisplayStart/t._iDisplayLength),iTotalPages:-1===t._iDisplayLength?0:Math.ceil(t.fnRecordsDisplay()/t._iDisplayLength)}},$.extend($.fn.dataTableExt.oPagination,{bootstrap:{fnInit:function(t,e,i){var n=t.oLanguage.oPaginate,r=function(e){e.preventDefault(),t.oApi._fnPageChange(t,e.data.action)&&i(t)};$(e).addClass("pagination").append('<ul><li class="prev disabled"><a href="#">&larr; '+n.sPrevious+'</a></li><li class="next disabled"><a href="#">'+n.sNext+" &rarr; </a></li></ul>");var o=$("a",e);$(o[0]).bind("click.DT",{action:"previous"},r),$(o[1]).bind("click.DT",{action:"next"},r)},fnUpdate:function(t,e){var i,n,r,o,s,a,l=5,h=t.oInstance.fnPagingInfo(),c=t.aanFeatures.p,u=Math.floor(l/2);for(h.iTotalPages<l?(s=1,a=h.iTotalPages):h.iPage<=u?(s=1,a=l):h.iPage>=h.iTotalPages-u?(s=h.iTotalPages-l+1,a=h.iTotalPages):(s=h.iPage-u+1,a=s+l-1),i=0,n=c.length;n>i;i++){for($("li:gt(0)",c[i]).filter(":not(:last)").remove(),r=s;a>=r;r++)o=r==h.iPage+1?'class="active"':"",$("<li "+o+'><a href="#">'+r+"</a></li>").insertBefore($("li:last",c[i])[0]).bind("click",function(i){i.preventDefault(),t._iDisplayStart=(parseInt($("a",this).text(),10)-1)*h.iLength,e(t)});0===h.iPage?$("li:first",c[i]).addClass("disabled"):$("li:first",c[i]).removeClass("disabled"),h.iPage===h.iTotalPages-1||0===h.iTotalPages?$("li:last",c[i]).addClass("disabled"):$("li:last",c[i]).removeClass("disabled")}}}}),$.fn.DataTable.TableTools&&($.extend(!0,$.fn.DataTable.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info modal"},select:{row:"active"}}),$.extend(!0,$.fn.DataTable.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}})),$(document).ready(function(){$("#example").dataTable({sDom:"<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",sPaginationType:"bootstrap",oLanguage:{sLengthMenu:"_MENU_ records per page"}})}),function(t,e){var i,n=t.jQuery||t.Cowboy||(t.Cowboy={});n.throttle=i=function(t,i,r,o){function s(){function n(){l=+new Date,r.apply(h,u)}function s(){a=e}var h=this,c=+new Date-l,u=arguments;o&&!a&&n(),a&&clearTimeout(a),o===e&&c>t?n():i!==!0&&(a=setTimeout(o?s:n,o===e?t-c:t))}var a,l=0;return"boolean"!=typeof i&&(o=r,r=i,i=e),n.guid&&(s.guid=r.guid=r.guid||n.guid++),s},n.debounce=function(t,n,r){return r===e?i(t,n,!1):i(t,r,n!==!1)}}(this);